Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Graphics > OpenGL 3D API > Re: Another Tra...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 3 of 5 Topic 4891 of 5017
Post > Topic >>

Re: Another Transparency Problem using png

by grayaii <grayaii@[EMAIL PROTECTED] > Aug 27, 2008 at 11:31 AM

Thanks for the info jbw!  I tried out your advice, but I still get the
black color where my transparency should be.
I double checked the png file with photoshop and gimp to make sure all
is well, and it looks ok.

My render function now looks like this:
GL.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);
GL.glClearColor(0.0f, 0.0f, 0.0f, 0.0f);

GL.glEnable(GL.GL_BLEND);
GL.glDisable(GL.GL_DEPTH_TEST);
GL.glEnable(GL.GL_ALPHA_TEST);

GL.glBlendFunc(GL.GL_SRC_ALPHA, GL.GL_ONE_MINUS_SRC_ALPHA);
GL.glTexEnvf(GL.GL_TEXTURE_ENV, GL.GL_TEXTURE_ENV_MODE,
GL.GL_MODULATE);

.... // draw texture 1, followed by drawing texture 2 ...

If the render function is ok, could it be that the textures are being
loaded incorrectly?
I'm a bit suspicious of the following line:
m_texture1 = new OpenGLTexture2D("myImage1.PNG");
But if I put a break point right after this line and examine the image
data of m_texture1, it appears all is well.

I'll continue to investigate, but if you or anyone has any more advice/
ideas, I'm all ears!
 




 5 Posts in Topic:
Another Transparency Problem using png
grayaii <grayaii@[EMAI  2008-08-27 08:20:44 
Re: Another Transparency Problem using png
"jbwest" <jb  2008-08-27 10:40:55 
Re: Another Transparency Problem using png
grayaii <grayaii@[EMAI  2008-08-27 11:31:01 
Re: Another Transparency Problem using png
mi76 <mi333@[EMAIL PRO  2008-08-28 01:01:30 
Re: Another Transparency Problem using png
grayaii <grayaii@[EMAI  2008-08-27 18:03:29 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Nov 21 5:44:50 CST 2008.