Hello,
I hope someone can provide me some helps or advice...
I would like to display particles object on a marker, but having problem of
using OpenGL code to disable the display alpha channel of (blend) the .tga
texture image file.
I had tried the following snippet OpenGL code in the artoolkit draw() function:
{
argDrawMode3D();
argDraw3dCamera( 0, 0 );
glClearDepth( 1.0 );
glClear(GL_DEPTH_BUFFER_BIT);
glEnable(GL_DEPTH_TEST);
glDepthFunc(GL_LEQUAL);
/* load the camera transformation matrix */
argConvGlpara(trans, gl_para);
glMatrixMode(GL_MODELVIEW);
glLoadMatrixd( gl_para );
// Set the general polygon properties
glEnable(GL_TEXTURE_2D);
glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);
glAlphaFunc(GL_GREATER,0.1f);
glEnable(GL_BLEND);
glBindTexture(GL_TEXTURE_2D, Texture2);
glBegin(GL_QUADS);
glTexCoord2f(0.0f,1.0f); glVertex3i( 0,-32,-100);
glTexCoord2f(0.0f,0.0f); glVertex3i( 0, 96,-100);
glTexCoord2f(1.0f,0.0f); glVertex3i(256, 96,-100);
glTexCoord2f(1.0f,1.0f); glVertex3i(256,-32,-100);
glEnd();
glDisable(GL_BLEND);
glDisable( GL_LIGHTING );
glDisable( GL_DEPTH_TEST );
}
Have I done anything wrong in the artoolkit ? I appreciate if you can let me
know which part of my code is not right as the above OpenGL code works fine in
pure OpenGL program.
--
Thanks
Kevin Tan
Manchester Materials Science Centre
University of Manchester
_______________________________________________
ARToolKit mailing list
ARToolKit@w ...............
http://www.hitlabnz.org/mailman/listinfo.cgi/artoolkit
|