OpenGL Help

Anything related in any way to game development as a whole is welcome here. Tell us about your game, grace us with your project, show us your new YouTube video, etc.

Moderator: PC Supremacists

qpHalcy0n
Respected Programmer
Respected Programmer
Posts: 387
Joined: Fri Dec 19, 2008 3:33 pm
Location: Dallas
Contact:

Re: OpenGL Help

Post by qpHalcy0n »

It doesnt appear that you're actually binding the texture before you're submitting draw calls. It also does not appear that you've enabled blending. If in fact the image has a good alphamap in it then enabling blending and setting a good blend mode should work for ya.
RandomDever
Chaos Rift Regular
Chaos Rift Regular
Posts: 198
Joined: Thu Mar 26, 2009 8:42 pm
Current Project: My Engine
Programming Language of Choice: C++

Re: OpenGL Help

Post by RandomDever »

How do I set A blend mode and what blend mode should I use?
qpHalcy0n
Respected Programmer
Respected Programmer
Posts: 387
Joined: Fri Dec 19, 2008 3:33 pm
Location: Dallas
Contact:

Re: OpenGL Help

Post by qpHalcy0n »

glEnable(GL_BLEND); // Enable alpha blending
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); // Will work for what you're doing....

Turn off blending or set it back when you're done rendering transparent faces.
RandomDever
Chaos Rift Regular
Chaos Rift Regular
Posts: 198
Joined: Thu Mar 26, 2009 8:42 pm
Current Project: My Engine
Programming Language of Choice: C++

Re: OpenGL Help

Post by RandomDever »

Thank you so much it works now!!!!!! :mrgreen: :mrgreen: :mrgreen:
Post Reply