Ardo,
I'm not familiar with every part of OpenGL you're using. I've not used glMap(), glMapGrid(), or glEvalMesh(), so I can't help you with what's going wrong.
Does glMapGrid() draw your geometry or glEvalMesh()? If it's glEvalMesh(), then you might need to leave the texture bound until it's done drawing. Beyond that, I'm not seeing anything obvious. OpenGL Profiler and glGetError() will be your best bet here.
Darrin On Oct 23, 2013, at 3:12 PM, Ardo Avancena < email@hidden> wrote: Darrin,
So I did some re arranging and took out the GL_TEXTURE_2Ds but I still can't manage to get the image fill the shape.
I'm trying to follow the Directional Blur example included in fxplug sdk's function called "copy from texture to texture". Hoping that this will load my image to the shape I created.
glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_DECAL); glActiveTexture(GL_TEXTURE0); [linkedTexture enable]; [linkedTexture bind];
//This block draws my shape GLfloat texpts[2][2][2] = {{{0.0, 0.0}, {0.0, 1.0}}, {{1.0, 0.0}, {1.0, 1.0}}}; glMap2f(GL_MAP2_VERTEX_3, 0, 1, 3, 4,
0, 1, 12, 4, &compoundPoints[0][0][0]); glMap2f(GL_MAP2_TEXTURE_COORD_2, 0, 1, 2, 2,
0, 1, 4, 2, &texpts[0][0][0]); glEnable(GL_MAP2_TEXTURE_COORD_2); glEnable(GL_MAP2_VERTEX_3); glMapGrid2f(20, 0.0, 1.0, 20, 0.0, 1.0);
[linkedTexture disable];
glBindTexture([linkedTexture target], 0);
glEnable(GL_DEPTH_TEST); glShadeModel (GL_FLAT);
glColor3f(1.0, 0.0, 0.0);
glEvalMesh2(GL_FILL, 0, 20, 0, 20);
** What ends up happening is that the square will be made, but will only follow the glColor3f(1.0,0.0,0.0);
|