views:

86

answers:

1

I created renderer and loader of DirectX8 retained mode on iPhone/iPod/iPad/MacOSX/Windows. DirectX8 retained mode format is scene graph style, and hierarchy so deep. So, only Android NDK OpenGLES was occurred GL error code 0x503,0x0504(command stack over flow or under flow).

Is stack capacity of android a little? Who tried to check capacity of each devices? (NexusOne, HTC03A, Droid, Xpedia, and so on.)

+1  A: 

To query the max stack size, use glGetIntegerv with GL_MAX_MODELVIEW_STACK_DEPTH and GL_MAX_PROJECTION_STACK_DEPTH. If you push too much matrices, this will overflow.

You are underflowing the stack, that's a bug in your code. Don't pop when there is nothing in the stack.

If you find that the stack space is too little, you can make your own matrix stack by software, and this won't have the limitations of the GL ES implementation.

Matias Valdenegro
I examined matrix stack using glGetIntegerv.Model view matrix is 16, projection is 2 on Android emulator.By the way, model view is 32, projection 16 on Mac application. (If you find that the stack space is too little, you can make your own matrix stack by software, and this won't have the limitations of the GL ES implementation.)Oh,I see...Thanks!
Shiva