Strange Issues regarding aliases

Alex Parrill via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Jun 14 13:53:48 PDT 2016


On Tuesday, 14 June 2016 at 17:37:40 UTC, Joerg Joergonson wrote:
> On Tuesday, 14 June 2016 at 17:34:42 UTC, Joerg Joergonson 
> wrote:
>>> This is how derelict does it, I simply moved them in to the 
>>> class for simplicity.
>>
>> I mean glad: http://glad.dav1d.de/
>
> It seems that a loader is required for some reason and that 
> possibly could be one or both of the problems.

You absolutely need a loader to load most opengl functions. They 
are not usually exposed in the shared object, as gl function 
pointers are tied to a specific opengl context.

You are trying to call function pointer types, which is invalid. 
You need to declare some variable with the type, load the 
function pointer into the variable (platform specific; there are 
plenty of tutorials on how to do this in C), and call that 
variable.


(Also I disagree that separating the opengl API based on what the 
symbol is is a step up from the "ancient and backwards flat 
access" way. Functions are, by neccessity, coupled to the types 
and enums they take. A better categorization would be based on 
version introduced or extension, iirc jogl does that)


More information about the Digitalmars-d-learn mailing list