Strange Issues regarding aliases

Steven Schveighoffer via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Jun 14 09:08:03 PDT 2016


On 6/14/16 11:29 AM, Joerg Joergonson wrote:
> I have stuff like
>
>
> public static class fGL
> {
>     nothrow @nogc extern(System)
>     {
>         alias CullFace = void function(tGL.Enum);
>         alias FrontFace = void function(tGL.Enum);
>         alias HInt = void function(tGL.Enum, tGL.Enum);
>         alias LineWidth = void function(tGL.Float);
>         alias PoIntSize = void function(tGL.Float);
>                 ...

Your aliases are a bunch of function pointer types. This isn't what you 
likely want.

I'm assuming you want to bring the existing functions into more 
categorized namespaces? What you need is to do this:

public static struct fGL
{
    alias CullFace = .CullFace; // or whatever the fully qualified name is.

I don't have much experience with the opengl modules, so I can't be more 
specific.

-Steve


More information about the Digitalmars-d-learn mailing list