Discuss [iPhone SDK] Can i use C++ and OpenGL ? at the iPhone Developer Exchange - Hackint0sh.org; Hi!
That's my question: I would like to build a small game, but I dont ...
-
[iPhone SDK] Can i use C++ and OpenGL ?
Hi!
That's my question: I would like to build a small game, but I dont like to learn objective c, so my question is if I can use xcode and official sdk to build a game in opengl using c++. Take in account that I would like to distribute it thru appstore, so it must be legal.
Thank you for your advice.
-
-
Thread renamed and moved to the right section
-
-
Sure you can. If you use .mm instead of .m, you can use c++ syntax freely.
-
Hi!
Thanks for your reply.
But, why .mm and not .cpp?
where can I read more about this?
Thanks a lot.
-
-
To be honest, I'd say that if you knew OpenGL and C++ really well, the Objective-C isn't too difficult to pick up. It's just the syntax that's slightly different (like the happy use of square brackets).
-

Originally Posted by
riruilo
Hi!
Thanks for your reply.
But, why .mm and not .cpp?
where can I read more about this?
Thanks a lot.
I'm converting some tutorial written for windows mobile before to iPhone, you may take a look at: http://www.play3d.net/iPhone/index.html . Because lack of time, the progress will be slow. At this moment, you may find the template project for write OpenGL ES code in pure c or pure c++.
-
-

Originally Posted by
pinxue
I'm converting some tutorial written for windows mobile before to iPhone, you may take a look at:
http://www.play3d.net/iPhone/index.html . Because lack of time, the progress will be slow. At this moment, you may find the template project for write OpenGL ES code in pure c or pure c++.
pinxue, your website is very interesting, for sure I'm going to compile something.
Just a suggestion, did you know you can modify original sdk 3 beta to create and compile 1.1.4 and opengl es??? (I prefer this rather than 1.2.0)
http://hackint0sh.org/forum/showthread.php?t=37998

Edit: I downloaded some source code from your website, just a few questions:
where is makefile or how I can compile your examples?
Why are you using " glTranslatex( 0, 0, Float2Fixed(-60.0f) );" if iphone has a FPU?
Are you using offficial or unofficcial SDK in your code??? (I couldn't read anything about this)
Thanks a lot, your library seems very interesting.
Last edited by riruilo; 04-22-2008 at 10:24 PM.
-
It is for official SDK. You may new a coco touch project and remove all content except the info.plist and .pch, then add exist files, you also need remove reference to mainwindow.xib. I have some concern to publish the Xcode project, I will creat a makefile later, thanks for you advice.
SDK is using objc 2.0 ABI. It maybe hard to work with 1.x firmware. There are tutorial to code OpenGL ES with unofficial toolchain, please google for it, it is in standard EGL way, not eagl. (EDIT: fortunately, I wrote it down, http://www.jsfsoft.com:8080/beyond-p...007/11/16.html )
Last edited by pinxue; 04-23-2008 at 09:19 AM.
-
-
-

Originally Posted by
riruilo
Well, it is result of iphone-dev team story. Get it from author's website: http://www.cs.cmu.edu/~ajw/public/iphone-gl/
-
Similar Threads
-
By hackint0sh in forum Latest Headlines
Replies: 0
Last Post: 08-03-2009, 10:40 PM
-
By hackint0sh in forum Latest Headlines
Replies: 0
Last Post: 06-10-2009, 03:10 AM
-
By xinos in forum Using Leopard
Replies: 1
Last Post: 03-08-2009, 05:49 PM
-
By chrisc9867 in forum iPhone Developer Exchange
Replies: 0
Last Post: 03-10-2008, 10:48 PM
-
By koexistens in forum Free Toolchain Software
Replies: 7
Last Post: 11-26-2007, 08:13 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks