6
votes
1answer
580 views

OpenGL ES object rotation around z axis

I have an object on my screen which is presented rotated and panned, But i have 2 problems regarding the z axis rotations. It's a bit tricky to explain so i uploaded 2 videos to describe each problem. ...
1
vote
1answer
223 views

opengles display human face in iphone and animate it?

I need to make a human 2D face to 3D face. I used this link to load an ".obj" file and map the textures. This example is only for cube and pyramid. I loaded a human face ".obj" file. This loads the ...
2
votes
2answers
1k views

Cocos2d v2.0 and OpenGL 2.0/1.0: where to start

I started developing my very first game 3 months ago using Cocos2d 2.0 for iPhone. I am now in the stage where I'd like to add some cool effects to the bullets and some special weapons (see my ...
1
vote
0answers
240 views

Getting contour without the background [closed]

I have a texture and vertex which are needed to create a set of closed polygons. For this purpose I use these functions: Code for create texture: CCSprite* spr = ...
3
votes
2answers
2k views

Cocos2D: Upgrading from OpenGL ES 1.1 to 2.0

I have recently starting upgrading my ios game to the latest Cocos2D (2.0 rc), and I am having some difficulties upgrading my texture generation code to OpenGL 2.0. In the old version I generated ...
1
vote
1answer
143 views

Drawing texture does not work anymore with a small amount of triangles

When i draw lines, the vertices are well connected. But when i draw the texture inside the triangles, it only works with i<4 in the for loop, otherwise with i<5 for example, there is a ...
0
votes
1answer
369 views

Triangles in a C++ STL Vector as an Objective-C member sometimes draws incorrectly in OpenGL ES

The polygons draw correctly 80% of the time. When it fails, a vertex is dislocated. The polygon is consistently drawn with the wrong vertex. I checked that the vector is correct during initialization, ...
3
votes
5answers
794 views

Should iOS games use a Timer?

No matter what frameworks we use -- Core Graphics, Cocos2D, OpenGL ES -- to write games, should a timer be used (for games that has animation even when a user doesn't do any input, such as after ...
9
votes
1answer
9k views

Blend Modes in Cocos2D with glBlendFunc

We've been trying to replicate the most common blending modes that are available in Photoshop and Quartz 2D, but we've only come up with 3 and that's after some long searching online. For anyone ...
2
votes
1answer
2k views

Drawing polygons with a repeating texture on iOS

I want to draw a terrain for a 2d game, and this terrain is defined by some rotated rectangles and circles, I want to draw my terrain as if it was a repeating texture clipped by those forms. I already ...