iPhone OpenGL Demo - 3D Cube with Texture, Light, Rotate and Zoom options

iPhone OpenGL Demo - 3D Cube with Texture, Light, Rotate and Zoom options

09/21/09 | by zveriu | Categories: Fun, On the web, Software, iPhone

iPhone OpenGL Demo

UPDATE 20100102: As there seem to appear some unsatisfied fuckup-folks, read this first:

  • code is provided AS IS, no warranties
  • got no time to sort things out? don’t lose your time checking out the code then
  • lazy enough/looser-programmer and looking for spoon-feeding solutions only? don’t lose your time checking out the code then
  • don’t like my code? write better one instead and let me see you give it for free before you comment
  • for those whoever is “fuck you"-ing me for whatever frustration reason they got - you are free to leave the blog - this blog is not for you

UPDATE 20090921: ZIP with sources is NOT corrupted. Please use 7-Zip archiver (ver >= 1.59)

UPDATE: Sources iPhone OpenGL ES Cube 3D with texture (Some reported archive corruption. Seems to work well with 7-Zip 4.5x, 4.6x for Windows)

This is a demo video showing my humble achievements in the direction of OpenGL ES 1.1 for iPhone, using some texture and light experiments. It is of course not intended as a working program, it’s rather a demo concept snippet of code.

The binary:
- source written in objective-c
- compiled as native application with iPhone toolchain under cygwin
- ran on iPhone 1.1.2 OOB

The acknowledgements go to:
- AJW - for great iPhone OpenGL startups
- ZeusCMD - for great OpenGL ES tutorials
- nullriver - for posts and links

Here is the binary available for download:
iPhone OpenGL ES Demo binary

Instructions:
- GLTextureCube to be put into /Applications and given proper permissions (755 to dirs and files will suffice)
- zveriu.raw to be put into /private/var and given at least read permission (444 will suffice)
- you can replace zveriu.raw with your own image data, given you follow the constraints:
– 128 by 128 pixel - sorry, had to hard-code to speed-up the working demo ;D
– raw data, i.e. no headers, compression, etc - :crazy:
– 1 (one) byte per color, color scheme RGB
– basically it is a 24bit BMP, with no header, just raw data
_________
- to obtain such a raw file, you can:
– get a 128 by 128 24 bits BMP file with your texture
– open it with IrfanView
– make sure you have IrfanView plugin named Formats
– save as the BMP with RAW file type, instructing irfan view to make it 24 bits RGB (not BGR!) and interleaved, meaning bytes follow as RGBRGB…RGBRGB and not RRRRRR…GGGGGG…BBBBBB
_________
- basically, to check that zveriu.raw (case sensitive!) you have created is right, file size should be 128 (width) * 128 (height) * 3 (bytes for RGB ) = 49152 bytes exactly

Hope you enjoyed this post.

I have some more ideas to test on iPhone - hope to overcome all the limitations (including time-constraint :) ). And by the way - the USRP is solved, need to get GNUradio working on one of the boxes (cygwin refuses to get me wxPython right for GNUradio - will stick to Ubuntu for the moment!)

Tags: iPhone OpenGL OpenGL ES OpenGLES Demo Cube Cube3D Texture USRP GNUradio

Comments, Pingbacks:

Comment from: Theo [Visitor] Email · http://www.radutheodor.com
Bravo ma! Vezi poate te iau si pe tine aia de la Adobe Romania ... :D
PermalinkPermalink 07/10/08 @ 02:27
Comment from: zveriu [Member] · http://www.andreicostin.com
Mersi ma :)

Poate ajunge si pe la tine in curand un FWD cu o poza de-a mea gen Mosoi =))

Hai noroc si... mai ia un biscuite pentru refreshment =))
PermalinkPermalink 07/11/08 @ 13:26
Comment from: Rob [Visitor] Email
Do you mind sharing the source code?
PermalinkPermalink 12/17/08 @ 05:33
Comment from: andrei [Visitor]
arhiva nu poate fi extrasa. :((
PermalinkPermalink 03/31/09 @ 13:24
Comment from: jimmy page [Visitor] Email
Arhiva are erori la dezarhivare :((
PermalinkPermalink 04/02/09 @ 13:25
Comment from: zveriu [Member] · http://www.andreicostin.com
Some reported archive corruption. Seems to work well with 7-Zip 4.5x, 4.6x for Windows
PermalinkPermalink 04/07/09 @ 13:01
Comment from: Edeline [Visitor] Email · http://kennyevanstz.blogspot.com/
Interesting to know.
PermalinkPermalink 04/27/09 @ 06:55
Comment from: peter [Visitor] Email
sorry
i can't open your code
could you put on the download link again
thanks
PermalinkPermalink 05/08/09 @ 18:19
Comment from: William [Visitor] Email
Hi, Nice work, but I can't open your zip file. Could you put it up again.

Thanks, William
PermalinkPermalink 08/19/09 @ 20:28
Comment from: Jubirica [Visitor] Email
Colegu'
stii ca nu pricep la din astea, dar esti tare!
It looks al dracului de gooood....

P.S. apropo, schimba ochelarii!!!!! :D
Prietenii stiu de ce...
PermalinkPermalink 09/30/09 @ 17:07
Comment from: zveriu [Member] · http://www.andreicostin.com
@Jubirica:
Mersi papushoi :)!
PS: da ce naiba au okelarii aia? bine, oricum nu ii mai port, dar daca asa e poza :P, ce sa fac?!
PermalinkPermalink 10/05/09 @ 23:56
Comment from: antivirus express [Visitor] Email · http://antivirusexpress..com
Nice...,just keep up the good work and i'll keep reading, thanks!
PermalinkPermalink 10/22/09 @ 17:36
Comment from: Reginald [Visitor] Email
These are very interesting post and blog,thanks.
PermalinkPermalink 12/21/09 @ 20:32
Comment from: Yes Me [Visitor] Email
The source code is a fake. I used 7zip to unzip the source. There are references to mouse. No references to touch. The UIView is not set up for the iphone touch screen.

MAJOR FAKE!!!!

PermalinkPermalink 12/22/09 @ 07:46
Comment from: rajan durgade [Visitor]
very nice...thank for this...
PermalinkPermalink 01/09/10 @ 13:43
Comment from: Maxim [Visitor] Email
Great job! Thanks.
PermalinkPermalink 02/02/10 @ 21:50
Comment from: JO [Visitor] Email · http://idwn.blogspot.com
Nice work thanks
PermalinkPermalink 02/26/10 @ 11:54

This post has 2 feedbacks awaiting moderation...

Leave a comment:

Your email address will not be displayed on this site.
Your URL will be displayed.

Allowed XHTML tags: <p, ul, ol, li, dl, dt, dd, address, blockquote, ins, del, span, bdo, br, em, strong, dfn, code, samp, kdb, var, cite, abbr, acronym, q, sub, sup, tt, i, b, big, small>
(Line breaks become <br />)
(Set cookies for name, email and url)
(Allow users to contact you through a message form (your email will NOT be displayed.))
This is a captcha-picture. It is used to prevent mass-access by robots.
Please enter the characters from the image above. (case insensitive)

Cognitive and Scientific Brainology

A deep dive into brain's curiosities

September 2010
Sun Mon Tue Wed Thu Fri Sat
 << <   > >>
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30    

Categories

Misc

XML Feeds

What is RSS?

powered by b2evolution free blog software