opengl-es

How to get the location (x,y) of a CCLabel that is a child of a CCScene?

(learning Cocos2D) After creating a CCLabel and adding it to a CCLayer like this: //From HelloWorldScene.m // create and initialize a Label CCLabel* label1 = [CCLabel labelWithString:@"Hello" fontName:@"Marker Felt" fontSize:10]; label1.position = ccp(35, 435); // add the label as a child to this Layer [self addChild: label1]; Ho...

Does iPad or iPhone support OpenGL ES 2.0?

Does iPad or iPhone support OpenGL ES 2.0? How about iPhone os 4.0. Is this supported by the OS or the hardware? And can anyone recommend some books on OpenGL ES development on iPad or iPhone? Thanks! ...

How does the iPhone know which OpenGL ES context to use between 1.1 and 2.0?

I've been digging around the net recently and noticed some video tutorials show an older template (pre SDK 3.2) with one OpenGL ES context. Now there are two of them, which, I've gleaned are the two versions of OpenGL ES available on the newer iMobile devices. Can I just use the older one or do I need to do everything twice? How do I ...

3D Animation in Java/J2ME?

how to do the 3D Animation in java? what are the packages to be needed? i am very newbie about this topic. Sample Code, Tutorials and articles are more thankful. Tell me how i have to start please? NOTE: its for Mobile Appication. ...

iPhone OpenGL ES missing functions should be there - glBlendFuncSeparate etc

I'm using OpenGL ES 1.1 on the iPhone, and I'd like to use the following functions: glBlendFuncSeparate glBlendColor With their related constants. These didn't exist in early iPhone GL implementations, but according to this page: http://developer.apple.com/iphone/library/releasenotes/General/iPhone30APIDiffs/index.html they should be...

Lighting and OpenGL ES

Hi all, I'm working on getting a simple lighting right on my OpenGL ES iPhone scene. I'm displaying a simple object centered on the origin, and using an arcball to rotate it by touching the screen. All this works nicely, except I try to add one fixed light (fixed w.r.t. eye position) and it is badly screwed: the whole object (an icosahe...

How to overlay GLSurfaceView over a MapView in Android?

Hi, I want to create a simple Map based application in android ,where i can display my current position.Instead of overlaying a simple Image on the MapView to represent the position, i want to overlay the GLSurfaceView on the MapView. But i don't know how to achieve this. Is there any way to do that?. Please anybody knows the solution h...

Draw image using OpenGL ES

Hi friends ,I want to draw an image using OpenGL ES for Android 2.0 I got pixel position of image ..How can I perform Please reply Thnx in Advance.. ...

Draw Pixel using OpenGLEs for Android

How can I draw a pixel(2D view)for Android using OpenGlEs. In Simple when we use draw(Canvas canvas){...} to draw, so using it we draw canvas.drawPoint(i, j, paint); ..but in OpenGlEs still I haven't got any function like it. Please reply Thank in Advance ...

How to render images in iphone sdk?

hi, I am new in the field of iphone development. I want to render two images with the help of openGL one over the other the first image act as background and on the second image when the user touches then a method will execute. Please help me out how to render these images. thanks in advance ...

OpenGL, how to set a monochrome texture to a colored shape?

I'm developing on Android with OpenGL ES, I draw some cubes and I change their colors with glColor4f. Now, what I want is to give a more realistic effect on the cubes, so I create a monochromatic 8bit depth, 64x64 pixel size PNG file. I loaded on a texture, and here is my problem, which is the way to combine the color and the texture to ...

Mapping irregular shapes or other polygons (cartoons, sprites) to triangles in OpenGL ES

I don't understand the concept of showing sprites mapped into OpenGL Triangles. If OpenGL ES only draws triangles and points, How do you display/map non-triangular shapes? Why would a shape mapped to a triangle not be distorted? To explain: In my mind, mapping, say, a sprite of Mario, to a triangle would produce a distorted or cropp...

opengl problem works on droid but not droid eris and others.

This GlRenderer works fine on the moto droid, but does not work well at all on droid eris or other android phones does anyone know why? package com.ntu.way2fungames.spacehockeybase; import java.io.DataInputStream; import java.io.IOException; import java.nio.Buffer; import java.nio.FloatBuffer; import javax.microedition.khronos.egl.EGLC...

Flash like animation editing and container format for OpenGL environment?

Are there ANY tools that lets an animator / designer create scripted animations that can export to an OpenGL compatible format -- that are similar to the timeline editing in Flash or After Effects? Does OpenGL ES have some kind of animation playback or container format? ( is there something similar to .swf for OpenGL? ) Im looking for ...

OpenGL ES 2.0 equivalent of glOrtho()?

In my iphone app, I need to project 3d scene into the 2D coordinates of the screen for some calculations. My objects go through various rotations, translations and scaling. So I figured I need to multiply the vertices with ModelView matrix first, then I need to multiply it with the Orthogonal projection matrix. First of all am on the ri...

Rapid taps on an OpenGL ES app introducing input delay

I am starting out writing a 2D game in OpenGL ES, and I have encountered an odd problem: if I rapidly tap the touchscreen, the input starts lagging behind the display. The more times I tap, the more delay it causes between the input and any indication of that input onscreen. It only happens if I intentionally tap very rapidly, but not ...

iPhone - Drawing 2D with OpenGL ES, fast and simple.

I'm going to make a game for the iPhone, and I'm mostly going to be using images. I've read that using Quartz only is slow for actual games with high frame rates, so I was wondering if you guys had any good ideas for using OpenGL for rendering a game scene? I'm going to be using a lot of images, and I want to be able to freely rotate th...

iPhone OpenGLES textures - colour banding

I've got a problem with openGL on iPhone which I'm sure must have a simple solution! When I load a texture and display it, I get a lot of what I believe is called 'Colour Banding', whereby the colours, particularly on gradients, seem to get automatically 'optimized'. Just to demonstrate that this wasn't anything wrong with my own code...

Optimizing an iphone app for 3G in landscape with opengl, camera, quartz

I have an iphone app that basically uses the camera, an opengl layer, and UIViews (some drawing with Quartz). It runs ok on 3GS, but on the 3G it is unusable. Particularly, when I press a UIButton, it literally takes sometimes 10 seconds to register the press. Shark doesn't do me much good because it crashes when I try to profile even...

OpenGL ES - texture map all faces of an 8 vertex cube?

Working through some OpenGL-ES tutorials, using the Android emulator. I've gotten up to texture mapping and am having some trouble mapping to a cube. Is it possible to map a texture to all faces of a cube that has 8 vertices and 12 triangles for the 6 faces as described below? // Use half as we are going for a 0,0,0 centre. width /...