Page 1 of 2 12 LastLast
Results 1 to 10 of 15
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 ...
  1. #1
    Rookie Array

    Join Date
    Apr 2008
    Posts
    17
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Question [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.



  2. #2
    Former Bender
    Guest

    Default

    Thread renamed and moved to the right section

  3. #3
    Advanced Array

    Join Date
    May 2006
    Posts
    35
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    Sure you can. If you use .mm instead of .m, you can use c++ syntax freely.

  4. #4
    Rookie Array

    Join Date
    Apr 2008
    Posts
    17
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    Hi!

    Thanks for your reply.

    But, why .mm and not .cpp?

    where can I read more about this?

    Thanks a lot.

  5. #5
    Professional Array

    Join Date
    Apr 2008
    Posts
    64
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    10

    Default

    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).


  6. #6
    Advanced Array

    Join Date
    May 2006
    Posts
    35
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    Quote Originally Posted by riruilo View Post
    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++.

  7. #7
    Rookie Array

    Join Date
    Apr 2008
    Posts
    17
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Smile

    Quote Originally Posted by pinxue View Post
    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.

  8. #8
    Advanced Array

    Join Date
    May 2006
    Posts
    35
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    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.

  9. #9
    Rookie Array

    Join Date
    Apr 2008
    Posts
    17
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

  10. #10
    Advanced Array

    Join Date
    May 2006
    Posts
    35
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    Quote Originally Posted by riruilo View Post
    Well, it is result of iphone-dev team story. Get it from author's website: http://www.cs.cmu.edu/~ajw/public/iphone-gl/


 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. MacNN: gDEBugger iPhone analyzes OpenGL-based iPhone apps
    By hackint0sh in forum Latest Headlines
    Replies: 0
    Last Post: 08-03-2009, 10:40 PM
  2. Replies: 0
    Last Post: 06-10-2009, 03:10 AM
  3. OpenGL games on MAC
    By xinos in forum Using Leopard
    Replies: 1
    Last Post: 03-08-2009, 04:49 PM
  4. [iPhone SDK] Testing OpenGL
    By chrisc9867 in forum iPhone Developer Exchange
    Replies: 0
    Last Post: 03-10-2008, 09:48 PM
  5. OpenGL - Flickering
    By koexistens in forum Free Toolchain Software (Cydia App's)
    Replies: 7
    Last Post: 11-26-2007, 07:13 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Powered by vBulletin®
Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.
Search Engine Friendly URLs by vBSEO
(c) 2006-2012 Hackint0sh.org
All times are GMT +2. The time now is 10:03 PM.
twitter, follow us!