Subset of the OpenGL 3D graphics API designed for embedded devices such as mobile phones.

learn more… | top users | synonyms

1
vote
1answer
134 views

Android Object get Jagged at the border

I am new to OpenGL ES 1 in android. My 3D Model border getting Jagged. Please help me to look like a smooth border instead of jagged. Screenshot : http://i.stack.imgur.com/1Gq83.png private class ...
0
votes
1answer
156 views

How to set tranparency for one image only in openGL ES in Android?

I code game on Android where I have several sprites. My goal is to set gl.glColor4f(1f, 1f, 1f, 0.2f) a.e. transparency only for specific image. (I don't like Photoshop). In my case its image that ...
2
votes
0answers
222 views

OpenGL ES for Samsung 4 - no textures only white rectangles [closed]

I have Nexsus 4,Samsung 3 and several HTCs and my game works fine. When I launch on Samsung 4 I see white rectangles (empty textures), no errors, Further, my game uses sensors but I see on ...
2
votes
1answer
779 views

How to scale openGL textures by a ratio based on height/width (or alternative)

I have been able to successfully allow my UI to extend over edges of my game on higher resolutions by using the Android Guide and by implementing this code on the GL10 object: ...
2
votes
1answer
303 views

How to know in OPenGL ES android that one object crosses another?

I have 2 objects on the screen: static: non-static: non-static object moves randomly over the screen. How do I know that non-static Object cross the "+" (static). Both objects I draw by using ...
2
votes
1answer
289 views

What is the correct and most efficient approach of streaming vertex data?

Usually, I do this in my current OpenGL ES project (for iOS): Initialization: Create two VBO's and one IndexBuffer (since I will use the same indices), same size. Create two VAO's and configure ...
0
votes
1answer
791 views

How to get drawn Image width/height on the screen with openGL ES on Android?

I need to know how to get drawn image length and width. I have this code so far where I draw Radar in left top corner with hard-coded coordinates: int _SRC = R.drawable._item; ... float ...
3
votes
1answer
733 views

How do I clip an image in OpenGL ES on Android?

My game involves "wiping off" an image by touch: After moving a finger over it, it looks like this: At the moment, I'm implementing it with Canvas, like this: 9Paint pTouch; 9int X = ...
2
votes
0answers
338 views

multi-threading for openGL in Android? [closed]

In my old game based on canvas and bitmaps I used surfaceHolder and Thread to call onDraw: public class GameThread extends Thread { private SurfaceHolder _surfaceHolder; private ScreenObjectsView ...
2
votes
2answers
922 views

Using two shaders instead of one with IF statements

I've been working on porting a relatively large opengl ES 1.1 source to ES 2.0. In OpenGL ES 2.0 (which means, everything uses shaders), I want to draw a teapot three times. The first one, with a ...
3
votes
2answers
137 views

How to change dynamically vertices during call “draw” method?

I'm new in openGL world and I try to figure out followed problem: How can I change size/zoom dynamically for my spritesheet. This class represents some creature fetched from spritesheet and animate ...
4
votes
1answer
123 views

Is it possible to apply a texture inside a GL_LINE_LOOP?

I am creating a game using Box2D and OpenGL ES 1.1. I am taking the b2PolygonShape vertices and converting them into an OpenGL ES 1.1 GL_LINE_LOOP. The debugging view looks great, but now I want to ...
0
votes
0answers
108 views

Motorola Defy (CyanogenMod) and OpenGL ES textures

My friend tested my game on a Motorola Defy (with CyanogenMod v4.x, I don't remember exact version number, and she is not reachable now). My game uses OpenGL ES (v1.1, and in another activity, v2.0). ...
0
votes
2answers
3k views

How to create a projection matrix in OpenGL ES 2.0 [closed]

So I have the following... float s = 0.5f; void renderFrameLine() { glClearColor(0.0f, 0.0f, 0.0f, 1.0f); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); GLfloat vVertices[] = { s, s, ...
0
votes
1answer
945 views

Rendering Texture Quad to Screen or FBO (OpenGL ES)

I need to render the texture on the iOS device's screen or a render-to-texture frame buffer object. But it does not show any texture. It's all black. (I am loading texture with image myself for ...
0
votes
1answer
687 views

Android/OpenGL ES2: How do I set fragment shader value using C;

This should be easy So I am using the following to create a fragment shader. GLbyte fShaderStr[] = "precision mediump float;" "void main() \n" "{ ...
0
votes
0answers
179 views

Android: Using touch does not go to center

I have a simple OpenGL app that draws a circle, I want to move the circle based on where a person touches the screen. The problem is, OpenGL sees the height and width as -1 to 1, whereas Android sees ...
3
votes
2answers
1k views

OpenGL ES 2.0: 2D game rendering, no performance gain with glDraw call batching

I just did a small benchmark. To my surprise batching sprites into a single draw call doesn't give any significant performance boost. Following are my results: Hardware: iPod touch 4 Extra info: ...
7
votes
1answer
1k views

Optimizing performance of a heavy fragment shader

I need help optimizing the following set of shaders: Vertex: precision mediump float; uniform vec2 rubyTextureSize; attribute vec4 vPosition; attribute vec2 a_TexCoordinate; varying vec2 tc; ...
3
votes
2answers
531 views

OpenGL ES 2.0: Enabling hi-res on iOS

I created an empty iOS project and then added a custom GLView class which is then added to AppDelegate. I have following questions: 1) How do I enable hi-res retina mode on iPhone 4? Currently I am ...
1
vote
2answers
378 views

Calling glGetError() in release builds?

Currently, I'm calling glGetError() after each OpenGL function call in order to be able to detect and report bugs. I've been reading that glGetError() calls should be reduced to once per frame in ...
0
votes
1answer
548 views

iOS OpenGL ES 2.0 How to Billboard on Sphere and Rotate with Sphere

I have a sphere (earth) in OpenGL ES 2.0 for iOS. I also have markers that I want to place at lat/lons on the earth - but I want the markers to always face the user ( billboards ) but also move with ...
0
votes
1answer
201 views

bump mapping with 2 normal maps

I was wondering if its actually possible to do bump mapping with 2 normal maps... I have tried doing it this way however I get a function overload on max and dot. uniform sampler2D n_mapTex; uniform ...
0
votes
1answer
124 views

texture movement stutters

Hey I at the moment I have got my texture to move however it stutters as I increment by 0.001 every second. My animation is done via FPS if that make sense and here is some code FrameCount++; ...
0
votes
1answer
222 views

texture won't move OpenGL ES 2.0

I want be able to move my texture in GLSL I have set my texture to wrap S and wrap T but not sure why it wont move my fragment shader looks like this at the moment uniform sampler2D n_mapTex; ...
2
votes
0answers
79 views

OpenGL ES Single Bitplane Texture (or something close)

I'm looking to use a texture to store single bits (or a low number of bits, two or three). This in of itself isn't hard if you're using nearest neighbor sampling with some bit plane unpacking. The ...
1
vote
1answer
173 views

Switching from OpenGL ES 1.0 to 2.0

I have been developing an Android app using OpenGL 1.0 for quite some time using a naive approach to rendering, basically making a call to glColor4f(...) and glDrawArrays(...) with FloatBuffers each ...
-1
votes
1answer
380 views

Why doesn't onSurfaceCreated ever run in this code?

I create my game element this way in my activity: public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); mGame = new Game(this); mGame.bootstrap(); ...
2
votes
0answers
202 views

iPhone GLSL shader dynamic branching issue

I am trying to pass an array of vec3 as uniform and then iterate through them on each pixel. The size of array varies on situations so I can't make the loop with constant number of iterations. ...
1
vote
0answers
66 views

Android opengles how to use glunproject

How to use glunproject in my android app? I have the following parts in my engine: A projection matrix A view matrix for the camera A model matrix for each of the objects in my world. This matrix ...
0
votes
1answer
413 views

Get back or delete an existing OpenGL object, then change it and draw at new. How?

With OpenGL i'm drawing for example a circle. Can i take this drawn circle back out of the window and change something and then draw it back on the window? Or can i /have to delete it and then draw ...
3
votes
0answers
699 views

How to make the background of an OpenGL object transparent? [closed]

It sounds so simple but i didn't get it to work. The Background of my FrameLayout where i add the GLSurfaceView in is colored blue but there is only black. So here is my method to initiate the ...
1
vote
1answer
295 views

How to draw an OpenGL object in another on Android? -> Eyes and Eyeballs

As i allready wrote in another question: I'm working on OpenGL since a Week, so i'm new to the most stuff. (also my englisch isn't the best. Hop you can understand the most anyway) So i'm ...
1
vote
1answer
231 views

How to change/modify or animate an existing OpenGL object on Android?

I maybe know understand it all a little bit better so i thoug i make a new shorter question to eventually get an answer. Get back or delete an existing OpenGL object, then change it and draw at new. ...
4
votes
1answer
2k views

How do I get smooth edges with OpenGL on Android?

Here is a screenshot that maybe makes clear what my problem is. I'm only drawing 2D circles with OpenGL. I already read the following: ...
1
vote
1answer
435 views

Selecting and moving object in OpenGL Gameplay3D Engine

I'm using Gameplay3d as a game engine to develop a simple board game. PEG Solitaire I've come to the part where I've created a 2D grid for all the movable object, empty locations and also where it's ...
2
votes
0answers
246 views

Displacement Mapping opengl-es [closed]

I need to do an application similar to this Morfo. And I posted a question here where the answer states the solution is "Displacement Mapping" . And I googled this to do it in opengles. I couldnt get ...
1
vote
0answers
147 views

Android multi screen rendering

Is it possible on Android to render specifically / only, to the connected Monitor/TV on the hdmi port? If so, is it possible to use OpenGL ES to render a different scene on the monitor and on the ...
1
vote
1answer
256 views

Are interleaved vertex data formats better than non-interleaved formats?

I have been reading up on data formatting for 3D objects so that I can render my meshes as fast as possible in OpenGL. I am quite new to OpenGL so bear with me. The format for interleaving your ...
2
votes
2answers
1k views

GLSL Motion blur on mobile.. possible at acceptable framerates?

I have been struggling to implement a simple linear motion blur effect on mobile (Android, OpenGLES 2.0) but it just seems to destroy my framerate. I'm rendering to texture (FBO) then applying a ...
7
votes
1answer
511 views

How wise is this multithreading architecture?

I'm rewriting a game engine I wrote in an attempt to parallelize as much as possible. I'm considering making properties which may be accessed from multiple threads all use accessors which use boost ...
0
votes
1answer
1k views

Create cylinder using OpenGL-ES [closed]

I want to draw cone using OpenGL ES I have gone through many links to draw cylinder but I don't have any idea or approach to draw the cylinder. I've seen the gluCylinder function for OpenGL, but no ...
0
votes
0answers
80 views

Make a layer over an image and adjust its co-ordinates by touch

I need to make a layer over an image and adjust the layer to fit to image and get its co-ordinates of the layer. I need to adjust the layer by touch and pinch. The sample image is as below. I need ...
3
votes
1answer
203 views

Rotate an image and get back to its original position - opengles glkit

I need to rotate an image in opengles GLkit and get it back to its original position in GLkit. rotation += 5; _modelViewMatrix = GLKMatrix4Rotate( _modelViewMatrix, GLKMathDegreesToRadians(5), 1, 0, ...
1
vote
1answer
217 views

opengles display human face in iphone and animate it?

I need to make a human 2D face to 3D face. I used this link to load an ".obj" file and map the textures. This example is only for cube and pyramid. I loaded a human face ".obj" file. This loads the ...
1
vote
1answer
400 views

OpenGL ES screen to world coordinate

I am currently attempting to convert my screen coordinates to world coordinates, to be able to interact with objects. I am using glm and unProject to try and achieve this, so far this is my code: ...
1
vote
1answer
112 views

Does iOS support BC4 compressed texture?

I've been designing a new OpenGL image algorithm using BC4 textures at its core. It works well accross Windows and Mac, my main targets up to now. But today, the customer added a new requirement : it ...
3
votes
2answers
1k views

Improving performance of a particle system (OpenGL ES)

I'm in the process of implementing a simple particle system for a 2D mobile game (using OpenGL ES 2.0). It's working, but it's pretty slow. I start getting frame rate battering after about 400 ...
1
vote
2answers
235 views

How to get a texture from current point of view in OpenGL 2.0 ES?

Probably the title is confusing, but I didn't know how to ask better, sorry about that. What I would like to do is get a bitmap texture that represents exactly what's rendered at one point in time and ...
2
votes
1answer
1k views

Trying to run sample AndEngine gles2 code in the simulator throws “java.lang.IllegalArgumentException: No EGLConfig found!”, how can I fix this?

I tried to run a small sample game code in the emulator but it crashed. My LogCat is given here. Can you help me resolve the issue. 02-23 15:18:50.543: D/AndEngine(636): MainActivity.onCreate ...