pouët.net

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
added on the 2006-10-22 22:17:25 by texel texel
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.
added on the 2006-10-22 22:21:14 by xernobyl xernobyl
pixel toaster for c++. 70-80 fps does flickering possibly because you lose vsync. is it in gdi or ddraw mode?
direct draw mode
added on the 2006-10-22 22:29:19 by texel texel
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...
added on the 2006-10-22 22:33:15 by texel texel
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.
added on the 2006-10-22 22:40:59 by jua jua
640*480
added on the 2006-10-22 22:58:21 by texel texel
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.
added on the 2006-10-23 01:14:39 by Hatikvah Hatikvah
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).
added on the 2006-10-23 15:47:24 by Optimus Optimus
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.
added on the 2006-10-23 16:04:55 by jua jua
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
added on the 2006-10-23 17:29:03 by Optimus Optimus
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.
added on the 2006-10-23 17:43:37 by Skate Skate
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?
added on the 2006-10-23 21:58:47 by texel texel
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).
added on the 2006-10-24 00:42:49 by Hatikvah Hatikvah

login