Jump to content
  • Advertisement
Sign in to follow this  

SDL + opengl blurry pixel and fullscreen issue

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

Hi gamedev :) I am currently writing my game in SDL and opengl. It is 2D and I load all my sprites into textures. My sample games in my engine runs at 400x300, 640x400 etc. Pixel-perfection to me is important, since I make the art as pixel art. At startup I go to fullscreen mode. Before I had GForce 5500, and the game was fullscreen and pixel-perfect (no blurry niss). Since I've bought a new pc with GTX260 graphics card. I also have two screens now, one is 17inch (my old screen) and new one is 23 inch. When the 17inch is primary (the 23 inch disabled) the graphics are still perfectly fullscreen, however it is blurry and not pixel perfect anymore. When the 23inch is active, but 17inch still primary, the graphics is again blurry. Also, the game only displays in the bottom left part of the screen and doesn't show fullscreen, the rest (top-right) of the screen is black. Why does this happen? I assume I need to implementing some filtering? Like nearest-neighbour filtering? I'm not sure how though. Currently I draw my textures to screen applied to quads, right before I draw I have this code:
// draw image
glAlphaFunc(GL_GREATER, 0.5f);
// Bind the texture to which subsequent calls refer to
glBindTexture(GL_TEXTURE_2D, texture);
glBegin( GL_QUADS );
  // ... draw the vertices with their clipping here
(Note: I load my sprites in already as transparent pngs.) I've tried putting linear filtering:
in, but it doesn't change anything. I hope someone can explain to me what to do, I've tried google-ing, and will continue, but I'm not sure what keywords yet. Thanks

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!