<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - wglCreateContextAttribsARB is missing in software rasterizer and does not work properly in gallium gdi target either"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=75779">75779</a>
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>mesa-dev@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>wglCreateContextAttribsARB is missing in software rasterizer and does not work properly in gallium gdi target either
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>major
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Windows (All)
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>turboloops@gmail.com
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>x86 (IA32)
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>10.0
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Other
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>Mesa
          </td>
        </tr></table>
      <p>
        <div>
        <pre>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,@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?</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>