[Solved]Glew should be external to Ogre rather than embedded

What it says on the tin: a place to discuss proposed new features.
Post Reply
caduceus
Goblin
Posts: 224
Joined: Tue May 08, 2012 6:39 am

[Solved]Glew should be external to Ogre rather than embedded

Post by caduceus »

When using Ogre statically, I am facing lots of compatibility issues with glew because Ogre uses old version and my application uses new one. It shall be a dependency project rather than part of Ogre. Just my own opinion other than that I am sure there is very good reason that it exits the way it is.
Last edited by caduceus on Thu Mar 07, 2013 8:14 pm, edited 1 time in total.
User avatar
masterfalcon
OGRE Team Member
OGRE Team Member
Posts: 4270
Joined: Sun Feb 25, 2007 4:56 am
Location: Bloomington, MN
x 126
Contact:

Re: Glew should be external to Ogre rather than embedded

Post by masterfalcon »

What version of GLEW do you need? Of course it would be great if we could just refer to it externally but we have made some changes to it which is why that wouldn't work.
caduceus
Goblin
Posts: 224
Joined: Tue May 08, 2012 6:39 am

Re: Glew should be external to Ogre rather than embedded

Post by caduceus »

I understand that, I am actually facing issues as I am using static build of Ogre but that includes GLEW with flag GLEW_MX enabled and hardcoded GLEW_STATIC which is conflicting with my application. Why didnt we decide to use it externally, any specific reason?
User avatar
masterfalcon
OGRE Team Member
OGRE Team Member
Posts: 4270
Joined: Sun Feb 25, 2007 4:56 am
Location: Bloomington, MN
x 126
Contact:

Re: Glew should be external to Ogre rather than embedded

Post by masterfalcon »

Yes, as I said in my reply, some changes were made to GLEW to integrate it better with Ogre. Whether or not this could be changed, I don't know. I haven't looked into it.
caduceus
Goblin
Posts: 224
Joined: Tue May 08, 2012 6:39 am

Re: Glew should be external to Ogre rather than embedded

Post by caduceus »

Thanks for the clarification. I kind of hit the dead end as I wanted to use Ogre statically and also want to use latest glew in my application. After doing some changes to make it work I am stuck at getting "glewcontextinit()" undefined error.

Is GLEW_MX flag necessary for Ogre?
User avatar
masterfalcon
OGRE Team Member
OGRE Team Member
Posts: 4270
Joined: Sun Feb 25, 2007 4:56 am
Location: Bloomington, MN
x 126
Contact:

Re: Glew should be external to Ogre rather than embedded

Post by masterfalcon »

I honestly don't know. I've never delved into the the GLEW integration to see.
caduceus
Goblin
Posts: 224
Joined: Tue May 08, 2012 6:39 am

Re: Glew should be external to Ogre rather than embedded

Post by caduceus »

I understand and thanks for taking time to answer my question. Btw, Is it on roadmap somewhere to compile Ogre with glew dynamically or in other words can we put that on roadmap.
User avatar
masterfalcon
OGRE Team Member
OGRE Team Member
Posts: 4270
Joined: Sun Feb 25, 2007 4:56 am
Location: Bloomington, MN
x 126
Contact:

Re: Glew should be external to Ogre rather than embedded

Post by masterfalcon »

No it's not on the roadmap. To the best of my knowledge you're the only person who has asked for such a feature. Given that, it's unlikely that it would be made a priority.
caduceus
Goblin
Posts: 224
Joined: Tue May 08, 2012 6:39 am

Re: Glew should be external to Ogre rather than embedded

Post by caduceus »

I understand and i agree that there are other far more important things to do in Ogre than this. Its all right, Thanks for your help and I will find my way out of this situation, i might end up using dynamic linking for ogre. Thanks for help and patience.
scrawl
OGRE Expert User
OGRE Expert User
Posts: 1119
Joined: Sat Jan 01, 2011 7:57 pm
x 216

Re: [Solved]Glew should be external to Ogre rather than embe

Post by scrawl »

I just had a look at the history for glew.cpp and I'm not sure which changes you mean. There was a windows related change with GLEWAPIENTRY but it was reverted in a later commit, so I assume it's no longer necessary or was wrong to begin with.
Other than that, I don't see any changes that were done on Ogre's side.

Anyway, the reason I am interested in this is that glew.cpp throws a couple hundred warnings when compiled in GCC with Ogre's build settings, so it would be nice to use the system lib instead.
User avatar
masterfalcon
OGRE Team Member
OGRE Team Member
Posts: 4270
Joined: Sun Feb 25, 2007 4:56 am
Location: Bloomington, MN
x 126
Contact:

Re: [Solved]Glew should be external to Ogre rather than embe

Post by masterfalcon »

Look for changes marked with:

Code: Select all

// SJS
scrawl
OGRE Expert User
OGRE Expert User
Posts: 1119
Joined: Sat Jan 01, 2011 7:57 pm
x 216

Re: [Solved]Glew should be external to Ogre rather than embe

Post by scrawl »

I see now. Seems to have been done pre version control or something so didn't show up in the history I guess.
I'll investigate if we can do this in a better way.
scrawl
OGRE Expert User
OGRE Expert User
Posts: 1119
Joined: Sat Jan 01, 2011 7:57 pm
x 216

Re: [Solved]Glew should be external to Ogre rather than embe

Post by scrawl »

I've come to the conclusion that it's possible, but I'm afraid I don't know the code well enough to do it cleanly. And I'm not really comfortable when changing the low level GLX code that has been untouched for ages and "just works".
So I created a ticket in case a more experienced person wants to do it.
Post Reply