 |
 |
|
 |
07-01-2009, 09:58 AM
|
#1 (permalink)
|
|
New Member
Join Date: Jun 2009
Posts: 10
|
Help me initialize OpenGL ES in a View-based app
Hello,
I am writing a view-based app in which when I press a button, a new view with opengl triangle should be displayed.
I know changing views using addSubview and I also know how to write opengl triangle code. But, I don't know in what method to put the opengl code in! Do I have to write a renderScene() and then link to UIView glview ?
Please help me.
|
|
|
07-02-2009, 10:37 PM
|
#2 (permalink)
|
|
New Member
Join Date: Jun 2009
Posts: 10
|
anyone?
|
|
|
07-06-2009, 01:46 PM
|
#3 (permalink)
|
|
Registered Member
Join Date: Aug 2008
Location: Washington, DC
Posts: 91
|
Have you checked out the same openGL app? It does all of this. You can create the sample app like this:
1) Open XCode
2) Go to the 'File' menu and select 'New Project'
3) On the left side pick iPhone OS and Application, on the right side pick OpenGL ES application.
This will create a new project with a sample OpenGL application. You can use this as the starting point for any openGL ES based app.
-Keith
|
|
|
07-10-2009, 02:02 AM
|
#4 (permalink)
|
|
New Member
Join Date: Jun 2009
Posts: 10
|
Yes sir, I know that. I already have a view based application in which I have to add opengl es view as a subview. I want to know how do I initialize the opengl es view in such a case. Is it possible?
|
|
|
10-13-2009, 02:53 AM
|
#5 (permalink)
|
|
Registered Member
Join Date: Jul 2009
Posts: 2
|
i m also having the same problem. i m writting a view based appliacation n after moving along 3 nib files an opengl screen appears but i hv no idea how to do this.
anyone out there who knows the method plz help me
thanks in advance
regards
|
|
|
01-05-2010, 05:18 AM
|
#6 (permalink)
|
|
Registered Member
Join Date: Jan 2010
Posts: 1
|
I am also facing similar problem. Was anyone able to solve it? Please let me know.
Thanks.
|
|
|
01-07-2010, 01:51 AM
|
#7 (permalink)
|
|
Registered Member
Join Date: Jul 2009
Posts: 2
|
Hi
I sorted out the problem
there are 2 alternative ways to do this
1. add new UIViewController subclasses to your EAGLView project
2. start a new view based application and then add all your EAGLview classes into it.
import ur EAGLView.h class into viewcontroller .h class and create an object of it. e.g.,
#import "EAGLView.h"
........
EAGLView *myGL;
then ue the following linnes of code to switch from your view controller to gl view
myGL = [[EAGLView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]];
myGL.animationInterval = 1.0 / 60.0;
[myGL startAnimation];
self.view = myGL;
[myGL release];
your IBOutlet will pass on the controll to the glview.
|
|
|
 |
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
» Advertisements |
» Online Users: 444 |
| 48 members and 396 guests |
| Adam3001, adison, AdvertiseSpace, Alexman, amulter, Axeva, bbc z, bgeerdes, brian515, Chilibird, Chonch, Cooper_1988, CunningCat, cye, damienbern, develsolutions, DonneonoInvoft, Eagle11, Eskema, Furniture_lover, fxshot, Gi-lo, Glibnobin, Guit, harkonian, hazmat82, headkaze, Hendrika, iphonedave, itsugawakun, jbro, krishy, Locker, malaki1974, mauri, ng93, racer_X, rhawkey, Rudy, schoash, seymores, SimonHodgkiss, sinclairgf, Slecorne, smasher, tappix, upperhouse, yannickd60 |
| Most users ever online was 779, 05-11-2009 at 09:55 AM. |
» Stats |
Members: 24,198
Threads: 38,971
Posts: 170,968
Top Poster: smasher (2,567)
|
| Welcome to our newest member, Hendrika |
|