GLSL 4.1 with gl_ModelViewProjectionMatrix

I am working on a glsl shader program as part of a plugin that runs inside a closed source application. The application (Maya) is written using opengl 2.1, but our graphics cards support opengl / glsl 4.1, and I want to use tessellation and geometric shaders in my program. The application sets up the opengl viewer and the traditional model / view stack, and I do not control this part of the code.

My pass vertex shader uses GLSL 1.2 and works great:

// GLSL VERTEX SHADER
#version 120

void main ()
{
    gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
}

My pass-through geodetic shader uses glsl 4.1 and also works great inside the application:

// GLSL GEOMETRY SHADER
#version 410

layout (lines_adjacency) in;
layout (line_strip, max_vertices = 2) out;

void main ()
{
    gl_Position = gl_in[1].gl_Position;
    EmitVertex();
    gl_Position = gl_in[2].gl_Position;
    EmitVertex();
    EndPrimitive();
}

. , . : gl_ModelViewProjectionMatrix 4.1 ? , glsl 4.1 , . glsl 1.2 , lines_adjacency. ++? " ", glsl 4.1? - , ?

+5
1

( GL ), :

#version 410 compatibility

. ( )

+7

All Articles