[osg-users] EXTERNAL: Re: Where is CreateContextAttribs() being used?

Chris Hanson xenon at alphapixel.com
Thu Apr 11 06:19:13 PDT 2019


This is correct.

If your application is GL3 context compatible, you can create a GL3 context
and then RenderDoc should be happier.

On Thu, Apr 11, 2019 at 3:08 PM Lionel Lagarde <lionel.lagarde at oktal-se.fr>
wrote:

> Hi,
>
> Win32 is the name for all the Windows windowing systems. It is used on all
> Windows (XP, 7, 10...) and on all targets (32, 64). So the
> function is used.
>
> If I remember correctly, the function is used only for >= GL3 contexts.
>
>
> On 11/04/2019 14:51, Rowley, Marlin R wrote:
>
> We are using Win10-x64.
>
>
>
> We are trying to get RenderDoc to be able to see our application so we can
> do some graphics debugging.  It’s shouting back that the current device
> context wasn’t created using CreateContextAttrib, so I started looking. So
> since we are using Win64, doesn’t look like osg will go the WindowWin32
> route. Hmm…
>
>
>
> How are you debugging the GPU?  It’s incredibly difficult trying to solve
> realtime pipeline problems without the use of a graphics debugger.
>
>
>
> ----------------------------------------
>
> Marlin Rowley
>
> Software Engineer, Staff
>
> [image: cid:image002.jpg at 01D39374.DEC5A2E0]
>
> *Missiles and Fire Control*
>
> 972-603-1931 (office)
>
> 214-926-0622 (mobile)
>
> marlin.r.rowley at lmco.com
>
>
>
> *From:* osg-users <osg-users-bounces at lists.openscenegraph.org>
> <osg-users-bounces at lists.openscenegraph.org> *On Behalf Of *Robert Osfield
> *Sent:* Thursday, April 11, 2019 7:16 AM
> *To:* OpenSceneGraph Users <osg-users at lists.openscenegraph.org>
> <osg-users at lists.openscenegraph.org>
> *Subject:* EXTERNAL: Re: [osg-users] Where is CreateContextAttribs()
> being used?
>
>
>
> Hi Marlin,
>
>
>
> A great for CreateContextttribs in the OSG shows:
>
>
>
> $ grep -r CreateContextAttribs .
> Binary file ./lib/libosgViewer.so.3.6.4 matches
> Binary file
> ./src/osgViewer/CMakeFiles/osgViewer.dir/GraphicsWindowX11.cpp.o matches
> ./src/osgViewer/GraphicsWindowX11.cpp:        typedef GLXContext
> (*glXCreateContextAttribsARBProc)(Display*, GLXFBConfig, GLXContext, Bool,
> const int*);
> ./src/osgViewer/GraphicsWindowX11.cpp:
> glXCreateContextAttribsARBProc glXCreateContextAttribsARB = 0;
> ./src/osgViewer/GraphicsWindowX11.cpp:
> glXCreateContextAttribsARB = (glXCreateContextAttribsARBProc)
> glXGetProcAddress((const GLubyte*)"glXCreateContextAttribsARB");
> ./src/osgViewer/GraphicsWindowX11.cpp:        if
> (glXCreateContextAttribsARB)
> ./src/osgViewer/GraphicsWindowX11.cpp:            _context =
> glXCreateContextAttribsARB( _display, _fbConfig, sharedContext, True,
> contextAttributes.data() );
> ./src/osgViewer/GraphicsWindowWin32.cpp:extern HGLRC WINAPI
> wglCreateContextAttribsARB (HDC, HGLRC, const int *);
> ./src/osgViewer/GraphicsWindowWin32.cpp:
> PFNWGLCREATECONTEXTATTRIBSARBPROC wglCreateContextAttribsARB =
> ./src/osgViewer/GraphicsWindowWin32.cpp:                (
> PFNWGLCREATECONTEXTATTRIBSARBPROC ) wglGetProcAddress(
> "wglCreateContextAttribsARB" );
> ./src/osgViewer/GraphicsWindowWin32.cpp:            if(
> wglCreateContextAttribsARB==0 )
> ./src/osgViewer/GraphicsWindowWin32.cpp:
> reportErrorForScreen( "GL3: wglCreateContextAttribsARB not available.",
> ./src/osgViewer/GraphicsWindowWin32.cpp:                context =
> wglCreateContextAttribsARB( _hdc, 0, attribs );
> ./src/osgViewer/GraphicsWindowWin32.cpp:
> reportErrorForScreen( "GL3: wglCreateContextAttribsARB returned NULL.",
>
>
>
> So only X11 and Win32.  What platform are you using?
>
>
>
> Robert.
>
>
>
>
>
>
>
> On Thu, 11 Apr 2019 at 00:32, Rowley, Marlin R <marlin.r.rowley at lmco.com>
> wrote:
>
> We are trying to run the graphics debugger called ‘RenderDoc’.  It’s
> spitting out an error message after we create a window and it’s device
> context.  I’ve been looking through the osg code to find a function called
> CreateContextAttribs().  I can’t seem to locate it. My idea is to override
> where it’s used or refactor something into the code where we can call the
> function ourselves.
>
>
>
> In the meantime, I’m setting the traits->glContextVersion = “3.3” in our
> graphics application but RenderDoc is still shouting “Context not created
> via CreateContextAttribs.  Capturing disabled.”
>
>
>
> -M
>
>
>
> ----------------------------------------
>
> Marlin Rowley
>
> Software Engineer, Staff
>
> [image: cid:image002.jpg at 01D39374.DEC5A2E0]
>
> *Missiles and Fire Control*
>
> 972-603-1931 (office)
>
> 214-926-0622 (mobile)
>
> marlin.r.rowley at lmco.com
>
>
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
> _______________________________________________
> osg-users mailing listosg-users at lists.openscenegraph.orghttp://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>


-- 
Chris 'Xenon' Hanson, omo sanza lettere. Xenon at AlphaPixel.com
http://www.alphapixel.com/
Training • Consulting • Contracting
3D • Scene Graphs (Open Scene Graph/OSG) • OpenGL 2 • OpenGL 3 • OpenGL 4 •
GLSL • OpenGL ES 1 • OpenGL ES 2 • OpenCL
Legal/IP • Forensics • Imaging • UAVs • GIS • GPS •
osgEarth • Terrain • Telemetry • Cryptography • LIDAR • Embedded • Mobile •
iPhone/iPad/iOS • Android
@alphapixel <https://twitter.com/alphapixel> facebook.com/alphapixel (775)
623-PIXL [7495]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20190411/347306aa/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 3114 bytes
Desc: not available
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20190411/347306aa/attachment-0001.jpg>


More information about the osg-users mailing list