opengl-es

About the texture switch in OpenGLES

When the texture is switched, why is the speed slow? Code - 1  glBindTexture(GL_TEXTURE_2D,texId01);  glDrawArray(glDrawArrays(GL_TRIANGLES, 0, 4);  glBindTexture(GL_TEXTURE_2D,texId02);  glDrawArray(glDrawArrays(GL_TRIANGLES, 0, 4); Code - 2  glBindTexture(GL_TEXTURE_2D,texId01);  glDrawArray(GL_TRIANGLES, 0, 4);  glDrawArr...

Android 2.0 and OpenGL ES 2.0 support

Hello, can I assume that, if a phone runs Android 2.0, it also supports OpenGL ES 2.0 and thus the graphic hardware has full support for programmable shaders? IOW, does Android 2.0 as a platform mandate OpenGL ES 2.0 support? Or is it optional? ...

Normal Maps vs. Normal Coordinates

Hello everyone, I'm currently working with OpenGL ES 1.1 and using the DrawElements convention along with Vertex, Normal, Texture Coordinate, and Index arrays. I recently came across this while researching the idea of using Normal/Bump mapping which I previously though impossible with OpenGL ES: http://iphone-3d-programming.labs.oreill...

iPhone OpenGLES Plotting Problem

I started off with the default OGLES iPhone project, then I changed the Orthographic view to: float Left = -backingWidth/2; float Right = backingWidth/2; float Up = -backingHeight/2; float Down = backingHeight/2; glOrthof(Left, Right, Up, Down, -1.0f, 1.0f); so when I make the Vertices array I can assign the XY values of a grid withou...

iPhone OGLES Game Of Life Plotting

I'm developing an OpenGL-ES game of life program for the iPhone and I have an array that contains the boolean values of the entire grid, what I did for the array of the grid was: grid = (BOOL *)malloc(2*XSize*YSize*sizeof(BOOL)); and I want to know what would be a good way of plotting this linear array to the screen. I've tried to cr...

Differences between OpenGL ES iPhone games with MBX vs SGX graphics chips?

What differences have you seen when running an OpenGL ES based iPhone game on a device using an SGX chip... when the game was originally developed for a device using an MBX chip? ...

my iPhone OpenGL ES application receives touch events after a delay, why?

I'm developing a game on the iPhone, using OpenGL ES 1.x to render stuff. It seems that my OpenGL ES view receives touch events after a noticeable delay on some iPhone devices, and on some other devices the touch events are received immediately... all the iPhone devices I have been testing my SW with have iOS 4 installed. By some googl...

How to draw fullscreen in android?

I'm using opengl es 2.0 on android 2.2. My problem here isn't with the canvas, or creating a fullscreen android view, that I already have figured out. I'm wondering how you would set the coordinates of a GL_QUAD, or 2 GL_TRIANGLES to perfectly cover the entire screen, for use as a texturing surface for a 2D game, for example. I current...

iPhone OpenGL-ES renders weird with odd-valued resolution

I have a render method as such: [EAGLContext setCurrentContext:context]; glBindFramebufferOES(GL_FRAMEBUFFER_OES, defaultFramebuffer); glViewport(0, 0, backingWidth, backingHeight); glMatrixMode(GL_PROJECTION); glLoadIdentity(); glOrthof(0, backingWidth, backingHeight, 0, -1.0f, 1.0f); glTranslatef(0.5f, 0.5f, 0.0f); glMatrixMode(GL_...

Passing a variable to a OpenGL GLSL shader

Hello! I'm writing an iPhone app which uses GLSL shaders to preform transformations on textures, but one point that I'm having a little hard time with is passing variables to my GLSL shader. I've read that it's possible to have a shader read part of the OpenGL state (and I would only need read-only access to this variable), but I'm not...

Maya 3D import to OpenGL ES..

I have created a object using autodesk maya 3D, may I ask whether the object can import to openGL ES or not? thanks a lot..^_^ ...

Loading 3ds file in Qt4.6

Hi, I need to develop some application using OpenGL in Qt for Symbian platform. I found a function called loadScene in Qt3 that where used to load 3ds files but couldn't find any for the latest version of Qt. Is there any library that I could use ? Thanks, Alexandre ...

OpenGL ES function

may I ask whether the OpenGL ES got set function and get function?? This is because I know that Java got this function when we set the value , we manage to retrieve and change it. However, I want to set the rotation, scale and other value of my 3D object in OpenGL ES and able to retrieve it. This means that after the user click the 3D ob...

Rendering A Texture Onto Itself In OpenGL ES

I can comfortably render a scene to a texture and map that texture back onto a framebuffer for screen display. But what if I wanted to map the texture back onto itself in order to blur it (say, at a quarter opacity in a new location). Is that possible? The way I've done it is simply to enable the texture: glEnable(GL_TEXTURE_2D); glBin...

Move an object in OpenGL ES for iOS?

I want to move an object to a specific point on the screen. (Specifically, wherever the user touches, barring any collisions that may interfere.) What OpenGL ES call am I supposed to use for this? ...

How to detect maximum texture resolution on iPhone?

I'm making an universal openGL based app that should work on ipod/iphone 2G/3G/3GS/4 and iPad. To deliver the best possible graphics I need to switch between different texture resolutions based on what device is running it. For example, iPhone 2G needs textures that is no larger than 1024x1024, while iPhone 3GS can handle larger text...

Writing a "Brushes" quality drawing app, need book and resource recommendations

I've spent about a week reading all the freely available information on iPhone drawing, animation, and OpenGL. Using the available iOS drawing examples like Apple's GLPaint and Quartz sample apps I've written a few versions of a painting tool, but I've hit many limitations which I think is due to "not knowing what I don't know." Quartz ...

IPhone OpenGL Textures

Hello, I have been trying to port an older game of mine to iPhone using OpenGL(for the first time). And I have a question about textures; The game consists of characters that walk around and do stuff, each animation has been painted in 8 frames (64x64 pixels each) and in 8 directions. Therefore, a single characters walk animation has 6...

Problem dynamically drawing a cube

Hey guys, I've got a float array camObjCoord declared as.. public static float camObjCoord[] = new float[8000]; I'm then filling its indexes in a class that does something like the following.. public void addcube(float highx, float lowx, float highz, float lowz){ //Constructing new cube... System.out.pri...

Lower FPS to conserve battery life in iPhone opengl-ES application?

I'm wondering about providing an user selected option to lower the framerate in my opengl based game to conserve battery life, and in general detect parts of the game where no movement occurs and lower the framerate there as well (when saying framerate I actually mean the number of times per second the entire screen is redrawn using open...