Posts Tagged 'opengl'

OpenGL Camera 2d with zoom and rotation

I’ve been working on OpenGL for some time now and one of the things that some people have asked me is how to do that 2d camera with zoom and rotation in a similar way to a post regarding a

/ No comments

OpenGL Camera 2d with zoom and rotation

I’ve been working on OpenGL for some time now and one of the things that some people have asked me is how to do that 2d camera with zoom and rotation in a similar way to a post regarding a

/ No comments

OpenGL 2D Independent Resolution Rendering

Around two years ago I made a tutorial for XNA in which you could render 2D games scaled to the current window resolution with proper letter-boxes or pillar-boxes. As many know since then I moved to C++ and OpenGL, and

/ 7 Comments

OpenGL 2D Independent Resolution Rendering

Around two years ago I made a tutorial for XNA in which you could render 2D games scaled to the current window resolution with proper letter-boxes or pillar-boxes. As many know since then I moved to C++ and OpenGL, and

/ 7 Comments

How to take screenshots in opengl

So here’s some quick code to save a screenshot of your OpenGL game in a TGA file.   bool save_screenshot(string filename, int w, int h) { //This prevents the images getting padded // when the width multiplied by 3 is

/ 7 Comments

How to take screenshots in opengl

So here’s some quick code to save a screenshot of your OpenGL game in a TGA file.   bool save_screenshot(string filename, int w, int h) { //This prevents the images getting padded // when the width multiplied by 3 is

/ 7 Comments

Engine, video player and tools, tools tools!

So these past 2 weeks I’ve been adding some “bits and bytes” to the engine. Taking a rest between some more complex game mechanisms I decided to start doing a video player. After a bit research I decided to choose

/ No comments

Engine, video player and tools, tools tools!

So these past 2 weeks I’ve been adding some “bits and bytes” to the engine. Taking a rest between some more complex game mechanisms I decided to start doing a video player. After a bit research I decided to choose

/ No comments

OpenGL Render to Texture

Render to texture is a very handy functionality. Imagine your game allows for some character customization. You have the body, some different hats, different clothes and other small stuff. Now the easiest way to render this is to just draw

/ One Comment

OpenGL Render to Texture

Render to texture is a very handy functionality. Imagine your game allows for some character customization. You have the body, some different hats, different clothes and other small stuff. Now the easiest way to render this is to just draw

/ One Comment

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

/ 20 Comments

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

/ 20 Comments

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

/ 16 Comments

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

/ 16 Comments

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

/ 3 Comments

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

/ 3 Comments

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

/ No comments

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

/ No comments