Discussion:
[osg-users] MacOSX/Core Profile: Attribute aliasing behavior ?
Remo Eichenberger
2018-07-31 08:27:11 UTC
Permalink
Hi folks,

Can someone please explain me why OpenGL on MacOSX (Core Profile 4.1) throw the following error:


Code:
ERROR: Active attribute aliasing. Slot 3 unavailable for 'osg_MultiTexCoord0' from BindAttributeLocation request.



on the following sample:

https://github.com/remoe/osgsample-2

When one remove the default shader from OSG:

https://github.com/remoe/osgsample-2/blob/master/main.cpp#L205

with "#if 0", Then it doesn't throw an error on MacOSX.

This sample doesn't throw an error on windows.

Thank you!

Cheers,
Remo

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=74435#74435
Julien Valentin
2018-07-31 21:41:53 UTC
Permalink
With core profile you must use strict syntax...
see simpleGL3 example
Post by Remo Eichenberger
Hi folks,
ERROR: Active attribute aliasing. Slot 3 unavailable for 'osg_MultiTexCoord0' from BindAttributeLocation request.
https://github.com/remoe/osgsample-2
https://github.com/remoe/osgsample-2/blob/master/main.cpp#L205
with "#if 0", Then it doesn't throw an error on MacOSX.
This sample doesn't throw an error on windows.
Thank you!
Cheers,
Remo
------------------------
Twirling twirling twirling toward freedom

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=74447#74447
Remo Eichenberger
2018-07-31 22:13:05 UTC
Permalink
Julien, thanks for your hint, but i don't know what you mean :) I've look at this sample:

https://github.com/openscenegraph/OpenSceneGraph/blob/master/examples/osgsimplegl3/osgsimplegl3.cpp


Cheers,
Remo

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=74448#74448
Julien Valentin
2018-08-01 03:58:44 UTC
Permalink
Sorry but it seams to me the question was answered a lot of time on the forum..
core gl context have dropped the standard fixed pipeline so in core context glsl you must define all your variable as old built-in (gl_XXX) have been removed.
osg wraps them in osg_XXX but you may define your own vertex attribute array and use Program::addBindAttributeLocation to connect to your Shader
Cheers
Post by Remo Eichenberger
https://github.com/openscenegraph/OpenSceneGraph/blob/master/examples/osgsimplegl3/osgsimplegl3.cpp
Cheers,
Remo
------------------------
Twirling twirling twirling toward freedom

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=74449#74449
Remo Eichenberger
2018-08-01 17:21:33 UTC
Permalink
Post by Julien Valentin
Sorry but it seams to me the question was answered a lot of time on the forum..
core gl context have dropped the standard fixed pipeline so in core context glsl you must define all your variable as old built-in (gl_XXX) have been removed.
Thanks, my fault :) I've fixed this. Now i can reproduce it with SECOND_COLORS attribute index. OSG select '3' for 'osg_MultiTexCoord0' even though it's used. This is wrong? But this is not exactly what i will reproduce.

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=74453#74453
Julien Valentin
2018-08-01 17:46:04 UTC
Permalink
Hi
In core context, osg wraps deprecated arrays (Vertex,Normal) to vertex array attributes that's why a few are reserved for this purpose (VertexArrayAttrib 0 to 5 If i remember).
It can appears wrong but it's the choice made to preserve both gl compatibility and osg semantic.
Cheers
Post by Remo Eichenberger
Post by Julien Valentin
Sorry but it seams to me the question was answered a lot of time on the forum..
core gl context have dropped the standard fixed pipeline so in core context glsl you must define all your variable as old built-in (gl_XXX) have been removed.
Thanks, my fault :) I've fixed this. Now i can reproduce it with SECOND_COLORS attribute index. OSG select '3' for 'osg_MultiTexCoord0' even though it's used. This is wrong? But this is not exactly what i will reproduce.
------------------------
Twirling twirling twirling toward freedom

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=74454#74454

Loading...