Was hat das genau zu bedeuten?



  • PFNWGLCREATECONTEXTATTRIBSARBPROC wglCreateContextAttribsARB = reinterpret_cast<PFNWGLCREATECONTEXTATTRIBSARBPROC>(wglGetProcAddress("wglCreateContextAttribsARB")); 
            if (wglCreateContextAttribsARB) 
            { 
                int attributes[] = 
                { 
                    WGL_CONTEXT_MAJOR_VERSION_ARB, mySettings.MajorVersion, 
                    WGL_CONTEXT_MINOR_VERSION_ARB, mySettings.MinorVersion, 
                    WGL_CONTEXT_PROFILE_MASK_ARB, WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB, 
                    0, 0 
                }; 
                myContext = wglCreateContextAttribsARB(myDeviceContext, sharedContext, attributes); 
            }
    

    Was macht dieses Stück Code und ist es für Linux überhaupt interessant?
    Immerhin habe ich mit WGL Windows Graphics Library im Kopf



  • Die Adresse der Funktion wglCreateContextAttribsARB wird dem entsprechenden Funktionspointer zugewiesen und dann mit dieser Funktion ein RenderContext erstellt (Version mySettings.MajorVersion.mySettings.MinorVersion im compatibility-profile).

    Für dich eher uninteressant wenn du nicht mit Windows arbeitest (WGL = Windows Graphics Library). Allerdings kann ich dir nun auch nicht sagen wie die entsprechende Funktion bei dir heissen müsste (vermutlich glXCreateContext).

    Einfach mal nach GLX RenderContext oder sowas googeln.
    Vlt findest du auch unter Utah-GLX brauchbare Informationen.


Anmelden zum Antworten