[fpc-devel] OpenGL 3.3 Core

Michalis Kamburelis michalis.kambi at gmail.com
Fri May 26 11:51:43 CEST 2017


2017-05-21 22:38 GMT+02:00 Mathias <m_burkhard at gmx.ch>:
> Is there an option with Lazarus own board means to activate the OpenGL 3.3
> core mode. Or is it enough for me to do the following?
>
>   OpenGLControl.OpenGLMajorVersion := 3;
>   OpenGLControl.OpenGLMinorVersion := 3;
>

These TOpenGLControl properties are passed to the underlying API to
indicate that you want a context that supports this specific OpenGL
version. So, yes, this is the way to get OpenGL 3.3 context.

However, it's not implemented on all platforms. As far as I see, only
the GTK widgetset actually uses the Major/MinorVersion, other
widgetsets simply ignore it.

But in practice, you will also get a 3.3 context without requesting
it, if your OpenGL supports it, and it has ARB_compatibility. See
https://www.khronos.org/opengl/wiki/Core_And_Compatibility_in_Contexts
about the gory details.

Regards,
Michalis



More information about the fpc-devel mailing list