
-----------------------------------
Homer_simpson
Wed Jan 28, 2009 11:56 pm

Opengl help
-----------------------------------
ok i'm making a space game, I added a cockpit picture to be drawn on top of the background, i used masking with blending but i realized it significantly lowers fps rate.
any alternate ideas on how to render a cockpit on top of the background scene?

-----------------------------------
CodeMonkey2000
Thu Jan 29, 2009 2:18 am

RE:Opengl help
-----------------------------------
Did you try using a PNG with an alpha channel?

-----------------------------------
md
Thu Jan 29, 2009 8:31 am

RE:Opengl help
-----------------------------------
Textured quad with transparency, should be rather fast and easy to do. Positioning it might be a bit more of a challenge though.

-----------------------------------
Homer_simpson
Thu Jan 29, 2009 11:35 am

Re: RE:Opengl help
-----------------------------------
Did you try using a PNG with an alpha channel?
ok i'm making a space game, I added a cockpit picture to be drawn on top of the background, i used masking with blending but i realized it significantly lowers fps rate.
any alternate ideas on how to render a cockpit on top of the background scene?

those 2 are the same thing, and that is what i've done

-----------------------------------
md
Thu Jan 29, 2009 11:42 am

RE:Opengl help
-----------------------------------
Multiple textured quads without transparency? :P

-----------------------------------
Homer_simpson
Thu Jan 29, 2009 1:36 pm

Re: Opengl help
-----------------------------------
never mind, alpha testing took care of it  :D 

load a transparent tga file and do this when drawing the cockpit: 
   	glAlphaFunc(GL_GREATER,0.1f);
	glEnable(GL_ALPHA_TEST);


Mod Edit: Language must be in quotations for the syntax tags, "cpp" not cpp :)
