OpenGL Version of JUCE on windows?


#1

Hi,

Sorry for a naive questions, but i was wondering if its possible to take advantage of the latest OpenGL api ie 4.5 with juce library on windows, offcourse it means that my GPU and graphics driver should support that version of API (it does). 

Also, does the defaultGLVersion in juce refer to the latest version supported by my graphics driver?

Thanks,


#2

ie 4.5 with juce library on windows, offcourse it means that my GPU and graphics driver should support that version of API (it does). 

That is far from sound logic: because your driver supports something recent will definitely not mean everybody else's does! The range of cards and drivers still in use is massive on Windows - so you have to wisely pick your API based on your target market!

Sorry for a naive questions, but i was wondering if its possible to take advantage of the latest OpenGL api

If JUCE doesn't have the functions you need already loaded for you, you can load them manually.

For whatever JUCE loads, see OpenGLExtensionFunctions (https://www.juce.com/doc/classOpenGLContext#a3e204724fd78bbc272023525226caad7)

The OpenGLHelpers::getExtensionFunction method will load OpenGL functions for you, or return nullptr if they're not available.

You should be able to add JUCE_OPENGL3=1 as macro to your Windows project in order to work with whatever functions JUCE's loads that are OpenGL 3.


#3

I understand that if any other machine does not support that that API version, then the app might crash there, but as of now i only care that on my machine which has that latest driver, I should be able to take advantage of it.

If JUCE doesn't have the functions you need already loaded for you, you can load them manually

Looks like its doable. Thanks!