Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I'm trying to learn a little about OpenGL, so I'm making a simple 2D game (with OpenTK), and so far it's coming along well. I thought it would be fun to give it that, for lack of a better word, retropixelated look of games from the early nineties. I figured it would be an easy thing to do -- simply draw everything at half its normal size and scale up with no anti-aliasing.

But I can't find any resources on how to do this. I can set the min/mag filters of my textures to nearest and that works fine for my sprites, but I'm using lots of primitives and I'd like the effect to apply to them as well.

The one idea I had was to draw everything at half size, then somehow copy the render buffer to a texture, then render that texture full-size, but I don't know how to do that, and it seems like there must be a better way. Can anyone help me out?

share|improve this question
add comment

1 Answer 1

up vote 8 down vote accepted

Basic idea is to render to a framebuffer object, bind that as a texture and render the texture on screen on a full-screen quad.

If you want to support lower-end hardware, you may want to render to the top-left corner of the screen instead, copy the bits to a texture and then render the full-screen quad; this is, however, much slower than the FBO technique, if FBO is available.

share|improve this answer
    
+1 like your answer! –  ComputerSaysNo Jan 17 '11 at 14:16
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.