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 03-26-2009, 07:11 AM   #1 (permalink)
New Member
 
Nitrex88's Avatar
 
Join Date: Apr 2008
Location: Long Island, NY
Age: 21
Posts: 84
Nitrex88 is an unknown quantity at this point
Send a message via AIM to Nitrex88 Send a message via Skype™ to Nitrex88
Default VBOs and dynamic color changing

Ok i've been having a lot of toruble rendering my scene at a decent framerate and several people have told me its because i need to use Vertex Buffer Objects (VBO's). Ok so here is an example of what I'm doing...

I have a gird of 4096 squares that take up the entire iPhone screen and the color of each cornerin each square (4 in each square) must dynamically change every frame. To do this, every single drawView call i have a for loop that loops trough all 4096 squares, manually setting each one up and individual drawing each one with the correct colors before moving onto the next one. This was terribly slow (drawing 4096 objects with differnt colors individually) and i need a better method. What i want to do is...

Creat a vertex buffer object that holds all the static position coordinate of all the squares. They are in the spot every frame (only color changes) so this is no problem. However, i then want to draw then with every square having the appropriate colors (which i have in an array). Can this be done? I guess what im saying is can i create that VBO and draw each corner of each square with a different color that changes every frame.

Any code snippets? Any advice? any links? Anything could help.

Thanks a lot

Nick
Nitrex88 is offline   Reply With Quote
Reply

Bookmarks

Tags
fluid, opengl, vbo

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: 408
8 members and 400 guests
13dario13, ChrisYates, fredidf, iOS.Lover, Leslie80, Meoz, Wikiboo, Yosh_K
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,670
Threads: 94,121
Posts: 402,903
Top Poster: BrianSlick (7,990)
Welcome to our newest member, Yosh_K
Powered by vBadvanced CMPS v3.1.0

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