ffish
09-14-2004, 12:22 AM
Anyone know offhand if anything special is needed to set up vbos for sending to a vertex shader? I've got the following code:
void test()
{
// glUseProgramObjectARB(NodeProgram);
glEnableClientState(GL_VERTEX_ARRAY);
glDrawElements(GL_LINES, ELEMENTS*24, GL_UNSIGNED_INT, BUFFER_OFFSET(0));
glDisableClientState(GL_VERTEX_ARRAY);
}Runs fine, but if I try to use the vertex shader instead, I get a black screen. The vertex shader in question is just:
void main()
{
gl_Position = ftransform();
}So nothing special. The vertex shader is set up correctly - I have fairly robust setup code for that. I suspect there is some state I'm not setting that lets the shader know that I'm sending in vbo data, but I couldn't find it in the 1.5 or 2.0 spec, or the extension registry. Anyone know?
Thanks in advance.
void test()
{
// glUseProgramObjectARB(NodeProgram);
glEnableClientState(GL_VERTEX_ARRAY);
glDrawElements(GL_LINES, ELEMENTS*24, GL_UNSIGNED_INT, BUFFER_OFFSET(0));
glDisableClientState(GL_VERTEX_ARRAY);
}Runs fine, but if I try to use the vertex shader instead, I get a black screen. The vertex shader in question is just:
void main()
{
gl_Position = ftransform();
}So nothing special. The vertex shader is set up correctly - I have fairly robust setup code for that. I suspect there is some state I'm not setting that lets the shader know that I'm sending in vbo data, but I couldn't find it in the 1.5 or 2.0 spec, or the extension registry. Anyone know?
Thanks in advance.