Jump to content
  • Advertisement
Sign in to follow this  
benryves

[SDL] Direct access to surfaces breaks in fullscreen mode

This topic is 4860 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

All of the SDL work I do involves writing directly to surfaces on a per-pixel basis. If I create a screen surface in windowed mode I can happily access the surface fine. However, jump up to fullscreen and I can no longer write to those pixels. I believe this is to do with locking the surface before writing to it, but any combination of locking and unlocking has had the same result to me - screen changes resolution, goes black and the VS.NET debugger complains in the background which then requires mucking around trying to force the task manager to appear and to kill the process, then restart VS.NET. What is the correct way to do this? One of my projects can do it, but I have no idea how it is doing it and there are locking and unlocking calls all over the inner loops [rolleyes].

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
Provide the _smallest_ test case (complete, compilable) piece of code which produces your problem, so it can be inspected. It sounds as if you're doing something wrong, and it's not the library, since "one of your projects" can do it.

Share this post


Link to post
Share on other sites
try doing your surfaces software instead of hardware. In many cases, software surfaces are faster, also, the locking/unlocking is ignored because it is unnecessary.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!