esteve
esteve

Reputation: 50

GLSL Compile Error "gl_Position"

   #version 150 core

   in vec3 position;
   in vec2 textureCoords;

   out vec2 pass_textureCoords;

   void main(void) {
      glPosition = vec4(position.x, position.y, position.z, 1.0);
      pass_textureCoords = textureCoords;

   }

ERROR: 0:9: 'glPosition' : undeclared identifier

ERROR: 0:9: 'assign' : cannot convert from '4-component vector of float' to 'float'

Help please! How can I solve this

Upvotes: 0

Views: 1216

Answers (1)

Odney
Odney

Reputation: 865

The output of the vertex shader is gl_Position not glPosition.

gl_Position = vec4(position.x, position.y, position.z, 1.0);

Upvotes: 2

Related Questions