如果我创建一个双精度顶点缓冲区,例如:
GLuint vertBuffer, spanBuffer, spanCount, patchSize, program; // already setup
glUseProgram (program);
glEnableClientState (GL_VERTEX_ARRAY);
glBindBuffer (GL_ARRAY_BUFFER, vertBuffer);
glVertexPointer (3, GL_DOUBLE, 0, 0);
glPatchParameteri (GL_PATCH_VERTICES, patchSize);
glBindBuffer (GL_ELEMENT_ARRAY_BUFFER, spanBuffer);
glDrawElements (GL_PATCHES, spanCount * patchSize, GL_UNSIGNED_INT, 0);
如何访问顶点着色器中的双精度数据?我应该能够做到这一点吗?
// GLSL VERTEX SHADER
#version 410
in dvec4 gl_Vertex;
void main ()
{
<snip>