[osg-users] Why are state attributes applied when they are off?

OpenSceneGraph Users osg-users at lists.openscenegraph.org
Fri Apr 3 05:21:05 PDT 2020


Hello all!

I’m not sure I totally understand what I’m currently doing.  

I’m trying to make one of our models displayable only with the “core” 
profile (using 3.3, 4.2, etc.), I seem to be able to build OSG for that 
(e.g., the code that is in ’OSG_GL_FIXED_FUNCTION_AVAILABLE’ defines is 
correctly left out), and create contexts for 3.3+.

I’m using the osgsimplegl3 example as a basis, and one of the simple models 
that we have here (converted to osgt for my tests). 

Now, my test model contains stuff like “quads,” which I managed to remove 
manually (for now, will fix that later), and it also contains attributes 
like
osg::Material {
    UniqueID 4 
    Name "default" 
    Ambient  TRUE Front 0.50 0.50 0.50 1 Back 0.50 0.50 0.50 1 
    Diffuse  TRUE Front 0.91 0.91 0.91 1 Back 0.91 0.91 0.91 1 
    Specular TRUE Front 0.72 0.72 0.72 1 Back 0.72 0.72 0.72 1 
    Emission TRUE Front 0 0 0 1 Back 0 0 0 1 
    Shininess TRUE Front 10 Back 10 
  }
  Value OFF
osg::TexEnv {
    UniqueID 8 
  }
  Value OFF 


When I run the example, I get errors like those:

Warning: Material::apply(State&) - not supported.
Warning: TexEnv::apply(State&) - not supported.

Looking at the code, this indicates that it’s an “error” caught by OSG, and 
it doesn’t call the OpenGL API.

Now, I’m wondering, if the Value is OFF (and it also appears to be off when 
I debug the code), why is the attribute applied anyway? What would I need 
to do to have the attribute not applied?

Thanks!

I'm using OSG 3.6.3.

--
Vaillancourt

-- 
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 osg-users+unsubscribe at googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/osg-users/82b35a1a-e591-4187-9883-d3710400e851%40googlegroups.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20200403/211346de/attachment.html>


More information about the osg-users mailing list