Hi Andrers,

On Thu, 8 Apr 2021 at 07:08, Anders Backman <[email protected]> wrote:

> Just noticed that it is not possible to toggle the
> setUseVertexAttributeAliasing after a viewer has been realized and
> frame/run has been called and any text is involved in the scene. The
> attached code is a modified osgViewer that will reproduce the issue. If 's'
> (statistics) is shown after the call to  setUseVertexAttributeAliasing
> (start the application and press 's'), I get a call stack, meaning it is
> not possible to toggle this feature while an application is being run. Is
> that intentional?
> Actually, when to call this method during initialization of an OSG
> application seems to be a delicate choice.
>

The OSG tries to bridge the modern shaders and the deprecated fixed
function realms on OpenGL usage, it's not an easy trick to manage,
especially once you start getting into GL core profile builds and GLES2
onwards.  The OSG grew up from a fixed function only scene graph and
"evolved" into way it today attempts to straddle the requirements of GL
core profile and fixed function pipeline.  The way it's ended up straddling
the two is a bit adhoc in places, largely as it's an near impossible trick
to pull off seamlessly.

So what you are seeing is a limit of design and implement decisions
associated with trying to bridge this gap, having the OSG toggle between
different ways of handling the state it can assume to be in during flight
is not something is designed to do.




> Also, this design where you switch this via the context, means that you
> cannot have any Fixed pipeline path in your application.
>

This is a limit impossible by OpenGL itself, you simply can't mix and match
if you build the OSG and/or create a GL core profile context then you have
to use shaders for everything.

The only way way to mix in this case would be to have to graphics contexts
and copy depth/colour buffer data between the two to composite a final
result.



> So if I would like to have one part of the graph being rendered
> "shader-free" and another with shaders, applying these properties will
> effectively break the "shader-free" part.
>
> I am running OSG 3.6.4 on Windows 10
>

The OSG can handle scene graphs with fixed function and shaders but you
should build the OSG with standard fixed function enabled and just have the
subgraphs you want shaders on, don't attempt to toggle high level
settings.

I would recommend using OSG-3.6.5 or the 3.6 branch as there are various
fixes in 3.6.5.

Robert.

-- 
You received this message because you are subscribed to the Google Groups 
"OpenSceneGraph Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/osg-users/CAFN7Y%2BWQLeTas%3D7aMOC0D_E9-3TA%3DcFjc3RnFmgm8fFc3m47Mw%40mail.gmail.com.

Reply via email to