2d graphic libraries
category: general [glöplog]
I'm using tinyptc for software rendering. By something I can't understand, it doesn't work fluid... even the faster effects flicks every second, even if the effect gets 70-80 fps. I suppose it is due tinyptc because I've seen soft rendering demos working completely smooth. I've tried in different computers with the same result.
So, any little library that works similar to tinyptc (just an int buffer to display at screen), wich doesn't need dll and occupies few, that works with visual c 6? Thanks in advance
So, any little library that works similar to tinyptc (just an int buffer to display at screen), wich doesn't need dll and occupies few, that works with visual c 6? Thanks in advance
you can make some directdraw wrapper. It shouldn't be too hard.
Tinyptc runs smoothly here. Are you using the GDI version? GDI is SLOW.
Tinyptc runs smoothly here. Are you using the GDI version? GDI is SLOW.
pixel toaster for c++. 70-80 fps does flickering possibly because you lose vsync. is it in gdi or ddraw mode?
direct draw mode
and yes xernobyl, it shouldn't be too hard... but I'm fucking lazy and not yet adapted to windows programming...
anesthetic, yes, I suppose it is a vsync problem, but I have no idea of how to unable vsync in tinyptc... vsync kills my fps and also makes my effects looks like 15-20 fps due the shitty flicks...
anesthetic, yes, I suppose it is a vsync problem, but I have no idea of how to unable vsync in tinyptc... vsync kills my fps and also makes my effects looks like 15-20 fps due the shitty flicks...
texel, what resolution do you use? TinyPTC with DirectDraw should work fine. At least until ~800x600... anything above gets slow because copying RAM->VRAM via CPU eats up all the perfomance.
640*480
maybe you are trying to run it in a window. then you will loose vsynch. also it might be because ddraw eats up the prio. try to add a Sleep(1) in the main loop to give some cpu back. Maybe its acctually the timer that is fucked, try lowpassfiltering on it plus use QueryPerformanceTimer instead of f.i. timegettime/gettickcount.
Interesting question since I seem to had the same problems. First of all, in windowed mode the flickery refresh is rather noticable and perhaps unavoidable. But I think in fullscreen mode and with doublebuffer enabled on SDL lib it wasn't there much (Though in the freebasic SDL lib port I used in a demo, the results were still shitty :P).
texel: Could you upload some code with TinyPTC that demonstrates the problem? Because it works fine here... and 640x480 with 70fps (synced to 70hz) should be no problem for any halfway modern pc.
It's all about the raster display bug and not the fps speed I think. Iirc I had effects going over 150fps and then sync them down to the refresh rate but the screen refresh bug was still there (the one that you got in DOS when you don't sync properly the screen output with the vertical sync signal).
I think we discussed similar problems in those forum topics, even though it was mostly about Freebasic using TinyPTC, but wtf it may give some more ideas.
http://dbfinteractive.com/index.php?topic=620.0
http://dbfinteractive.com/index.php?topic=132.0
I think we discussed similar problems in those forum topics, even though it was mostly about Freebasic using TinyPTC, but wtf it may give some more ideas.
http://dbfinteractive.com/index.php?topic=620.0
http://dbfinteractive.com/index.php?topic=132.0
I really like TinyPTC and I didn't have any problems with it. But if you are having troubles, SDL is a good alternative. If you like, you can use it just like TinyPTC with a few additional parameters. But I'm sure when you start using SDL, you are going to use more features of it, even external SDL libraries. This is exactly what happened to me.
Today, I've been testing again, and now I think I know where could be my problem... When I close Emule, MSN Messenger, Yahoo Messenger, ICQ, Skype and other programs running, there there are not skipping frames (at least I can't perceive it). So, maybe it is a program execution priority problem?
Have you even tried the sleep(0) trick ? (i cant remember if its sleep or Sleep, the winmm shit is what you want - milliseconds, not the stdlib 1second sleep), you will notice if you pick the wrong one (and its implemented, i cant remember if its posix anyhow).