Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Game Development

Reply
 
LinkBack Thread Tools Display Modes
Old 12-19-2010, 02:55 PM   #1 (permalink)
Registered Member
 
Join Date: Aug 2010
Posts: 15
regnar is on a distinguished road
Default [OpenGL ES] Using glDrawElements with GL_UNSIGNED_INT

Hello!
I was happily using glDrawElements with GL_UNSIGNED_SHORT index data for my index buffer rendering until I needed to draw terrain mesh larger than 256*256 vertices. But it turned out that OpenGL ES doesn't support GL_UNSIGNED_INT. How do I solve this problem now?
Say, I want to draw a mesh with 1024*1024 vertices. If I sub-divide this into smaller index buffers (like 256*256), it means I will have to create 16(!) index buffers just for that one mesh. Sounds really bad to me.
regnar is offline   Reply With Quote
Old 12-19-2010, 04:30 PM   #2 (permalink)
Registered Member
 
Join Date: Nov 2010
Posts: 45
Ed Welch is on a distinguished road
Default

Quote:
Originally Posted by regnar View Post
Hello!
I was happily using glDrawElements with GL_UNSIGNED_SHORT index data for my index buffer rendering until I needed to draw terrain mesh larger than 256*256 vertices. But it turned out that OpenGL ES doesn't support GL_UNSIGNED_INT. How do I solve this problem now?
Say, I want to draw a mesh with 1024*1024 vertices. If I sub-divide this into smaller index buffers (like 256*256), it means I will have to create 16(!) index buffers just for that one mesh. Sounds really bad to me.
You won't get an iDevice to render one million vertices. The limit for MBX devices (i.e. iPhone 3G) is around 10,000 polygons for a reasonable frame rate.
Ed Welch is offline   Reply With Quote
Old 12-20-2010, 01:18 AM   #3 (permalink)
Registered Member
 
Join Date: Aug 2010
Posts: 15
regnar is on a distinguished road
Default

Quote:
Originally Posted by Ed Welch View Post
You won't get an iDevice to render one million vertices. The limit for MBX devices (i.e. iPhone 3G) is around 10,000 polygons for a reasonable frame rate.
Well, I am not going to render million vertices, I just need a way to index large vertexbuffer (larger than 65 536 vertices, becouse that's what ushort allows). Having a large index buffer doesn't mean I am going to be rendering it all at once. Of course I use all kind of space partitioning and LOD techniques.
regnar is offline   Reply With Quote
Old 12-20-2010, 09:22 AM   #4 (permalink)
Registered Member
 
Join Date: Nov 2008
Posts: 234
warmi is on a distinguished road
Default

Quote:
Originally Posted by regnar View Post
Well, I am not going to render million vertices, I just need a way to index large vertexbuffer (larger than 65 536 vertices, becouse that's what ushort allows). Having a large index buffer doesn't mean I am going to be rendering it all at once. Of course I use all kind of space partitioning and LOD techniques.
Having multiple index buffers is not a big problem ... Like you said, you are not going to send everything with one batch so I don't think it makes a lot of difference.
warmi is offline   Reply With Quote
Reply

Bookmarks

Tags
gldrawelements, gl_unsigned_int, opengl es

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 414
12 members and 402 guests
7twenty7, chemistry, ChrisYates, djohnson, gmarro, hussain1982, Kirkout, Retouchable, skrew88, SLIC, walex, xzoonxoom
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,679
Threads: 94,128
Posts: 402,921
Top Poster: BrianSlick (7,990)
Welcome to our newest member, xzoonxoom
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 08:09 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0