PDA

View Full Version : Making a full screen transparent red square at my cameras position



grt100
08-01-2012, 11:25 AM
I am creating a 3D game. I have rendered terrain, objects and a skybox...however I am struggling to work out how to render a full screen see through red square.

This will be used as an indicator that my player has taken damage. For example...when my player is hit the red square will be rendered across the whole screen and will slowly fade away after 10 or so frames.

I am very new to game programming and openGL..I have never used blending before. I would really appreciate if someone could show and explain how to do it.

The code from my renderscene method is below.

http://pastebin.com/PyWg9ize

V-man
08-05-2012, 09:31 AM
This should get you started
http://www.opengl.org/wiki/FAQ#Fullscreen_quad