Hi,
I have got a small problem with the NV_evaluators, if I try:
float CPTS[4][4][4] = {{{-6.0f, 6.0f, 0.0f, 1.0f}, {-2.0f, 6.0f, 0.0f, 1.0f}, {2.0f, 6.0f, 0.0f, 1.0f}, {6.0f, 6.0f, 0.0f, 1.0f}},
{{-6.0f, 2.0f, 0.0f, 1.0f}, {-2.0f, 2.0f, 0.0f, 1.0f}, {2.0f, 2.0f, 0.0f, 1.0f}, {6.0f, 2.0f, 0.0f, 1.0f}},
{{-6.0f, -2.0f, 0.0f, 1.0f}, {-2.0f, -2.0f, 0.0f, 1.0f}, {2.0f, -2.0f, 0.0f, 1.0f}, {6.0f, -2.0f, 0.0f, 1.0f}},
{{-6.0f, -6.0f, 0.0f, 1.0f}, {-2.0f, -6.0f, 0.0f, 1.0f}, {2.0f, -6.0f, 0.0f, 1.0f}, {6.0f, -6.0f, 0.0f, 1.0f}}};float CPTS_tex[4][4][4] = {{{0.0f, 1.0f, 0.0f, 1.0f}, {0.33f, 1.0f, 0.0f, 1.0f}, {0.66f, 1.0f, 0.0f, 1.0f}, {1.0f, 1.0f, 0.0f, 1.0f}},
{{0.0f, 0.66f, 0.0f, 1.0f}, {0.33f, 0.66f, 0.0f, 1.0f}, {0.66f, 0.66f, 0.0f, 1.0f}, {1.0f, 0.66f, 0.0f, 1.0f}},
{{0.0f, 0.33f, 0.0f, 1.0f}, {0.33f, 0.33f, 0.0f, 1.0f}, {0.66f, 0.33f, 0.0f, 1.0f}, {1.0f, 0.33f, 0.0f, 1.0f}},
{{0.0f, 0.0f, 0.0f, 1.0f}, {0.33f, 0.0f, 0.0f, 1.0f}, {0.66f, 0.0f, 0.0f, 1.0f}, {1.0f, 0.0f, 0.0f, 1.0f}}};float TESS[4] = {16.0f, 16.0f, 16.0f, 16.0f};
glEnable(GL_EVAL_VERTEX_ATTRIB0_NV);
glEnable(GL_EVAL_FRACTIONAL_TESSELLATION_NV);
MainLoop
{
// other stuff …glMapControlPointsNV(GL_EVAL_2D_NV, 0, GL_FLOAT, (4 * sizeof(GLfloat)), (4 * 4 * sizeof(GLfloat)), 4, 4, GL_FALSE, CPTS);
glMapControlPointsNV(GL_EVAL_2D_NV, 8, GL_FLOAT, (4 * sizeof(GLfloat)), (4 * 4 * sizeof(GLfloat)), 4, 4, GL_FALSE, CPTS_tex);
glMapParameterfvNV(GL_EVAL_2D_NV, GL_MAP_TESSELLATION_NV, TESS);glEvalMapsNV(GL_EVAL_2D_NV, GL_FILL);
// … other stuff
}
I get an divide by zero error, if the glEvalMapsNV(GL_EVAL_2D_NV, GL_FILL); is executed.
If I leave out the glEnable(GL_EVAL_FRACTIONAL_TESSELLATION_NV); call, there is no error.
I had checked for GL errors, but the function for that returned none!
Any ideas for this one?
Diapolo