dreamer
Active Member
- Joined
- May 29, 2007
- Messages
- 569
Cool, will test it with Puredata/GEM soon.
[Edit: ok I now get past glMap2d, but on to the next one -> glEvalMesh1, which is basically implemented by glEvalMesh2. I briefly looked at how it 'should' work (but probably I'm doing this horribly wrong and possibly these could be handled in the same function?):
I get it compiled and then I'm missing glEvalPoint1, which seems to be exactly the routine used by the glEvalMesh functions. I'm sure these details can be worked out easy enough. And then on to the next one o/]
[Edit: ok I now get past glMap2d, but on to the next one -> glEvalMesh1, which is basically implemented by glEvalMesh2. I briefly looked at how it 'should' work (but probably I'm doing this horribly wrong and possibly these could be handled in the same function?):
GLvoid glEvalMesh1(GLenum mode, GLint i1, GLint i2) {
MapStateF *map;
if (! state.map2.vertex3 || !state.map2.vertex4)
return;
if (map->type == GL_DOUBLE) {
printf("libGL: GL_DOUBLE map not implemented\n");
return;
}
GLfloat u, du, u1;
GLint i;
GLenum renderMode;
switch (mode) {
case GL_POINT:
renderMode = GL_POINTS;
break;
case GL_LINE:
renderMode = GL_LINE_STRIP;
break;
case GL_FILL:
renderMode = GL_TRIANGLE_STRIP;
break;
default:
printf("unknown glEvalMesh1f mode: %x\n", mode);
return;
}
glBegin(renderMode);
for (u = u1, i = i1; i <= i2; i++, u += du) {
glEvalCoord1f(u);
}
glEnd();
}
MapStateF *map;
if (! state.map2.vertex3 || !state.map2.vertex4)
return;
if (map->type == GL_DOUBLE) {
printf("libGL: GL_DOUBLE map not implemented\n");
return;
}
GLfloat u, du, u1;
GLint i;
GLenum renderMode;
switch (mode) {
case GL_POINT:
renderMode = GL_POINTS;
break;
case GL_LINE:
renderMode = GL_LINE_STRIP;
break;
case GL_FILL:
renderMode = GL_TRIANGLE_STRIP;
break;
default:
printf("unknown glEvalMesh1f mode: %x\n", mode);
return;
}
glBegin(renderMode);
for (u = u1, i = i1; i <= i2; i++, u += du) {
glEvalCoord1f(u);
}
glEnd();
}
Last edited by a moderator: