OpenSceneGraph Forum Forum Index OpenSceneGraph Forum
Official forum which mirrors the existent OSG mailing lists. Messages posted here are forwarded to the mailing list and vice versa.
 
   FAQFAQ    SearchSearch    MemberlistMemberlist    RulesRules    UsergroupsUsergroups    RegisterRegister 
 Mail2Forum SettingsMail2Forum Settings  ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
   AlbumAlbum  OpenSceneGraph IRC ChatOpenSceneGraph IRC Chat   SmartFeedSmartFeed 

EXTERNAL: Re: EXTERNAL: Re: Where is CreateContextAttribs() being used?


 
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> General
View previous topic :: View next topic  
Author Message
Rowley, Marlin R
Guest





PostPosted: Thu Apr 11, 2019 2:25 pm    Post subject:
EXTERNAL: Re: EXTERNAL: Re: Where is CreateContextAttribs() being used?
Reply with quote

Sebastian,

What does “core OpenGL profile” mean with regards to the graphics context? I’m still not getting it to work.

Here is my code structure:


osg::ref_ptr<osg::GraphicsContext::Traits> traits = new osg::GraphicsContext::Traits;
traits->x = aXPosition;
traits->y = aYPosition;
traits->width = aWidth;
traits->height = aHeight;
traits->stencil = 8;
traits->doubleBuffer = true;
traits->windowDecoration = false;
#if defined(WIN32)
traits->inheritedWindowData = new osgViewer::GraphicsWindowWin32::WindowData( aWindow );
#elif defined(__linux__)
traits->inheritedWindowData = new osgViewer::GraphicsWindowX11::WindowData( aWindow );
#endif
// gl graphics context version and profile mask
traits->glContextVersion = "3.3";
traits->glContextProfileMask = 0x1;

// create the graphics window from the context
osgViewer::GraphicsWindow* gw = dynamic_cast<osgViewer::GraphicsWindow*>(osg::GraphicsContext::createGraphicsContext(traits.get()));



// set the main camera to use the window
mainCamera->setGraphicsContext( gw );



I assume here that setting the traits variable with the major/minor version of OpenGL and setting the profile mask to 1 (‘core’??) would be all I need. But that’s obviously not the case.

-M

----------------------------------------
Marlin Rowley
Software Engineer, Staff

Missiles and Fire Control
972-603-1931 (office)
214-926-0622 (mobile)
(
Only registered users can see emails on this board!
Get registred or enter the forums!
)


From: osg-users <> On Behalf Of
Sent: Thursday, April 11, 2019 9:01 AM
To: 'OpenSceneGraph Users' <>
Subject: EXTERNAL: Re: EXTERNAL: Re: Where is CreateContextAttribs() being used?



Hi Marlin,

In order for RenderDoc (and most tools I’m aware of) you’re application needs to run on core OpenGL profile.
You might want to look here for some debugging options: https://www.khronos.org/opengl/wiki/Debugging_Tools
I personally used Nvidia Nsight for quite a while, as it at least helps with framebuffer debugging etc.

Cheers
Sebastian


From: osg-users < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> On Behalf Of Rowley, Marlin R
Sent: Donnerstag, 11. April 2019 14:52
To: OpenSceneGraph Users < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)>
Subject: Re: EXTERNAL: Re: Where is CreateContextAttribs() being used?



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

Missiles and Fire Control
972-603-1931 (office)
214-926-0622 (mobile)
(
Only registered users can see emails on this board!
Get registred or enter the forums!
)

From: osg-users < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> On Behalf Of Robert Osfield
Sent: Thursday, April 11, 2019 7:16 AM
To: OpenSceneGraph Users < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)>
Subject: EXTERNAL: Re: 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 < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:
Quote:

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

Missiles and Fire Control
972-603-1931 (office)
214-926-0622 (mobile)
(
Only registered users can see emails on this board!
Get registred or enter the forums!
)



_______________________________________________
osg-users mailing list
(
Only registered users can see emails on this board!
Get registred or enter the forums!
)
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


------------------
Post generated by Mail2Forum
Back to top
Chris Hanson
Guest





PostPosted: Thu Apr 11, 2019 2:41 pm    Post subject:
EXTERNAL: Re: EXTERNAL: Re: Where is CreateContextAttribs() being used?
Reply with quote

Core profile has none of the backward compatibility features:https://www.khronos.org/opengl/wiki/OpenGL_Context#OpenGL_3.2_and_Profiles 


I'm guessing you won't have much luck getting your application to work in that limited situation.

------------------
Post generated by Mail2Forum
Back to top
SMesserschmidt (Sebastian Messerschmidt)
Forum Moderator


Joined: 10 Sep 2013
Posts: 826

PostPosted: Thu Apr 11, 2019 2:50 pm    Post subject:
EXTERNAL: Re: EXTERNAL: Re: Where is CreateContextAttribs() being used?
Reply with quote

Merlin,

As Chris already mentioned the complete application needs to run on core-profile. That means there is no fixed function pipeline and no backward-compatibility features.
In order to get your application running in core-profile you need to write shaders for everything and IIRC compile OSG with GL3 enabled. I haven’t used OSG in a while now, but I think there is mechanism to decorate the scene graph with shaders automatically.

I started to refactor my project some years ago to fully support core-only scenarios, but I gave up due to a lot features no longer working out-of-the-box.
Can you maybe try to explain what you’re trying to debug? There might be some more options for you.


Cheers
Sebastian

From: osg-users <> On Behalf Of Rowley, Marlin R
Sent: Donnerstag, 11. April 2019 16:24
To: OpenSceneGraph Users <>
Subject: Re: EXTERNAL: Re: EXTERNAL: Re: Where is CreateContextAttribs() being used?



Sebastian,

What does “core OpenGL profile” mean with regards to the graphics context? I’m still not getting it to work.

Here is my code structure:


osg::ref_ptr<osg::GraphicsContext::Traits> traits = new osg::GraphicsContext::Traits;
traits->x = aXPosition;
traits->y = aYPosition;
traits->width = aWidth;
traits->height = aHeight;
traits->stencil = 8;
traits->doubleBuffer = true;
traits->windowDecoration = false;
#if defined(WIN32)
traits->inheritedWindowData = new osgViewer::GraphicsWindowWin32::WindowData( aWindow );
#elif defined(__linux__)
traits->inheritedWindowData = new osgViewer::GraphicsWindowX11::WindowData( aWindow );
#endif
// gl graphics context version and profile mask
traits->glContextVersion = "3.3";
traits->glContextProfileMask = 0x1;

// create the graphics window from the context
osgViewer::GraphicsWindow* gw = dynamic_cast<osgViewer::GraphicsWindow*>(osg::GraphicsContext::createGraphicsContext(traits.get()));



// set the main camera to use the window
mainCamera->setGraphicsContext( gw );



I assume here that setting the traits variable with the major/minor version of OpenGL and setting the profile mask to 1 (‘core’??) would be all I need. But that’s obviously not the case.

-M

----------------------------------------
Marlin Rowley
Software Engineer, Staff

Missiles and Fire Control
972-603-1931 (office)
214-926-0622 (mobile)
(
Only registered users can see emails on this board!
Get registred or enter the forums!
)


From: osg-users < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> On Behalf Of (
Only registered users can see emails on this board!
Get registred or enter the forums!
)
Sent: Thursday, April 11, 2019 9:01 AM
To: 'OpenSceneGraph Users' < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)>
Subject: EXTERNAL: Re: EXTERNAL: Re: Where is CreateContextAttribs() being used?



Hi Marlin,

In order for RenderDoc (and most tools I’m aware of) you’re application needs to run on core OpenGL profile.
You might want to look here for some debugging options: https://www.khronos.org/opengl/wiki/Debugging_Tools
I personally used Nvidia Nsight for quite a while, as it at least helps with framebuffer debugging etc.

Cheers
Sebastian


From: osg-users < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> On Behalf Of Rowley, Marlin R
Sent: Donnerstag, 11. April 2019 14:52
To: OpenSceneGraph Users < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)>
Subject: Re: EXTERNAL: Re: Where is CreateContextAttribs() being used?



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

Missiles and Fire Control
972-603-1931 (office)
214-926-0622 (mobile)
(
Only registered users can see emails on this board!
Get registred or enter the forums!
)

From: osg-users < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> On Behalf Of Robert Osfield
Sent: Thursday, April 11, 2019 7:16 AM
To: OpenSceneGraph Users < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)>
Subject: EXTERNAL: Re: 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 < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:
Quote:

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

Missiles and Fire Control
972-603-1931 (office)
214-926-0622 (mobile)
(
Only registered users can see emails on this board!
Get registred or enter the forums!
)



_______________________________________________
osg-users mailing list
(
Only registered users can see emails on this board!
Get registred or enter the forums!
)
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
gwaldron (Glenn Waldron)
Appreciator


Joined: 25 Aug 2011
Posts: 240

PostPosted: Mon Apr 15, 2019 7:35 pm    Post subject:
EXTERNAL: Re: EXTERNAL: Re: Where is CreateContextAttribs() being used?
Reply with quote

Here's a quick reference for building OSG (and osgEarth) for GL CORE... may be helpful.Glenn Waldron







On Thu, Apr 11, 2019 at 10:49 AM Sebastian Messerschmidt < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:

Quote:

Merlin,
 
As Chris already mentioned the complete application needs to run on core-profile. That means there is no fixed function pipeline and no backward-compatibility features.
In order to get your application running in core-profile you need to write shaders for everything and IIRC compile OSG with GL3 enabled. I haven’t used OSG in a while now, but I think there is mechanism to decorate the scene graph with shaders automatically.
 
I started to refactor my project some years ago to fully support core-only scenarios, but I gave up due to a lot features no longer working out-of-the-box.
Can you maybe try to explain what you’re trying to debug? There might be some more options for you.
 
 
Cheers
Sebastian
 
From: osg-users < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> On Behalf Of Rowley, Marlin R
Sent: Donnerstag, 11. April 2019 16:24
To: OpenSceneGraph Users < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)>
Subject: Re: EXTERNAL: Re: EXTERNAL: Re: Where is CreateContextAttribs() being used?


 
Sebastian,
 
What does “core OpenGL profile” mean with regards to the graphics context?  I’m still not getting it to work. 
 
Here is my code structure:
 

osg::ref_ptr<osg::GraphicsContext::Traits> traits = new osg::GraphicsContext::Traits;
            traits->x = aXPosition;
            traits->y = aYPosition;
            traits->width  = aWidth;
            traits->height = aHeight;
            traits->stencil = 8;
            traits->doubleBuffer     = true;
            traits->windowDecoration = false;
#if defined(WIN32)
            traits->inheritedWindowData = new osgViewer::GraphicsWindowWin32::WindowData( aWindow );
#elif defined(__linux__)
           traits->inheritedWindowData = new osgViewer::GraphicsWindowX11::WindowData( aWindow );
#endif
            // gl graphics context version and profile mask
            traits->glContextVersion = "3.3";
            traits->glContextProfileMask = 0x1;
 
// create the graphics window from the context
            osgViewer::GraphicsWindow* gw = dynamic_cast<osgViewer::GraphicsWindow*>(osg::GraphicsContext::createGraphicsContext(traits.get()));
 

 
// set the main camera to use the window
mainCamera->setGraphicsContext( gw );
 

 
I assume here that setting the traits variable with the major/minor version of OpenGL and setting the profile mask to 1 (‘core’??) would be all I need.  But that’s obviously not the case.
 
-M
 
----------------------------------------
Marlin Rowley
Software Engineer, Staff

Missiles and Fire Control
972-603-1931 (office)
214-926-0622 (mobile)
(
Only registered users can see emails on this board!
Get registred or enter the forums!
)

 
From: osg-users < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> On Behalf Of (
Only registered users can see emails on this board!
Get registred or enter the forums!
)
Sent: Thursday, April 11, 2019 9:01 AM
To: 'OpenSceneGraph Users' < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)>
Subject: EXTERNAL: Re: EXTERNAL: Re: Where is CreateContextAttribs() being used?


 
Hi Marlin,
 
In order for RenderDoc (and most tools I’m aware of) you’re application needs to run on core OpenGL profile.
You might want to look here for some debugging options: https://www.khronos.org/opengl/wiki/Debugging_Tools
I personally used Nvidia Nsight for quite a while, as it at least helps with framebuffer debugging etc.
 
Cheers
Sebastian
 
 
From: osg-users < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> On Behalf Of Rowley, Marlin R
Sent: Donnerstag, 11. April 2019 14:52
To: OpenSceneGraph Users < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)>
Subject: Re: EXTERNAL: Re: Where is CreateContextAttribs() being used?


 
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

Missiles and Fire Control
972-603-1931 (office)
214-926-0622 (mobile)
(
Only registered users can see emails on this board!
Get registred or enter the forums!
)
 
From: osg-users < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> On Behalf Of Robert Osfield
Sent: Thursday, April 11, 2019 7:16 AM
To: OpenSceneGraph Users < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)>
Subject: EXTERNAL: Re: 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 < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:
Quote:

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

Missiles and Fire Control
972-603-1931 (office)
214-926-0622 (mobile)
(
Only registered users can see emails on this board!
Get registred or enter the forums!
)
 


_______________________________________________
osg-users mailing list
(
Only registered users can see emails on this board!
Get registred or enter the forums!
)
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org



_______________________________________________
osg-users mailing list
(
Only registered users can see emails on this board!
Get registred or enter the forums!
)
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
gwaldron (Glenn Waldron)
Appreciator


Joined: 25 Aug 2011
Posts: 240

PostPosted: Mon Apr 15, 2019 7:35 pm    Post subject:
EXTERNAL: Re: EXTERNAL: Re: Where is CreateContextAttribs() being used?
Reply with quote

Let's try that again:https://gist.github.com/gwaldron/a56b0e77e7fa8587b698717d21f9366d 
 Glenn Waldron







On Mon, Apr 15, 2019 at 3:33 PM Glenn Waldron < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:

Quote:
Here's a quick reference for building OSG (and osgEarth) for GL CORE... may be helpful.Glenn Waldron







On Thu, Apr 11, 2019 at 10:49 AM Sebastian Messerschmidt < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:

Quote:

Merlin,
 
As Chris already mentioned the complete application needs to run on core-profile. That means there is no fixed function pipeline and no backward-compatibility features.
In order to get your application running in core-profile you need to write shaders for everything and IIRC compile OSG with GL3 enabled. I haven’t used OSG in a while now, but I think there is mechanism to decorate the scene graph with shaders automatically.
 
I started to refactor my project some years ago to fully support core-only scenarios, but I gave up due to a lot features no longer working out-of-the-box.
Can you maybe try to explain what you’re trying to debug? There might be some more options for you.
 
 
Cheers
Sebastian
 
From: osg-users < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> On Behalf Of Rowley, Marlin R
Sent: Donnerstag, 11. April 2019 16:24
To: OpenSceneGraph Users < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)>
Subject: Re: EXTERNAL: Re: EXTERNAL: Re: Where is CreateContextAttribs() being used?


 
Sebastian,
 
What does “core OpenGL profile” mean with regards to the graphics context?  I’m still not getting it to work. 
 
Here is my code structure:
 

osg::ref_ptr<osg::GraphicsContext::Traits> traits = new osg::GraphicsContext::Traits;
            traits->x = aXPosition;
            traits->y = aYPosition;
            traits->width  = aWidth;
            traits->height = aHeight;
            traits->stencil = 8;
            traits->doubleBuffer     = true;
            traits->windowDecoration = false;
#if defined(WIN32)
            traits->inheritedWindowData = new osgViewer::GraphicsWindowWin32::WindowData( aWindow );
#elif defined(__linux__)
           traits->inheritedWindowData = new osgViewer::GraphicsWindowX11::WindowData( aWindow );
#endif
            // gl graphics context version and profile mask
            traits->glContextVersion = "3.3";
            traits->glContextProfileMask = 0x1;
 
// create the graphics window from the context
            osgViewer::GraphicsWindow* gw = dynamic_cast<osgViewer::GraphicsWindow*>(osg::GraphicsContext::createGraphicsContext(traits.get()));
 

 
// set the main camera to use the window
mainCamera->setGraphicsContext( gw );
 

 
I assume here that setting the traits variable with the major/minor version of OpenGL and setting the profile mask to 1 (‘core’??) would be all I need.  But that’s obviously not the case.
 
-M
 
----------------------------------------
Marlin Rowley
Software Engineer, Staff

Missiles and Fire Control
972-603-1931 (office)
214-926-0622 (mobile)
(
Only registered users can see emails on this board!
Get registred or enter the forums!
)

 
From: osg-users < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> On Behalf Of (
Only registered users can see emails on this board!
Get registred or enter the forums!
)
Sent: Thursday, April 11, 2019 9:01 AM
To: 'OpenSceneGraph Users' < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)>
Subject: EXTERNAL: Re: EXTERNAL: Re: Where is CreateContextAttribs() being used?


 
Hi Marlin,
 
In order for RenderDoc (and most tools I’m aware of) you’re application needs to run on core OpenGL profile.
You might want to look here for some debugging options: https://www.khronos.org/opengl/wiki/Debugging_Tools
I personally used Nvidia Nsight for quite a while, as it at least helps with framebuffer debugging etc.
 
Cheers
Sebastian
 
 
From: osg-users < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> On Behalf Of Rowley, Marlin R
Sent: Donnerstag, 11. April 2019 14:52
To: OpenSceneGraph Users < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)>
Subject: Re: EXTERNAL: Re: Where is CreateContextAttribs() being used?


 
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

Missiles and Fire Control
972-603-1931 (office)
214-926-0622 (mobile)
(
Only registered users can see emails on this board!
Get registred or enter the forums!
)
 
From: osg-users < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> On Behalf Of Robert Osfield
Sent: Thursday, April 11, 2019 7:16 AM
To: OpenSceneGraph Users < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)>
Subject: EXTERNAL: Re: 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 < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:
Quote:

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

Missiles and Fire Control
972-603-1931 (office)
214-926-0622 (mobile)
(
Only registered users can see emails on this board!
Get registred or enter the forums!
)
 


_______________________________________________
osg-users mailing list
(
Only registered users can see emails on this board!
Get registred or enter the forums!
)
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org



_______________________________________________
osg-users mailing list
(
Only registered users can see emails on this board!
Get registred or enter the forums!
)
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org



------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Similar Topics
Topic Author Forum Replies Posted
No new posts EXTERNAL: Re: EXTERNAL: Re: EXTERNAL:... Rowley, Marlin R General 1 Thu Apr 11, 2019 3:47 pm View latest post
No new posts EXTERNAL: Re: Where is CreateContextA... Rowley, Marlin R General 3 Thu Apr 11, 2019 12:52 pm View latest post
No new posts Where is CreateContextAttribs() being... Rowley, Marlin R General 1 Wed Apr 10, 2019 7:57 pm View latest post
No new posts EXTERNAL: Re: EXTERNAL: Re: Texture u... Rowley, Marlin R General 1 Thu Mar 14, 2019 5:56 pm View latest post
No new posts EXTERNAL: Re: Texture unit not turni... Rowley, Marlin R General 1 Thu Mar 14, 2019 2:06 pm View latest post


Board Security Anti Bot Question MOD - phpBB MOD against Spam Bots
Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP