Prismatic
Prismatic

Reputation: 3348

Determine limit for data sent to VBO?

I'm writing a 3d application for the Playbook, which has a PowerVR SGX 540. I noticed that if I stuff enough data in the VBO through opengl, I can cause the device to crash (not just the application, but the entire device, requiring a hard reboot). To cause the crash, I sent data for a model with ~300k triangles and ~150k vertices. I sent normal data for the vertices as well.

I found that the problem doesn't occur if I send less data (tried another model with half the triangles and vertices). Also, the issue doesn't occur if I use vertex arrays (though it's incredibly slow).

I'd like to know:

I'm using Qt for my GUI, and drawing the 3d scene to an FBO before it's painted to the GUI (I haven't checked if redoing all this without a UI by creating an EGL window and drawing to that recreates the problem yet -- that'll take awhile).

To verify it wasn't me using OpenGL poorly, I tried both using raw OpenGL calls for all the 3d stuff, and also doing everything with OpenSceneGraph. Both methods fail in the exact same way (VBO works with less data, vertex arrays work, increased VBO data causes a crash).

The program works fine on my desktop. Unfortunately, I don't have any other mobile devices I can test my application out on.

Upvotes: 2

Views: 250

Answers (1)

foijord
foijord

Reputation: 76

OpenGL ES only supports unsigned short (16 bit) as data type for indices, so if you're using an index array, you're over that limit.

Upvotes: 0

Related Questions