Re: [osg-users] MacOSX/Core Profile: Attribute aliasing behavior ?

2018-08-01 Thread Julien Valentin
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


remoe wrote:
> 
> mp3butcher wrote:
> > 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





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] MacOSX/Core Profile: Attribute aliasing behavior ?

2018-08-01 Thread Remo Eichenberger


mp3butcher wrote:
> 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





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] MacOSX/Core Profile: Attribute aliasing behavior ?

2018-07-31 Thread 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. 
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


remoe wrote:
> 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



Twirling twirling twirling toward freedom

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





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] MacOSX/Core Profile: Attribute aliasing behavior ?

2018-07-31 Thread Remo Eichenberger
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





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] MacOSX/Core Profile: Attribute aliasing behavior ?

2018-07-31 Thread Julien Valentin
With core profile you must use strict syntax...
see simpleGL3 example



remoe wrote:
> 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



Twirling twirling twirling toward freedom

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





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] MacOSX/Core Profile: Attribute aliasing behavior ?

2018-07-31 Thread Remo Eichenberger
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





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org