Pixel Doubling Lines

Started by
0 comments, last by Daaark 12 years, 11 months ago
So I'm working on a retro/8-bit style 2D game, and I need a way to draw all my graphics with pixel doubling. I've discovered that setting glOrtho to half that of the glViewport allows all the textured quads to be pixel doubled, but this technique doesn't work on primitives such as lines and points (and setting the glLineWidth is not the same as pixel doubling).

I've looked into a couple solutions I found on Google: one solution involved using the GL_ARB_framebuffer_object extension to render the lines to an offscreen texture and then render that texture to the screen, the other solution involved a pBuffer and the WGL_ARB_render_texture extension. Both these solutions raise the system requirements beyond my expectations (OpenGL Extensions Viewer 3.36 confirmed that this is going to hurt my target audience).

I considered doing the primitives raster in software using glTexImage2d, but unfortunately there is a significant quantity of lines and points that need to be rendered every single frame. So I'm kinda stuck.

Any suggestions?
Advertisement
Draw the whole scene to a half screen rez texture, then render that texture to the screen.

This topic is closed to new replies.

Advertisement