Game Development Community

Textures/Alpha on GL_TRIANGLE_STRIP

by Meredith F. Purk II · in Torque Game Engine · 11/03/2010 (2:09 am) · 0 replies

I'm curious if anyone has has worked much with GL_TRIANGLE_STRIP, etc. as far as textures and alpha go.

Right now this is all being rendered in ShapeBase.cc just above the debug bounding box code:

glPushMatrix();
dglMultMatrix(&getRenderTransform());
//glEnable(GL_BLEND);
//glBlendFunc(GL_ONE, GL_ONE);
glColor4f(0, 1, 0, 0.5);
glBegin(GL_TRIANGLE_STRIP);
//my vertices go here - essentially I'm pulling in points from variables I adjust through
// the console right now
glVertex3f( Con::getFloatVariable("$Ribbon1"), Con::getFloatVariable("$Ribbon2"), 0.0); //vertex
glVertex3f( Con::getFloatVariable("$Ribbon3"), Con::getFloatVariable("$Ribbon4"), 0.0); //vertex
glVertex3f( Con::getFloatVariable("$Ribbon5"), Con::getFloatVariable("$Ribbon6"), 0.0); //vertex
glVertex3f( Con::getFloatVariable("$Ribbon7"), Con::getFloatVariable("$Ribbon8"), 0.0); //vertex
glVertex3f( Con::getFloatVariable("$Ribbon9"), Con::getFloatVariable("$Ribbon10"), 0.0); //vertex
glVertex3f( Con::getFloatVariable("$Ribbon11"), Con::getFloatVariable("$Ribbon12"), 0.0); //vertex
glVertex3f( Con::getFloatVariable("$Ribbon13"), Con::getFloatVariable("$Ribbon14"), 0.0); //vertex
glVertex3f( Con::getFloatVariable("$Ribbon15"), Con::getFloatVariable("$Ribbon16"), 0.0); //vertex
glVertex3f( Con::getFloatVariable("$Ribbon16"), Con::getFloatVariable("$Ribbon18"), 0.0); //vertex
glEnd();
glPopMatrix();
//glDisable(GL_BLEND);

I'm not too sure where to start with the textures. Any help would be appreciated.

Currently I've been working with some other things without bothering with my alpha again. Assuming I uncomment my blend code, do I have it set up right for alpha? I haven't been able to notice any substantial difference with/without it.