• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 964
  • Last Modified:

Is there a way to increase glPush/PopMatrix() stack size ?

The standard minimal stack size is 32, but i wonder if there is a way to user-increase this size ? maybe using a specific gl or wgl extension ?

Thankyou in advance,
Alexander

i'll give the points only if the answer is yes, and explaining how to do it...
No answer will mean a "no", thank you...
0
Alexander
Asked:
Alexander
1 Solution
 
AlexanderAuthor Commented:
i'll give the points only if the answer is yes, and explaining how to do it...
No answer will mean a "no", thank you...
0
 
ozoCommented:
you can use glGetIntegerv(GL_MAX_MODELVIEW_STACK_DEPTH, GLint *params) to find the stack size on your implementation
0
 
AlexanderAuthor Commented:
Sorry, my question isn't maybe clear enough : it concerns "how to increase the stack size", not "how to get current stack size".
0
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

 
NovaDenizenCommented:
It is often a hardware-constrained parameter, and not up for debate or adjustment.  

I believe OpenGL implementations are required to have a GL_MAX_MODELVIEW_STACK_DEPTH of at least 32.  That ought to be enough for anybody. :)  Seriously, if you need more than a few maybe you should reconsider how you use the modelview stack.

Nonauthoritative reference for 32 here:  http://www.mesa3d.org/brianp/sig97/portable.htm
0
 
thegilbCommented:
I think the question you should ask yourself is "Why do I need a matrix stack larger than everybody else?".
0
 
AlexanderAuthor Commented:
Hi, i know the answer to this question : the problem is that when using wglUseFontOutlines() to generate 3-D fonts and if I use polygon antialiasing on generated fonts, i'm able to do only 3 glPushMatrix() before calling generated font display lists. If i do more than 3 push, GL returns a stack overflow error. (of course, there is a "pop" for each "push" !!)
I've found a solution : when using FSAA (Full Scene Anti Aliasing) i've a better rendering effect and this problems dissapears.That's why i'm thinking that it is maybe a driver's or Window's bug...

Anyway, if there is a way to increase push/pop stack size (through some kind of GL extension) i'm still interested in it, it could be useful in other cases where i've no control on generated display lists, etc...
0
 
Computer101Commented:
PAQed with points refunded (300)

Computer101
EE Admin
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Exchange Server

The MCTS: Microsoft Exchange Server 2010 certification validates your skills in supporting the maintenance and administration of the Exchange servers in an enterprise environment. Learn everything you need to know with this course.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now