opengl-es

OpenGL ES 3d rotation causes unintentional translation?

I'm working on an iphone project where I need both a horizontal and a vertical layout. I've got it working in 2D perfectly well, using the following setup to my projection matrix: if(isHoriz()){ glRotatef(90.0f,0.0f,0.0f,1.0f); SOrtho(0, 480, 0, 320, -1, 1); } else SOrtho(0, 320, 0, 480, -1, 1); The problem lies when ...

How do I build a command line tool that links against the iPhone Simulator SDK?

Why the hell would I want to do that? The OpenGL Shader Builder is a great development tool, but it compiles shaders using desktop OpenGL, which allows some things that ES does not. I figure if I can create a tool that links against the OpenGLES.framework in the iPhone Simulator SDK, I can get some error reporting without having to build...

How do I texture map onto a curved surface?

Hello, I'm attempting to create a 3d game using OpenGL. I have a very basic world and am now working on a character. I want to map a texture to the head which will be oval shaped. How do I do the mapping? I know how to map to flat surface. I'm wondering if the normals can be used to help but I've never done this before and when I se...

Android NDK - OpenGL ES Tutorial/Libraries

Hey! Im looking for an OpenGL library/framework to handle basic drawing code etc for me. Otherwise im also looking for some NDK and OpenGL ES tutorials, I cant seem to find anything out there! Any information would be helpful cheers. Adam ...

iPhone game 2d shadows

Hi all! We're in the process of creating an iPhone game using cocos2d. We're trying to layer several sprites on top of each other and have them cast shadows. Right now the shadows are rendered as sprites which works fine for the most part. But we only want the shadows to hit the closest layer. I've made an image that hopefully explain...

Tutorial Books for Learning openGl and openGl in the iphone Platform

Hello helpful people of the internet, I've been programming for only a couple of years and have a basic grasp of trigonometry and other maths relevant to graphics. I really like learning using books that are tutorial in nature, especially those put out by APress and Big Nerd Ranch (iphone programming). I'm looking to learn the basics ...

What does a 3D Engine do for me?

I'm interested in developing an android application that will display a globe of some sort like Google Earth. I've never used opengl or have any experience with graphic programming so I'm here to learn some basics. Now, I know there are things like the Unity or Ogre that help facilitate graphics but what exactly do I gain from using the...

using glTexSubImage2D in opengl es 1.1

I am sending an opengl 3D scene across an IP link to my iPhone app built using SDK 4.1. I render the 3D scene first using FBO, read it with glReadPixels and send it to the iphone app. If I convert the pixel data received by the app to UIImage, I see it is displayed correctly. But when I use the same data in glTexSubImage2D using opengl e...

Android OpenGL - ES Texture bleeding

Hello! I am writing a small app that at the moment generates a random map of textures. I am drawing this map as a 10 x 15 group of "quads" which are infact all triangle strips. I use the "map" to grab an int which I then take as the location of the texture for this square in the textureAtlas. so for example 0 is the bottom left "tile"....

How to avoid drawing triangles that are outside the viewport?

Hello everybody, I have a technical question for the experts in here: I am developing an OpenGL application for iPhone using openGL 1.x . When i render a big item on the device it become obviously slower and that's seem quite normal to me. But i would have expected an increase of framerate when the object is highly zoomed in as the majo...

Detect which vertex group the object touched belongs to, in android 1.6

I m using an 3D obj file in android using min3d framework. I have created vertex groups in blender for different areas of touch. For example, in a cube, I have 6 groups. What I want is on touch, I want to know which vertex group it belongs to. How can I do that ? Following is the .obj file. # Blender3D v249 OBJ File: # www.blender3d.o...

Looking for an Android 3d engine that able to simulate coin flipping ?

Hi , I am planning an app with a "coin flipping simulation" function(Activity) in an Android phone. I am new to 3D (OpenGL) here , and I know there will be a lot of efforts to build from scratch. So , I am looking for an existing 3D engine , which is able to simulate : Coin flip and drop , with G-Sensor , so that users can shake/wave h...

Check for draw_texture

Hello! I wanna check if the draw_texture function is avaiable on the actual device, so: How can I check if this extension is supported? Thanks in advance! ...

Warping an image on the iphone with OpenGL

I am fairly new to programming and I'm doing it, at this point, just to educate myself and have fun. I'm having a lot of trouble understanding some OpenGL stuff despite having read this great article here. I've also downloaded and played around with an example from the apple developer site that uses a .png image for a sprite. I do eve...

iPhone fullscreen frame animation with easing

I need to show a (near fullscreen) object in 360 degree rotation within my iPhone app. The rotation animation has already been rendered and contains 180 frames at 960x640 (Retina display). Interaction required will include... - swipe left/right to rotate (animate) - clickable areas on each image. Can anyone suggest the best way to an...

Texture floating ponts - problem with rotation

Hello! I have a texture in my Square. The problem is when I assign floating texture points the image gets rotated 45 degrees at right. I want it without the rotation. The current texture points: texture = new float[]{ 0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, }; Any ideas? Thanks in advance! This is how it ends: This is how...

Android Opengl 2d Intersection between two graphic objects

Hi, I'm new to opengl and android and couldn't find an answer in the forums so here I am... I need to be able to 'draw' only the intersection of two triangles. I tried to use stencil test but it doesn't work in the android emulator. Then I tried to use depth test and it works but only for a fraction of a second, then the screen goes bl...

Is it possible to access OpenGL ES 2.0 texture memory directly on an embedded platform?

I'm working on some GP-GPU code on an OMAP 3530-based platform and I'm being stymied by the lack of a glGetTexImage function in openGL ES 2.0. Since the platform uses integrated memory for the GPU, I was wondering if there's any kind of hack I can do to get a pointer directly to an allocated texture in memory. This way I could read my ...

Android Textures appear unclear/fuzzy

Hi all I'm having trouble making my texture rendered correctly in my applications. the artwork I use is precise and already scaled and the right size but when I render it on phone suddenly my texture are not as clear/precise as the original artwork and I can't figure out why. has anybody had this issue before? ...

OpenGL ES for iPhone blending not working

Hello, I'm a beginner to 3D graphics in general and I'm trying to make a 3D game for the iPhone, and more specifically, to use textures that contain transparency. I am able to load a texture (an 8 bit .png file) into OpenGL and map it to a square (made from a triangle strip) but the transparent parts of the image are not transparent when...