Computer Science Canada

Opengl help

Author:  Homer_simpson [ Wed Jan 28, 2009 11:56 pm ]
Post subject:  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?

Author:  CodeMonkey2000 [ Thu Jan 29, 2009 2:18 am ]
Post subject:  RE:Opengl help

Did you try using a PNG with an alpha channel?

Author:  md [ Thu Jan 29, 2009 8:31 am ]
Post subject:  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.

Author:  Homer_simpson [ Thu Jan 29, 2009 11:35 am ]
Post subject:  Re: RE:Opengl help

CodeMonkey2000 @ Thu Jan 29, 2009 2:18 am wrote:
Did you try using a PNG with an alpha channel?
Homer_simpson wrote:

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

Author:  md [ Thu Jan 29, 2009 11:42 am ]
Post subject:  RE:Opengl help

Multiple textured quads without transparency? Razz

Author:  Homer_simpson [ Thu Jan 29, 2009 1:36 pm ]
Post subject:  Re: Opengl help

never mind, alpha testing took care of it Very Happy

load a transparent tga file and do this when drawing the cockpit:
c++:
        glAlphaFunc(GL_GREATER,0.1f);
        glEnable(GL_ALPHA_TEST);


Mod Edit: Language must be in quotations for the syntax tags, "cpp" not cpp Smile


: