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 

MacOSX/Core Profile: Attribute aliasing behavior ?


 
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> General
View previous topic :: View next topic  
Author Message
remoe
User


Joined: 11 Jul 2011
Posts: 48

PostPosted: Tue Jul 31, 2018 8:27 am    Post subject:
MacOSX/Core Profile: Attribute aliasing behavior ?
Reply with quote

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
Back to top
View user's profile Send private message
mp3butcher (Julien Valentin)
Appreciator


Joined: 17 Feb 2010
Posts: 510
Location: France

PostPosted: Tue Jul 31, 2018 9:41 pm    Post subject:
Re: MacOSX/Core Profile: Attribute aliasing behavior ?
Reply with quote

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
Back to top
View user's profile Send private message Visit poster's website
remoe
User


Joined: 11 Jul 2011
Posts: 48

PostPosted: Tue Jul 31, 2018 10:13 pm    Post subject:
Reply with quote

Julien, thanks for your hint, but i don't know what you mean Smile I've look at this sample:

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


Cheers,
Remo
Back to top
View user's profile Send private message
mp3butcher (Julien Valentin)
Appreciator


Joined: 17 Feb 2010
Posts: 510
Location: France

PostPosted: Wed Aug 01, 2018 3:58 am    Post subject:
Reply with quote

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
https://www.opengl.org/discussion_boards/showthread.php/176172-choosing-Core-vs-Compatibility-contexts
Cheers

remoe wrote:
Julien, thanks for your hint, but i don't know what you mean Smile I've look at this sample:

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


Cheers,
Remo

_________________
Twirling twirling twirling toward freedom
Back to top
View user's profile Send private message Visit poster's website
remoe
User


Joined: 11 Jul 2011
Posts: 48

PostPosted: Wed Aug 01, 2018 5:21 pm    Post subject:
Reply with quote

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 Smile 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.
Back to top
View user's profile Send private message
mp3butcher (Julien Valentin)
Appreciator


Joined: 17 Feb 2010
Posts: 510
Location: France

PostPosted: Wed Aug 01, 2018 5:46 pm    Post subject:
Reply with quote

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 Smile 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
Back to top
View user's profile Send private message Visit poster's website
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 pass mat4 as attribute for glsl sirian_ye General 4 Tue Nov 27, 2018 4:58 am View latest post
No new posts Core Profile: glEnable/glDisable GL_P... Damian Dixon General 10 Sun Jul 29, 2018 1:24 pm View latest post
No new posts GL3 Profile dieslower81 General 15 Sat Jun 23, 2018 5:19 pm View latest post
No new posts RTT and Shaders using vertex attribut... moet General 0 Fri Mar 16, 2018 10:59 pm View latest post
No new posts Terrain Deformation as per Road Profile umesh VirtualPlanetBuilder [vpb] 0 Mon Dec 04, 2017 4:44 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