Sign in to follow this  

Slow loading SDL window

This topic is 4193 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello, this is a rather odd question and I'm not sure if anyone can help me with this but; Recently, when I try to run a SDL program, be it a demo that I have downloaded or something that I have created, the loading of the program would be very, very slow. Once it loads, the game runs fine, however, closing the program is also very slow. Even when I just create an empty SDL window, it takes a good 40 seconds for it to load, while it loads my computer is almost frozen. Does anyone have a clue as to what this could be? Thank you,

Share this post


Link to post
Share on other sites
Are any other programs loading slow?
Have you restarted your computer lately?
Have you changed anything about your SDL files lately?

I can't think of anything off the top of my head that would cause programs that use SDL to load any more slowly than anything else given the information that you have given us.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Nothing else loads slow, I haven't done anything usual to my sdl files. In fact, I sent the sdl.dll and a normal blank window program over to another computer and it ran fine, no slow loading. I have rebooted quite often, the only thing that I have done different is updated my .net framework to 2.0.

I have a dual core cpu, 1gb ram, ati radeon x19000..

Share this post


Link to post
Share on other sites
Quote:
Original post by samuraicrow
I suppose it depends on what compiler you're using. If you're using Visual C++ then .NET can make a difference. If you're using GCC then it won't.


The compiler he is using is irrelevent since the OP claimed that it is slow even when loading something he himself did not compile. There is a reason tech supports ask if you have installed anything recently.

Share this post


Link to post
Share on other sites
Does your computer support rolling back windows? If you are desperate, you can try finding a time when it wasn't slow, and then reinstall everything.

See if any drivers, like for your graphics card especially, were updated without you knowing about it. It may be a problem with the fact that directdraw is going out of style, and your graphics card is all like: whatev.

Share this post


Link to post
Share on other sites
Quote:
Original post by SticksandStones
I don't think SDL uses DirectDraw, since it is cross-platform. I could be wrong though. But updating your drivers would be a very good idea. You never know what an outdated driver could do [grin]


SDL does not use its "own" api for graphics, and for windows I believe that it is directdraw because numerous times errors in the file "sdlerr.txt" have been like "DirectDraw: Exclusive videomode could not be set", but of course I could be wrong.

Share this post


Link to post
Share on other sites
Quote:
Original post by agi_shi
SDL identifies it's system at compile-time:

Windows:
DirectDraw 5
Linux:
OpenGL
Mac OS X:
OpenGL (IIRC)


SDL does not (as yet) have an opengl backend on any system. There is a work in progress one that I haven't looked at in a while, but its not part of SDL yet. AFAIK under linux some form of X witchery is used. I don't know much about Mac os, but I don't think SDL uses openGL for its rendering there either.

Quote:
Original post by SticksandStones
I don't think SDL uses DirectDraw, since it is cross-platform...


Yes it does. SDL achieves platform independance by mapping the same API (the names of functions, and their descriptions) to different platform specific functions. So SDL_SetVideoMode call will end up calling different OS functions under windows than under linux or macos. The crucial part of this is that it doesn't show up in your source code. Your source is portable across platforms, not the compiled stuff.

Share this post


Link to post
Share on other sites
Quote:
Original post by rip-off
Quote:
Original post by agi_shi
SDL identifies it's system at compile-time:

Windows:
DirectDraw 5
Linux:
OpenGL
Mac OS X:
OpenGL (IIRC)


SDL does not (as yet) have an opengl backend on any system. There is a work in progress one that I haven't looked at in a while, but its not part of SDL yet. AFAIK under linux some form of X witchery is used. I don't know much about Mac os, but I don't think SDL uses openGL for its rendering there either.

Quote:
Original post by SticksandStones
I don't think SDL uses DirectDraw, since it is cross-platform...


Yes it does. SDL achieves platform independance by mapping the same API (the names of functions, and their descriptions) to different platform specific functions. So SDL_SetVideoMode call will end up calling different OS functions under windows than under linux or macos. The crucial part of this is that it doesn't show up in your source code. Your source is portable across platforms, not the compiled stuff.


Oh. I always thought that it used OpenGL on non-windows systems.

Share this post


Link to post
Share on other sites

This topic is 4193 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this