OpenGL ES 2.0 emphasizes a programmable 3D graphics pipeline (comparing to fixed-function pipeline of OpenGL ES 1.1).

learn more… | top users | synonyms

2
votes
0answers
51 views

OpenGL light appears to move with camera and changes with object rotation

I have a working open gl es 2.0 3d engine (my own) that I've used in several iOS apps. I recently noticed that on a mutli-symmetrical object the lighting didn't look the same at each rotation. For ...
0
votes
1answer
23 views

How to display a model in Android via openGL ES [on hold]

I have gone through this tutorial and would like to move on to models as opposed to geometric shapes (yes, I know that they are still made out of triangles..) I have found some interesting models ...
1
vote
1answer
46 views

model view projection multiplication order

I'm debugging a lighting problem where the camera position is effecting the diffused lighting component on my 3d model. In researching my problem I went back and am reading over all the how to ...
1
vote
0answers
30 views

Libgdx implement 2d drop shadow for transparent sprites

I am a libgdx learner. For an learning application that I am developing using libgdx on android, I need to show drop shadow or glow effect when a sprite is touched. The sprites are created from a ...
-1
votes
0answers
23 views

Font not display on ASUS devices

I have developed following simple game and launch in market. TAP! TAP! TAP! But in that I have found one problem. When I test game in ASUS device it can't able to render any font available in game. ...
0
votes
1answer
40 views

Android : How to get screen size in exact pixels ? (OpenGL render surface size etc)

On every single android device {emulators} from ldpi to xxhdpi, both DisplayMetrics and native JNI EGL return width:320 and height:526. Even on actual HTC ONE mobile it returns something like 320x526. ...
0
votes
1answer
19 views

libgdx texture edge blending problem

I have two completely white bitmaps here: They're there, trust me. When I put one on top of the other and scale them down with TextureFilter.Linear I get this: How do I get rid of the dark ...
1
vote
0answers
40 views

Generate ETC2 compressed texture from Android Bitmap in OpenGL ES 2

My app currently uses a lot of textures most of which probably could be compressed quite a lot by using ETC2 (my app runs on 4.4 so i have a lot of devices supporting GLES30), i cannot use ETC1 since ...
1
vote
1answer
47 views

Is it possible to look up a texel from a texture in GLES2 GLSL framgent shader without using sampler?

Is there some way I can directly access texture memory from fragment shader in GLES2 GLSL? I don't need the sampler to be involved since I am just using it as a look-up table.
1
vote
0answers
28 views

Is it possible to use unnormalized texture coordinates from a GLES2 GLSL fragment shader?

I want to look up a texel from my GLES2 GLSL fragment shader using un-normalized texture coordinates (0-w, 0-h instead of 0-1, 0-1). The reason is that this texture is used as a look up table and I ...
0
votes
0answers
46 views

OpenGL ES 2.0 - Applying rotation to only specific quads within a batch

This problem seems fairly simple on the face of it: How, when drawing a batch of quads using a triangle strip, can I apply a rotation to only one or some of the quads. I've been looking at this ...
0
votes
2answers
49 views

Getting the correct texture from an Atlas

I'm writing an OpenGL ES (2.0) app and have a custom Quad class which draws a textured quad for my sprites. Currently, I put the textures of any sprites of the same size into a single file or atlas, ...
2
votes
1answer
176 views

Avoiding memory allocation in Android game development

For obvious reasons, allocating memory on the fly in Android game development is not recommended. For example: http://developer.android.com/training/articles/perf-tips.html: There are two basic ...
0
votes
0answers
55 views

Shadow mapping comparing depth in GLSL

I've been trying to figure out how to compare against my shadow map, which has a shader that just does the following: gl_FragColor.r = gl_FragCoord.z; And my vertex shader for the render pass does ...
0
votes
1answer
106 views

OBJ Model not being rendered properly in OpenGL ES 2 android app

I have an Android OpenGL ES 2 app that loads an .OBJ model using Assimp and renders the same. The vertices data is stored in a object declared like this : class CGameObject { public: struct _Mesh { ...
0
votes
1answer
138 views

Problem rendering simple OBJ model using assimp in android app

I am trying to load an OBJ model (http://pastebin.com/usGFkf4e) into an Android app using Assimp 3.1.1 Assimp model loaded like this : bool CGameObject::LoadModelFromFile(AAssetManager *amgr, ...
1
vote
2answers
33 views

Convert trianlge mesh to group of Line segments

I have a 3D .OBJ model file, that is loaded in my OpenGL ES 2 android application using Assimp library. All the faces are triangulated. I want to draw the wireframe for my mesh. In OpenGL we have ...
3
votes
1answer
103 views

How to specify colour in a single 32 bit value

I'm writing my first game using OpenGL 2 ES (for Android), and I've currently got a particle engine and some player sprites running successfully. I'm using 4 floats for the colour of each particle ...
1
vote
1answer
147 views

OpenGL (ES 2.0) Function Dependencies

In OpenGL (ES 2.0), there are many functions that can be called in any order, and still others that must be called after other functions had been called and not before. For example, attaching a shader ...
1
vote
2answers
72 views

Vertex Skinning Looks Messy on Real Android Device using Monodroid

I have no problem doing the "vertex skinning" for three-dimensional animation. All goes well when using the emulator (and genymotion). However, when run on a real device (such as Samsung and Lenovo) ...
2
votes
1answer
153 views

OpenGL ES draw pre-rendered background onto depth buffer

I want to create a scene with 2D pre-rendered background and 3D models for characters (like those classic Final fantasy games). For the background, I have 2 textures: one to be displayed, with ...
1
vote
0answers
33 views

Android OpenGLES, getting number of fragments passed depth test/Occlusion Query?

Afeter reading many blogs and searching on Internet, I did not get any sloution for getting number of fragments/pixels which are occludded or not occludded of the object on OpenGL ES3.0 Android ...
0
votes
1answer
55 views

Offset a camera/render without changing perspective

I need to offset a render so that the perspective / vanishing point doesn't change. Or another way to look at it is that I need to adjust the vanishing point in my view so that instead of being at ...
1
vote
1answer
96 views

Interpolating rotated objects

I've finally got interpolation working to 'smooth' out movement, however it doesn't seem to work for objects that are rotating (around their own center) - when I try to do this, the objects in ...
0
votes
0answers
149 views

geometry shader shim for opengl es 2.0

I just have a few months of OpenGL experience, just starting to get the hang of it. I find geometry/vertex/fragment shaders to be very powerful. You have a few parameters that translates into a ...
3
votes
1answer
108 views

Desaturate texture using mask in OpenGL 2

I have a very large texture i am using as background and i want to apply a filter to a small part of it, the "small part" is defined by the alpha layer of another texture i have (which is still ...
0
votes
0answers
97 views

How to pause animation when leaderboard is displayed?

I've notived in some games from the Play Store that when you access the Play Games Leaderboard, the game itself is still visible in the background (as if the leaderboard activity is 'transparent') and ...
7
votes
2answers
213 views

How to avoid subpixel values in a resolution independent 2D game with orthographic projection?

I'm trying to do resolution independent rendering of moving sprites in a 2D game. My plan is work in a fixed coordinate system in my world (for example 960x540) and use orthographic projection to ...
0
votes
1answer
117 views

Opengl ES 2.0: Is there a way to use less resources to draw in-game background texture

1.Should my in-game background be drawn with my game loop renderer, or if 2.I don't want to draw my background image every frame in my main renderer since it could possibly be a heavy job while the ...
1
vote
1answer
85 views

Does scaling affect performance in OpenGL? [closed]

I've never been able to understand the best practice in this context. I usually want to ship my game with as minimum size as possible. So whereever possible, I try to use scaling of my graphics. Let's ...
1
vote
1answer
166 views

cocos2d-x “immediate mode”?

I have some c++ game code that draws the game state on each game-loop cycle in "immediate mode". By that I mean that the game code does not add the sprites to be drawn to any sort of "scene graph" or ...
1
vote
0answers
98 views

OpenGL ES 2.0 state management best practices [closed]

I use a game engine with dynamic sprite batching for 2D games on mobile platforms (MOAI SDK). It already handles redundant state changes pretty well - with the use of texture atlases it only flushes ...
0
votes
1answer
52 views

Batching and object's transformation

I'm trying to implement batching in my game (Sprite batching and 3D Mesh batching), I've read a lot of documentation about that but I don't understand something: When each object have is own ...
0
votes
0answers
42 views

Barycentric vertex coordinates in GLES 2.0

I have a certain set of polygons, which are stored in a vertex buffer and an index buffer. The polygons are textureless and normalless. The polygons are dynamic, their buffers get constantly emptied ...
0
votes
1answer
120 views

Java Buffers and OpenGL ES 2.0 (Android)

I've been trying to come up with a good solution for preloading textures asynchronously, but in Android with OpenGL ES you cannot create a texture out of context. Would the proper solution be to load ...
1
vote
2answers
100 views

Replace each white spot of image to radial gradient

Recently, I read an article about a sun shader (XNA Sun Shader) and decided to implement it using OpenGL ES 2.0, but I encountered a problem with the shader: I have two textures, one of them is the ...
0
votes
0answers
295 views

Android - OpenGL ES 2 - Cube with different texture in each side

I need to create a 3d cube, with a different texture on each side. Here is my cube class, which my other classes extend: import java.nio.ByteBuffer; import java.nio.ByteOrder; import ...
0
votes
2answers
439 views

How to change from 60FPS to 30FPS while keeping things smooth?

Here is my current game loop: final int ticksPerSecond = 60; final int skipTicks = (1000 / ticksPerSecond); float dt = 1f/ticksPerSecond; while(System.currentTimeMillis() > nextGameTick ...
0
votes
0answers
141 views

Vsync and Gameloops

I was about to publish my app but I tested it on a cheap Android tablet. It's anew tablet, but a cheap / low spec one. The game runs, but is pretty choppy. I'm made a discovery that quite surprised ...
1
vote
3answers
558 views

Reducing APK File Size by using JPG instead of PNG for game background images

I've just finished my (openGL ES 2.0 Android) game and it's almost ready for Alpha-testing. When I export the application to an APK File, the file is taking up 16MB and I would like to reduce this as ...
1
vote
2answers
111 views

Bad pixels on shader when loading cached binary programs

I have been trying to cache binary shader programs in my game and load them accordingly using "glGetProgramBinaryOES" and "glProgramBinaryOES" respectively. I was successfully able to cache and load ...
1
vote
1answer
71 views

XY Location scaling with varying density screens

I have a phone with resolution H=1280,W=720,Density=2 I have a tablet with resolution H=1216,W=800,Density=1.331 I drew a rectangle on my phone with corners Left,Top (-1.6,1.55), Right,Bottom ...
0
votes
0answers
54 views

Camera movement in Super Hexagon

I do realize there is no camera in OpenGL ES 2, but from my understanding you can simulate one using view and projection matrices. I'm using Android, by the way. Here's a video of the game, in case ...
0
votes
1answer
142 views

Re-using one texture for multiple OpenGL Quads

I've been looking over my code and I'm just wondering, when I set a texture for say, 20 quads that need to use the same texture, it seems as though I'm creating a new texture each time...... surely ...
0
votes
2answers
121 views

How to obtain the currently bound texture ID in an openGL ES 2.0 project

In my game, I have: GLES20.glBindTexture(GLES20.GL_TEXTURE_2D, texID); Where texID is an integer returned by my setTexture() method. Let's say, in this instance it's 1. When I bind my textures ...
0
votes
0answers
100 views

Scaling issues with Open GL viewport / scissor box (Trying to draw outside of viewport)

In my game I am currently scaling the viewport so it retains the ratio of my development device like so: width = (int) Math.min(deviceWidth, deviceHeight * 1.702127659574468); //1.702127659574468 is ...
1
vote
0answers
212 views

Export Blender 3D animation to be played by Android OpenGLES

Below code snippet shows the way to export coordinate of bones: def export_bone_matrix(armature, bone, label, file_handler): SystemMatrix = Matrix.Scale(-1, 4, Vector((0, 0, 1))) * ...
1
vote
3answers
1k views

Confusion over GLViewport

I'm hoping someone can help me understand the GLViewport and what happens when we resize it This will illustrate my confusion.... So, here I have a quad stuck in the middle of the screen. If I ...
8
votes
1answer
232 views

How can I reliably implement GPU skinning in Android?

I'm trying to get character skinning working on Android. The idea is quite vanilla: I have my skinning matrices, and along with each vertex, I send up to four matrix indices and four corresponding ...
0
votes
0answers
74 views

Deleteing Textures in Android OpenGL ES 2.0

I'm confused about how to delete a previously applied texture. So, I've applied my texture and am happily rendering it. I decide I want to delete the texture, so this is what I've tried...... void ...