[SDL] SDL novice questions....

Amir Cicak krib at lappasoft.com
Fri Aug 12 14:30:03 PDT 2005


Hello,

I just started to use SDL, and I am using singleton pattern in which I have 
static variable (ofstream). However my app hangs on place which has nothing 
to do with error I get. It redirects me to xmtx.c, and there is some problem 
with threads/concurency. I tried changing PollEvent with PeepEvent, but I 
get same results. At the end I had to change code so I dont use static 
ofstream variable, which works, but is not what I wanted in beginning. Is 
there way to use singlethreaded SDL, I could live without events, timers, 
etc. Is there any other solution to singleton problem, or I have to write 
thread safe singletons? Can I expect more problems because of 
multithreading?

Another question is that I am blitting 640x480 image and I get 58 fps on 
geforce 6600. It seems thats because my image surface is in system memory. How 
can I load image into video memory? I open hw display and double buffering in 
fullscreen and that works, I checked flags, but I cant figure out how to load 
image into vidoe memory, is that possible with SDL?

Thank you in advance,

A.Cicak 







More information about the SDL mailing list