[Mesa-dev] [Bug 75779] New: wglCreateContextAttribsARB is missing in software rasterizer and does not work properly in gallium gdi target either

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Tue Mar 4 15:26:16 PST 2014


https://bugs.freedesktop.org/show_bug.cgi?id=75779

          Priority: medium
            Bug ID: 75779
          Assignee: mesa-dev at lists.freedesktop.org
           Summary: wglCreateContextAttribsARB is missing in software
                    rasterizer and does not work properly in gallium gdi
                    target either
          Severity: major
    Classification: Unclassified
                OS: Windows (All)
          Reporter: turboloops at gmail.com
          Hardware: x86 (IA32)
            Status: NEW
           Version: 10.0
         Component: Other
           Product: Mesa

I have built both 10.0.1 and 10.0.3 on Windows XP and am trying to make
framebuffers work using glGenFrameBuffers. So I tried all variations with the
normal wglCreateContext but that does not work. The function is there but it
fails. The reported version is like 2.1 or something.

So now I try with wglCreateContextAttribsARB and it is not working either,
except when the version in the attribs is 2.1 or less. 

The function wglCreateContextAttribsARB is simply not there with the windows
gdi target, but is there with the gallium gdi target.

However whether a 2.1 context is created with wglCreateContextAttribsARB or
with wglCreateContext there is an error as a result of calling
glGenFrameBuffers etc...

When requesting a 3.1 context using wglCreateContextAttribsARB it returns zero
and there is no error reported.

The WGL_ARB_create_context string is nowhere to be seen, and yes I did create a
dummy context before reading in the function pointers and checking the
extensions.

I have been trying for days now to make it work and it would be really good if
even the software rasterizer can make a 3.1 context but nothing seems to be
there. Even if it does not have programs and shaders that is fine but how do
you make glGenFrameBuffers work on windows?


The code is something like this

    if Assigned(glCtx.wglCreateContextAttribsArb) then begin

      fillchar(attribs,sizeof(attribs),0);
      attribs[0] := WGL_CONTEXT_MAJOR_VERSION_ARB;
      attribs[1] := 2;
      attribs[2] := WGL_CONTEXT_MINOR_VERSION_ARB;
      attribs[3] := 1;
      attribs[4] := WGL_CONTEXT_FLAGS_ARB;
      attribs[5] := 0;
      //attribs[6] := WGL_CONTEXT_PROFILE_MASK_ARB;
      //attribs[7] := WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB;
      attribs[8] := 0;
      attribs[9] := 0;

      //temp_rc := glCtx^.wglCreateContext(dc);
      //wglMakeCurrent(dc,temp_rc);
      // These calls to glGEtIntegerV do not work either. 
      //glCtx.glGetIntegerv(GL_MAJOR_VERSION, @ver[0]);
      //glCtx.glGetIntegerv(GL_MINOR_VERSION, @ver[1]);
      //if ver[0] = 345 then throw_x;

      fRc := glCtx.wglCreateContextAttribsArb(dc,0, at attribs[0]);
      //wglMakeCurrent(dc,fRc);
      //wglMakeCurrent(0,0);
      //wglDeleteContext(temp_rc);
      //wglMakeCurrent(dc,fRc);
      //glGenFrameBuffers();
      if glCtx^.glGetError() <> 0 then
        fRc := 0;
    end;
    if fRc = 0 then begin
      fRc := glCtx^.wglCreateContext(dc);
      if (fRc = 0) then
        throw_x;
    end;


So please to save other people time if all this is not possible, change the
documentation where it says OpenGL 3.1 is supported to something like that it
in fact simply is not there. Or is it me? It says that OpenGl 3.1 is supported
but then trails off with saying you only get an OpenGL 3.1 context by
specifying one. So how does that work?

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20140304/36af8c8c/attachment.html>


More information about the mesa-dev mailing list