Basic OpenGL 2D template for iPad

Em Andamento Postado Dec 11, 2011 Pago na entrega
Em Andamento Pago na entrega

I am porting a 2D application written in C and OpenGL over to the iPad. The job I require a freelancer to do is to write a template that will allow me to bring in my code so it can be executed on the iPad. You will not need access to the full code from the existing application that I am porting from.

Here some details on the type of code being ported over:

1) There are approximately 60 PNG images, some with transparencies, which are loaded from the resources area of the build. They are wrapped to a rectangle that's the size of the image and displayed via GL.

2) Vertice coordinates of these rectangles are defined in the form:

GLfloat vertices[8];

vertices[0] = leftmost_x;

vertices[1] = bottommost_y;

vertices[2] = rightmost_x;

vertices[3] = bottommost_y;

vertices[4] = leftmost_x;

vertices[5] = topmost_y;

vertices[6] = rightmost_x;

vertices[7] = topmost_y;

3) Textures are of the type GLuint[8]

4) The code in the rendering loop for each image looks like:

glEnable(GL_TEXTURE_2D);

glEnableClientState(GL_VERTEX_ARRAY);

glEnableClientState(GL_TEXTURE_COORD_ARRAY);

glVertexPointer(2, GL_FLOAT, 0, verticesbg2);

glTexCoordPointer(2, GL_FLOAT, 0, texbg2_coord);

glBindTexture(GL_TEXTURE_2D, bg2);

glColor4f([url removed, login to view], [url removed, login to view], [url removed, login to view], [url removed, login to view]);

glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);

glDisableClientState(GL_TEXTURE_COORD_ARRAY);

glDisableClientState(GL_VERTEX_ARRAY);

glDisable(GL_TEXTURE_2D);

5) Text is rendered in Myriad Pro Bold

Details on what I would like the template to consist of:

a) It must be able to render using code of the same form that's seen in item 4) above. This is critical.

b) It must demonstrate how to load three example PNG files that have alpha transparency, and display them to the screen using the code format from item 4). The PNG file must be located in the resources section of the project.

c) The vertices must be defined as a GLfloat with 8 elements, as shown in item 2) above.

d) The template must show how to receive touch events from the system, and demonstrate how to check the location of the touch event and whether or not the event is a "pan" event.

e) It must show how to render text at some location on the screen. If it can be done in the Myriad Pro Bold font, that would be great.

f) This must be an Xcode project. I want to be able to compile it and run it in my simulator.

g) The application operates in landscape mode, so the coordinates must be in landscape mode (if this is possible).

I have been rather detailed here but this should be a relatively easy job for someone with GL experience on iOS. I'm a developer but I do not have great experience with setting up the GL environment or working with the iPad/iPhone, so I may follow up the project with a few technical questions for you.

If there are any questions, please contact me.

iPad iPhone

ID do Projeto: #1335461

Sobre o projeto

Projeto remoto Ativo em Dec 15, 2011