[fpc-pascal] How to use OpenGL 2.0 features
Michalis Kamburelis
michalis.kambi at gmail.com
Sun May 10 22:40:59 CEST 2009
Lord Satan wrote:
> On Sun, 10 May 2009 18:46:26 +0400 dmitry boyarintsev
> <skalogryz.lists at gmail.com> wrote:
>
>>> So it looks like I have to init all OpenGL versions from 1.2 to
>>> 2.0 to make sure that all OpenGL 2.0 core functions are
>>> initialized. Is this true?
>> Judging from glext, it's true.
> This makes no sense to me. I can submit a patch so that all lower
> version functions are loaded when the higher version is loaded (hope
> it is understood what I mean). I already modified the glext file and
> just want to know if there is any interest or if the current
> behaviour has any advantages I fail to see.
>
You mean you want to change Load_GL_version_2_0 to also call
Load_GL_version_1_5 under the hood, and then Load_GL_version_1_5 to call
Load_GL_version_1_4 under the hood and so on? I guess that's Ok, go for it.
Be aware that this will *not* work for OpenGL 3.x versions, where 3.0
deprecates and 3.1 removes some functions. Since 3.1, OpenGL versions
are *not* guaranteed to be backwards compatible. Programmer will have to
call Load_GL_version_3_1 and Load_GL_version_2_0 (or check
ARB_compatibility) separately, since these are orthogonal.
I guess this is the advantage of current approach: it doesn't assume
that OpenGL versions are backwards compatible, and indeed they don't
have to be since 3.1.
But for GL 2.x and lower, sure, this will work fine.
Michalis
More information about the fpc-pascal
mailing list