summaryrefslogtreecommitdiff
path: root/src/scene01.c
diff options
context:
space:
mode:
authorLudovic Pouzenc <ludovic@pouzenc.fr>2019-09-08 10:49:22 +0200
committerLudovic Pouzenc <ludovic@pouzenc.fr>2019-09-08 10:49:22 +0200
commitfa84dfb895d5f3965b2c791b477a1dcc6b4eef7b (patch)
treef0776a4fc67070b5d83e600fca303e5f9cded9bf /src/scene01.c
parenta5338c572975a82b9efbf95755103176ebbb67a8 (diff)
downloaddemoscene-eo-fa84dfb895d5f3965b2c791b477a1dcc6b4eef7b.tar.gz
demoscene-eo-fa84dfb895d5f3965b2c791b477a1dcc6b4eef7b.tar.bz2
demoscene-eo-fa84dfb895d5f3965b2c791b477a1dcc6b4eef7b.zip
TRACE & DEBUG, 80x24x24fps, still troubles with render to texture
Tidy TRACE and DEBUG for cacaserver use or ncurses (no spurious printf). Switch to 80x24 at 24fps for bandwidth (4 Mbps) Colors are OK with xterm, but not with gnome-terminal
Diffstat (limited to 'src/scene01.c')
-rw-r--r--src/scene01.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/scene01.c b/src/scene01.c
index a2f1345..39083d0 100644
--- a/src/scene01.c
+++ b/src/scene01.c
@@ -167,7 +167,7 @@ void scene01_free_caca(graphical_env_t *ge, scene01_env_t *se) {
int scene01_next_gl(graphical_env_t *ge, scene01_env_t *se) {
SDL_Renderer *r = ge->gl_rndr;
- static int firsttime=1; TRACE_ONCE("call");
+ TRACE_CALL_ONCE;
// https://gist.github.com/Twinklebear/8265888
// https://forums.libsdl.org/viewtopic.php?p=51634
@@ -177,7 +177,7 @@ int scene01_next_gl(graphical_env_t *ge, scene01_env_t *se) {
glDrawArrays(GL_TRIANGLES, 0, 6);
// [...]
- SDL_GL_SwapWindow(ge->gl_win);
+ //SDL_GL_SwapWindow(ge->gl_win);
// Download the rendered texture from videocard to main memory
SDL_RenderReadPixels(r, NULL, 0, ge->raw_target, FBUF_W*4);
@@ -186,7 +186,7 @@ int scene01_next_gl(graphical_env_t *ge, scene01_env_t *se) {
}
int scene01_next_sdl(graphical_env_t *ge, scene01_env_t *se) {
- static int firsttime=1; TRACE_ONCE("call");
+ TRACE_CALL_ONCE;
return 0;
}
@@ -195,7 +195,7 @@ int scene01_next_caca(graphical_env_t *ge, scene01_env_t *se) {
caca_canvas_t *cv = ge->cv;
int w = ge->w, h = ge->h;
Uint32 frame = ge->sc_framecount;
- static int firsttime=1; TRACE_ONCE("call");
+ TRACE_CALL_ONCE;
// "convert" the raw pixel stream from SDL to ASCII art on caca canevas
caca_set_dither_gamma(ge->d, 1.0);