LWJGL Forum

Please login or register.

Login with username, password and session length

Author Topic: Windows Vista - GL30.glGenVertexArrays()  (Read 164 times)

Optimo

  • Newbie
  • *
  • Offline Offline
  • Posts: 19
Windows Vista - GL30.glGenVertexArrays()
« on: October 01, 2017, 13:21:57 »

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:
Code: [Select]
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?

Thanks!
Logged

spasi

  • Administrator
  • Nerdus Imperius
  • *****
  • Offline Offline
  • Posts: 1888
Re: Windows Vista - GL30.glGenVertexArrays()
« Reply #1 on: October 01, 2017, 14:39:44 »

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.
Logged

Optimo

  • Newbie
  • *
  • Offline Offline
  • Posts: 19
Re: Windows Vista - GL30.glGenVertexArrays()
« Reply #2 on: October 01, 2017, 17:07:27 »

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?
Logged

spasi

  • Administrator
  • Nerdus Imperius
  • *****
  • Offline Offline
  • Posts: 1888
Re: Windows Vista - GL30.glGenVertexArrays()
« Reply #3 on: October 01, 2017, 17:15:02 »

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

Optimo

  • Newbie
  • *
  • Offline Offline
  • Posts: 19
Re: Windows Vista - GL30.glGenVertexArrays()
« Reply #4 on: October 04, 2017, 09:44:21 »

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:
Code: [Select]
        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 
to
#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.
Logged

spasi

  • Administrator
  • Nerdus Imperius
  • *****
  • Offline Offline
  • Posts: 1888
Re: Windows Vista - GL30.glGenVertexArrays()
« Reply #5 on: October 04, 2017, 10:31:47 »

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.
Logged

Optimo

  • Newbie
  • *
  • Offline Offline
  • Posts: 19
Re: Windows Vista - GL30.glGenVertexArrays()
« Reply #6 on: October 04, 2017, 10:49:23 »

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

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

spasi

  • Administrator
  • Nerdus Imperius
  • *****
  • Offline Offline
  • Posts: 1888
Re: Windows Vista - GL30.glGenVertexArrays()
« Reply #7 on: October 04, 2017, 10:53:44 »

Do 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.
Logged