Loading images into OpenGL in iPhone

Loading images into OpenGL in iPhone

So you can’t make a game without images, right? Well, actually you can but that’s another story. But how can you load a jpg or a png and use then on OpenGLES? First let’s make a simple class Texture2D class Texture2D { public: Texture2D(int texture id, int width, int height) { _textureId = id; _width [...]

Vizati for iPhone is now available at App Store

Vizati for iPhone is now available at App Store

People who follow me on twitter are probably aware, or maybe not: After 3 months tacking an iPhone port it was finally approved by Apple to the App store and it’s on sale today!!! Hypnotizing start… Buy buy buy…. On the count of 3 you will feel refreshed and happy for buying this awesome game… [...]

Setting OpenGL view for iPhone 4 retina hi resolution

Setting OpenGL view for iPhone 4 retina hi resolution

This had me scratching my head for awhile. At first I thought that glGetRenderbufferParameterivOES would properly detect Retina screen at 960×640 but it keeps returning 480×320. A little explanation on Retina screen first. Older devices have 320×480 screen resolution. With new iPhone 4 and iPod Touch 4G the screen has 640×960 but on the same [...]

Targetting iOS devices hardware

Targetting iOS devices hardware

I decided to compile all iOS devices specs here so we can get a better glimpse on their hardware and what we can expect from them. This covers iPhones, iPod Touches and iPad. iPhone/IPhone 3G – 412 MHz / 128MB / 320×480 iPhone 3GS – 600 MHz / 256MB / 320×480 iPhone 4 -~800MHz / [...]

IPhone OpenGL screen orientation using the accelerometer

IPhone OpenGL screen orientation using the accelerometer

Even tough it’s not mandatory to support all screen orientations it’s always nice to support at least 2 of them. Let’s imagine your game is landscaped, by some reason the user may want to use either with the home button on the left or on the right. Most games support this, if you flip the [...]

Developers log stardate 26082010

Developers log stardate 26082010

It’s been awhile since I last updated this, I’ve have my hands full with Vizati IPhone. Ever since I got an IPod Touch 2G it was easier for Rita to get a sense of the screen size (although we knew to be 320×480) it’s different when you are testing on the real thing, text looks [...]