Solved

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

Posted on 2006-10-25
8
942 Views
Last Modified: 2013-12-06
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
Comment
Question by:Alexander
8 Comments
 
LVL 1

Author Comment

by:Alexander
ID: 17812272
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
 
LVL 84

Expert Comment

by:ozo
ID: 17827964
you can use glGetIntegerv(GL_MAX_MODELVIEW_STACK_DEPTH, GLint *params) to find the stack size on your implementation
0
 
LVL 1

Author Comment

by:Alexander
ID: 17827985
Sorry, my question isn't maybe clear enough : it concerns "how to increase the stack size", not "how to get current stack size".
0
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 
LVL 22

Expert Comment

by:NovaDenizen
ID: 17916514
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
 
LVL 5

Expert Comment

by:thegilb
ID: 18186951
I think the question you should ask yourself is "Why do I need a matrix stack larger than everybody else?".
0
 
LVL 1

Author Comment

by:Alexander
ID: 18201465
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
 
LVL 1

Accepted Solution

by:
Computer101 earned 0 total points
ID: 18715737
PAQed with points refunded (300)

Computer101
EE Admin
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Artificial Intelligence comes in many forms, and for game developers, Path-Finding is an important ability for making an NPC (Non-Playable Character) maneuver through terrain.  A* is a particularly easy way to approach it.  I’ll start with the algor…
As game developers, we quickly learn that Artificial Intelligence (AI) doesn’t need to be so tough.  To reference Space Ghost: “Moltar, I have a giant brain that is able to reduce any complex machine into a simple yes or no answer. (http://www.youtu…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now