Windows Vista - GL30.glGenVertexArrays()

Started by Optimo, October 01, 2017, 13:21:57

Previous topic - Next topic


I'm testing my game on a computer running Windows Vista. I'm getting as far as creating a window, loading fonts and some textures, and then attempting to create a VAO. It is crashing at some place in the LWJGL package while making a VAO. Here is relevant stacktrace:
Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)  
j  org.lwjgl.opengl.GL30.nglGenVertexArrays(IJ)V+0  
j  org.lwjgl.opengl.GL30.glGenVertexArrays()I+20  
j  stbsupport.VertexArrayObject.<init>()V+5

I've also attached the crash file. I don't know what other parts are relevant.

This program runs fine on Windows 7.
I have not updated my LWJGL libraries in a few months if you have made changes to that code. However, I'd still love to know if you have an idea why this is not working on Vista but works on Windows 7?



Have you verified that the OpenGL context supports OpenGL 3.0?

You might also want to try LWJGLX/debug, it will produce a more friendly/helpful message, instead of crashing the JVM.


Quote from: spasi on October 01, 2017, 14:39:44
Have you verified that the OpenGL context supports OpenGL 3.0?

Can you explain why the context would support it on 7 and not Vista when running the same code?


No. This has to do with the GPU and driver used in each system, for which no information has been provided.


Hopefully this question isn't asking too much, but I'm pretty noob in this area of OpenGL and GLSL.

I get the error that #version 150 is not supported on my Vista machine.

When I'm loading my vertex and fragment shaders:
        vertexShader2 = Shader.loadShader(GL20.GL_VERTEX_SHADER, "resources/shader.vert");
        fragmentShader2 = Shader.loadShader(GL20.GL_FRAGMENT_SHADER, "resources/shader.frag");

If in my shader files I change 
#version 150 core 
#version 140 core
this allows my program to work on Vista.

Do you happen to know what the difference is between these two versions of GLSL in regards to the change I am making here?

If I make that change on my Windows 7 version, it crashes. So I have to use 1.40 on my Vista build and 1.50 on my Windows 7+ version. I'm going to detect OS and have it pick the appropriate file, so I think the problem is fixed.

My question here is largely academic now if you have any insight. Vista is all but aged out now so this isn't a big deal, but it's interesting and good to be able to cover your bases.


GLSL 1.50 is supported on OpenGL 3.2 or newer. The Windows Vista driver is probably an OpenGL 3.1 driver.

The Window 7 driver shouldn't crash with GLSL 1.40 though. Try just #version 140, without "core". Profile arguments were introduced in GL 3.2/GLSL 1.50.


It does work on Win7 with "#version 140".

Do you know if this should present a performance decrease vs "#version 150 core"?


Quote from: Optimo on October 04, 2017, 10:49:23Do you know if this should present a performance decrease vs "#version 150 core"?

Assuming the rest of the code doesn't change, no, I don't think so.