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

View Single Post
Old 03-06-2009, 03:23 PM   #2 (permalink)
Kalimba
Pro. Game Developer
iPhone Dev SDK Supporter
 
Join Date: Feb 2009
Location: żLa Islas Hermosas?
Posts: 2,176
Kalimba is on a distinguished road
Default

Quote:
Originally Posted by SDyer View Post
Hi - this is a noob OpenGL ES question. I'm starting with the Open GL ES app that XCode gives you, the one with the rotating gradient square. I would like to display a background behind that rotating square. I am able to display a background, but it rotates too! I've not found a way to "decouple" them. How do I apply rotation to only one of them? My draw source code is below. Thanks!
The "flaw" in the default OpenGL project is that they don't reset the modelview matrix to the identity matrix for each new draw call. They apply a rotation of 3 degrees every frame, but that rotation is multiplied to the existing modelview matrix, which is how they achieve the constant rotation effect. If you want independent control of your scene objects (and who doesn't), you'll probably want to set the modelview matrix to the identity on every new draw call, then apply the individual transformations for each of your scene objects.
Kalimba is offline   Reply With Quote
 

» Advertisements
» Online Users: 429
20 members and 409 guests
7twenty7, baja_yu, buggen, Byfone, ChrisYates, Duncan C, foany, haisergeant, hussain1982, jbro, mer10, mraalex, n00b, PavelMik, QuantumDoja, rraagg, ryantcb, sadevb61, TheStalker, v1n2e7t
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,635
Threads: 94,096
Posts: 402,802
Top Poster: BrianSlick (7,990)
Welcome to our newest member, sadevb61
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 09:21 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.