flat assembler
Message board for the users of flat assembler.
Index
> Linux > opengl and printf newline |
Author |
|
revolution 03 May 2016, 08:51
Without code it is impossible to say what is happening.
Perhaps you can try to gradually remove unrelated things from the code until the problems disappears. Figure out the minimum that is needed to get it to fail and work from a smaller base. |
|||
03 May 2016, 08:51 |
|
ProphetOfDoom 03 May 2016, 20:23
Thanks revolution I will try what you suggested. Problem is the program (as well as being large) has masses of dependencies and I can't really expect others to install it just to hunt for this bug. I just know that sometimes coders get intuition about things and can suggest a fix. For example I helped someone out a while back with a segfault and didn't need to read his code just his description of what he was trying to do.
Anyway, I've just ruled out the possibility that printf("\n") is causing timing problems. It takes up almost no time. Maybe if I can shave the code down to a few hundred lines I will post it on here, certainly not in a compilable state though. IIRC even the .tar.gz file is too big for this forum. |
|||
03 May 2016, 20:23 |
|
ProphetOfDoom 03 May 2016, 21:08
Okay I fixed the problem.
I had this call (probably copied and pasted from the web) in my C code: Code: SDL_GL_SetSwapInterval(1); I changed it to: Code: SDL_GL_SetSwapInterval(0); And now things are super smooth even when printing loads of newlines. It seems strange that newlines and the swap interval would interact in that way, but apparently they do. And yes I suppose, if all else fails, read the source. |
|||
03 May 2016, 21:08 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.