NOTE: The vertex shader is actually 2 files combined. I've concatenated them here for simplicity. The first file defines the necessary uniforms and functions for orthographic transformation. The second is the actual vertex shader in use for the program.

transform.vert/test.vert

#version 150
// snap2d-transform.vert - Snap2D GLSL Vertex Transformation Utility
/*
* Copyright (C) 2012-2014 Brian Groenke
* All rights reserved.
*
* This file is part of the 2DX Graphics Library.
*
* This Source Code Form is subject to the terms of the
* Mozilla Public License, v. 2.0. If a copy of the MPL
* was not distributed with this file, You can obtain one at
* URL removed to prevent post denial...
*/

// version (150) declared by transform shader
/*
* Copyright (C) 2012-2014 Brian Groenke
* All rights reserved.
*
* This file is part of the 2DX Graphics Library.
*
* This Source Code Form is subject to the terms of the
* Mozilla Public License, v. 2.0. If a copy of the MPL
* was not distributed with this file, You can obtain one at
* URL removed to prevent post denial...
*/
#define MAX_LIGHTS 30

Are you certain it's a shader problem and not something with the setup in your C code?

If you are using a core profile it may be something simple as forgetting to set a vertex array object. I had it once that I just forgot to set it, the result was a black screen on a strictly core-compliant context. NVidia may be a bit lax in that regard.

bgroenks

07-01-2014, 06:59 PM

I am using Java with the JOGL bindings.

I can't find anything wrong with the main OpenGL calls, nor do I have any reason to believe it's an issue with JOGL. Using my compatibility profile (FFP) works on everything I've tried, it's only the shaders that haven't been working.

The shaders actually DO work on Linux with the Intel driver (as I have just found out). So the problem only exists on Intel/Windows. I'm fairly certain the problem is with the shaders.

bgroenks

07-01-2014, 11:20 PM

Hmmm. After a lot of further testing I'm not so sure. I created some much simpler shaders to help try and locate where the problems are.

In another test program, independent from the project having the issues, I have very similar code that does work on the Haswell machine, and does so with the simplified shaders I just mentioned swapped in.

I'm combing through the GL calls to try and find any discrepencies, but I still have yet to find any. The process seems to be more or less the same as the program that works.