2
\$\begingroup\$

I'm writing a game engine using OpenGL 4.3 using gcc 5, mainly to teach myself graphics programming.

Initial development was on my Surface Pro 3 using mingw-w64 and worked like a charm.

I've decided to move to my desktop, which is running two GTX 670s, and both Windows and Arch Linux. I've made sure that I have the latest NVIDIA drivers installed on both operating systems, but am having issues with my vertex and fragment shaders. All I know is that neither system compiles the shaders, but the OpenGL Reference Compiler simply issues a warning saying that OpenGL 4.3 might not be fully implemented. I've also tried downgrading all the way to OpenGL 4.0, but this doesn't seem to fix the issue.

Below are the shaders that I'm currently trying out. Hoping someone more experienced than I can lend a hand?

shader.vert:

#version 430

layout (location = 0) in vec3 vertex_position;
layout (location = 1) in vec2 vt;

uniform mat4 cam_view, cam_proj, sprite_matrix;

out vec2 texture_coordinates;

void main()
{
   texture_coordinates = vt;
   gl_Position = cam_proj * cam_view * sprite_matrix * vec4(vertex_position, 1.0);
}

shader.frag:

#version 430

in vec2 texture_coordinates;
layout (binding = 0) uniform sampler2D tex;

out vec4 frag_colour;

void main()
{
   vec4 texel = texture(tex, texture_coordinates);
   frag_colour = texel;
}

Thanks in advance :)

\$\endgroup\$
1
  • 4
    \$\begingroup\$ If the shader doesn't compile, its error log can be read using glGetShaderInfoLog() \$\endgroup\$ Oct 7, 2015 at 12:09

1 Answer 1

-1
\$\begingroup\$

http://www.geforce.com/hardware/desktop-gpus/geforce-gtx-670/specifications

Nvidia homepage says only 4.2 is supported.

Check the error logs and for any other opengl error and fix them if any.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .