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

learn more… | top users | synonyms

0
votes
1answer
99 views

How do I load BSP files in Android?

I understand that Opengl directly cannot load BSP files. How would I go about loading them into my Android game?
2
votes
2answers
717 views

OpenGL texture on sphere

I want to create a rolling, textured ball in OpenGL ES 1.0 for Android. With this function I can create a sphere: public Ball(GL10 gl, float radius) { ByteBuffer bb = ...
0
votes
1answer
2k views

How to do frame by frame animation in android using open gl es

I have application in some part i am using AndroidDrawable for animation but it giving jerking effect that why i planed to change the code to Open Gl ES for better performance .so far i have googled ...
4
votes
1answer
171 views

GetData() error creating framebuffer [closed]

I'm currently porting a game written in C# with XNA library to Android with Monogame. I have a Texture2D and i'm trying to get an array of uint in this way: Texture2d textureDeform = ...
1
vote
1answer
571 views

rendering transparent meshes in LibGDX

Building open this tutorial - https://code.google.com/p/libgdx/wiki/ProjectionViewportCamera I have constructed a class for generating polygon meshes. But i cannot figure out how to render semi ...
1
vote
1answer
935 views

how to make cross platform 3d games using modern opengl? [closed]

How to create games that run on windows, Linux, mac os x, android, ios, wp8 etc.... using c/c++, opengl 3 or 4 and opengl es 2.0. any tutorials or videos on how to create cross-platform 3d games.
3
votes
1answer
739 views

Sprite sheet textures picking up edges of adjacent texture

I have a custom sprite routine (openGL 2.0) which uses a simple sprite sheet (my textures are arranged horizontally next to each other). So, for example, here is a test sprite sheet with 2 simple ...
-2
votes
2answers
130 views

In OpenGL, how to confirm a primitive is rendered properly

I have to confirm that a primitive (say triangle) is rendered properly in opengl. I can use the glGetError() after a opengl draw calls(glDrawElement/glDrawArrays) Is it enough to confirm ? Is there ...
1
vote
0answers
59 views

OpenGL ES - jagged edge [duplicate]

I need to render roads and some direction marks on top of them. I render roads as triangled geometry, same goes for marks (see picture - road is purple, mark is red, ignore z-fighting). Problem goes ...
1
vote
1answer
149 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
178 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 ...
1
vote
0answers
236 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
1k 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
327 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
336 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
965 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
829 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
372 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 ...
4
votes
2answers
1k 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
142 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
134 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
114 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
1k 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
811 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
190 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
623 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
463 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
589 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
213 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
138 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
252 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
87 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
199 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
489 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
229 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
68 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
470 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
789 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 ...
2
votes
1answer
311 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
270 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
486 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
272 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
155 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
349 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
2k 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
542 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 ...