opengl-es

Perfomance difference between Open GL and UI kit for a map based application

I am currently working on a navigation based app which uses third party maps. I use a lot of tiling. Though the maps are of very high resolution, I estimate an average of 6 tiles each of 256 * 256 pixels loaded . I might refresh the tiles like once in five minutes. I am currently using UIScrollview + tiles... Should I really switch to O...

Basic OpenGL ES Texture problem / Android

I'm having great difficulty getting basic textures to work in an OpenGL ES app on my Droid (2.1-update1). I trying to render a simple textured quad - four vertices, two faces, with normals and texture coords. When rendered, the texture is garbled and full of static, similar to TV noise. Here's a pic showing the original texture...

Use Cocos2d Within a Single iPhone View

I have an iPhone application that is mostly using standard controls. There is one view that is rendered in OpenGL (fancy graphs). In the interest of saving myself a lot of work, I looked around and found Cocos2d. It looks like it has exactly what I need (OpenGL ES, relatively simple to work with), but I've run into a problem. I don't kn...

Ipad, can I detect device rotation without using view controllers?

I am making an Ipad app and im not using the views and view controllers (Except to call my own openGl drawing funcitons) I want the app to be able to change its drawing orientation depending on how the device is held. However with the research that ive done all I can find is how to do it through view controllers and accelerometers. Is ...

3d coverflow in Open GL

Hi all, Is there any coverflow control(commercial/free) available on Web which is developed in Open GL ES? Thanks in advance... ...

How to set up the arrays for glDrawElemetnts (OpenGL ES iPhone)?

How to wire up the values for glDrawElements? I need a simple textured square example (2 face, normals, textCoords, nothin' more). I tried to do it (the arrays at glDrawArrays implementation works fine, but something went wrong when I create the indices and all), but the screen was empty. Please shed me a light, I've googled the whole ...

draw a cube at specific co-ordinates?

Hey Guys, I'm looking to draw a cube at specific co-ordinates. I've got all 4 corners and the centers x/y value. I now want to construct a cube at those co-ordinates. Does anyone know of any tutorials or have any information on how I would go about said task? Ive got the following code. I'd like to map each of its corners to a specific...

opengl camera question

Hi everyone, I am trying to set up a 3d openGL scene just like in the image below. I have a few different 2d squares (x,y) in that scene. The camera has the position (0,0,-5). Now I want to be able to rotate the camera to see the squares on the upper left side. How can i manage to do this? I tried rotating my camera. Problem is, that th...

Cutting part of texture

Hey guys I'm writing for iPhone, OpenGL ES Do you know how can I draw quad with part of particular texture? Now I'm rendering like that: static const GLfloat texCoords[] = { 0.0, 0.0, 10.0, 0.0, 10.0, 10.0, 0.0, 10.0 }; glBindTexture(GL_TEXTURE_2D, atlas_tex[0]); GLfloat squareVertices[] = { 0.0f, 0.0f, 2000.5...

OpenGL textures fails on Motorola Milestone

Hi, I have troubles with OpenGL textures on Motorola Milestone with 2.1 firmware. Each call to glGenTextures fails with error GL_INVALID_OPERATION and sets the id with random numbers. The exact same application works on G1 without any error. Does anybody have a hands-on experience with a similar issue and knows a way around? ...

How do I select an object in OpenGL ES?

I'm writing an iPhone/iPad app using OpenGL ES. I'd like to select (or pick) one of the 3D objects by tapping. In OpenGL, there seems to be the way using glSelectBuffer() and glRenderMode(GL_SELECT) for this purpose, but these are not available in OpenGL ES. How do I select an object in OpenGL ES? I saw the same questions in some for...

gluLookAt accelerometer

Hi everyone, I am currently coding a little AR-Game for myself using the iPhone 3GS ;-) I want to use the accelerometer & compass data for rotating my camera in opengl. The camera has a fixed position and can only rotate due to the accelerometer. The iPhone is initially rotated 90° to have a bigger widescreen ;-) So the axes are switch...

Android OpenGL .OBJ file loader

There seem to be quite a number of OBJ mesh file loaders out there that people have developed for use on the Android platform. I'm wondering if anyone has any experience with these and can offer a recommendation on which one seems to work best for them. Here are my criteria: Lightweight (small file size), Optimized for speed, Easy to...

Can the full 326 ppi of iOS 4 be used for openGL?

While testing my openGL ES app on the new iPhone 4, it seemed as if the openGL wasn't using all 326 ppi, rather the 163 ppi found on the 3G, because of noticeable pixelation. I realize there are 4 times more pixels to calculate, but shouldn't the A4 chip compensate for this? I'm sure there is a way to take advantage of the stunning res...

Is it slower to draw small sprites with large textures on iPhone?

I'm looking for ways to optimize opengl rendering in my iPhone game. I wonder if anyone has experience with the impact of texture size when it comes to rendering a sprite? For example, would a sprite rendered as a 100x100 pixels big rectangle render slower if it's texture source is 512x512 pixels rather than say 32x32 pixels? ...

Universal app wont launch in iPad mode?

For some reason my universal app suddenly does not want to launch in fullscreen iPad mode, but it used to do so. I am really not sure what happened. The iPad target is set to iPhone Devide 3.2 and the iPhone OS deployment target is iPhone OS 3.2 as well. I have set the Targetted device family to iPad. Yet, the app keep launching into ...

Draw with newcolor instand of old color

Hi,I modify the sample code called GLPaint.And I want to draw with new color replace the old color,so we just see the last paint color.The sample code is mix the colors which isn't I want. What can I do? ...

What's the proper way to handle the Activity lifecycle with OpenGL

I'm really struggling here, and it's holding me back. What is the correct way to handle OpenGL, and an Activity - which launches sub-activities, or goes back to the home screen. And have it resume just exactly where it was. I have it semi-working as it stands, textures/VBOs are reloaded at onResume() when needed. But sometimes, when l...

Pressing Home triggers onCreate

I have an Activity that has a GLSurfaceView. I'm struggling to rewrite it so that I don't go to black screen after Home button, or coming back from a startActivityForResult ... Ignoring that part, why does this happen: I press Home button, and the following methods are triggered. onSaveInstanceState onPause() onStop() onDestroy() onC...

Why is my object disappearing after using gluLookat for OpenGL ES 2.0?

I'm putting together a simple game for the iPhone, and am trying to implement the effect of moving the camera around the GLView. I'm drawing about a hundred objects using glDrawArrays with vertex and color pointers. After this, I want to move the camera to the right by 1 unit. This is the snippet of code I have in my drawView method. I...