Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

Journeyman III

problem concerning OpenGL extension AMD_VERTEX_SHADER_TESSELLATOR

Hello everyone,

for some days I have experimented a bit with the extension named above and got some problems: I can tessellate just vertices, and the tessellation of the vertices looks correct in wireframe mode, but i can tessellate nothing else. Whenever I try to tessellate texture coordinates, normals etc. I get an access violation in atioglxx.dll. Colors don't cause errors, but the result is all black. My vertex shader is almost exactly like the example shader in the OpenGL registry ( ) . I also took a look at the examples given by this page (, but in the example there are only vertices tessellated and the lines for colors are commented out. I compared the code with mine and didn't find any major differences.

If the example shader given in the OpenGL registry is right, the problem is definitely caused by the main program. I suppose there MAY be something wrong with the sampler locations. The example from this page does it like this:

    vtxLoc = glGetUniformLocation(prgName, "vertex");
    //m_colorLoc = glGetUniformLocation(prgName, "color");

    //if(vtxLoc == -1 || colLoc == -1)
    if (vtxLoc == -1)
//an error occured getting sampler locations
        return false;

    glUniform1i(vtxLoc, 0);
    //glUniform1i(colLoc, 1);

I do it similarly:

  glUniform1iARB(glGetUniformLocationARB(shader, PGLCharARB('Vertex')), 0);
  glUniform1iARB(glGetUniformLocationARB(shader, PGLCharARB('Color')), 1);
  glUniform1iARB(glGetUniformLocationARB(shader, PGLCharARB('Normal')), 2);
  glUniform1iARB(glGetUniformLocationARB(shader, PGLCharARB('Texcoord0')), 3);
//  glUniform1iARB(glGetUniformLocationARB(shader, PGLCharARB('Temperature')), 4);
//  glUniform1iARB(glGetUniformLocationARB(shader, PGLCharARB('Pressure')), 5);

Except of Pressure, the results of glGetUniformLocationARB are all higher than -1.

Has anyone ever worked with this extension and / or can anyone help me?

Thanks in advance for help.

p.s. I hope that it's possible to understand my English


Edit: Just managed to tessellate colors successfully using OpenGL 3.2, now I'm gonna try the rest...

Edit2: The colors work well now, but I still get the error with normals and texture coordinates. I would appreciate any kind of help.

Tags (1)
1 Reply

problem concerning OpenGL extension AMD_VERTEX_SHADER_TESSELLATOR


Could you please provide the shader? We recommend to check uniform location first like

if (loc == -1)


// throw an error


You will get the location as -1 for two cases:

1. the uniform is inactive

2. it's a built-in uniform


You said that the location for "Pressure" was -1. I suggest you check the shader to see if "Pressure" is really active.