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

3
votes
1answer
3k views

Sea water shader using only fragment processor

I have a game that runs on mobile devices (OpenGL ES 2.0) and for which I would like to create some sea water using the shaders. Now, the plane on which the sea water texture will be has only 4 ...
3
votes
1answer
486 views

how to do sprinkle effect of water in opengl in android?

I want to achieve sprinkling effect of water in android using opengl. so, do i need to achieve it with graphics? is there any other way to do it using opengl? or how can i start working on this,any ...
3
votes
1answer
100 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 ...
3
votes
1answer
89 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 ...
3
votes
2answers
2k views

Android: Loading bitmaps without premultiplied alpha (OpenGL ES 2.0)

Is this possible? To load textures in non-premultiplied format (Straight alpha?)? My game has 1 or 2 images which have semi-transparent pixels and I need to be able to fade them in and out but this ...
3
votes
1answer
258 views

Cut a translucent square in a texture

How to remove (cut-out) a transparent rectangle in a Texture, so that the hole will be translucent. On Android I would use the Xfermodes approach: ...
3
votes
1answer
340 views

Fill texture with white color

How to paint texture with white color? Example what I mean: SpriteBatch.setColor changes tint only.
3
votes
1answer
589 views

Can glTexImage2D() use an already existing memory block?

Can I use glTexImage2D() and / or glTexSubImage2D() (or maybe there's some other method I don't know about) with an already existing block of memory, instead of always uploading the changed pixels? I ...
3
votes
1answer
231 views

Why did an Android update disable the textures in my game?

I recently updated my tablet to Android 4.0.3 and now the textures for my game do not show up. I'm using OpenGL-ES 2.0 for my engine. It worked fine when I was running android 3.0. Is there any ...
3
votes
1answer
172 views

Texture mapping a complex object on openGL ES

I dont have much experience with openGL ES (or openGL), but i do get the general idea of texture mapping, which is each vertex should be mapped for the relevant UV coordinates of the texture we choose ...
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 ...
3
votes
2answers
2k views

OpenGL GL_TRIANGLE_STRIP creating grid with degenerate triangles / for one draw call

I need to create a grid ready for GL_TRIANGLE_STRIP rendering with One drawcall - so i need to degenerate the triangles. I am almost there but missing last row/column and can't figure out why. My ...
3
votes
1answer
309 views

cocos2d mask rotation

I've been experimenting with Ray Wenderlich's tutorial about masking sprite using shaders with cocos2D 2.0. It works pretty well but now I'd like to rotate the mask independently of the masked ...
3
votes
1answer
223 views

Book and resource about vanilla OpenGL ES 2.0 development

I found this book but it talks about an SDK created by the author rather than pure simple OpenGL ES 2.0; this sounds more like a commercial to me than a good book for programming. I would like to ...
3
votes
1answer
7k views

OpenGL ES 2 on Android: native window

According to OGLES specification, we have the following definition: EGLSurface eglCreateWindowSurface(EGLDisplay display, EGLConfig config, ...
3
votes
1answer
922 views

How can I tell if OpenGL has finished rendering the current frame?

If I make a call to http://developer.android.com/reference/android/opengl/GLSurfaceView.html#requestRender() from my game loop, how can I tell when OpenGL has finished rendering? I don't want to ...
3
votes
1answer
921 views

Proper way to maintain Vertex Buffer Objects

I've started learning WebGL, currently I'm building a 2D lighting system, but there is some confusion going on inside my head. How the lighting works is based on this tutorial ...
3
votes
0answers
78 views

Using GLES 2.0 producing a blank screen after the game is quit in LibGDX [closed]

I am making a 2D tile based game in LibGDX. I am using Scene2D Stage in my Screens. I am also using GLES2.0 in my game. When I changed from GL10 to GL20. On pressing the back button, my game is ...
2
votes
3answers
3k views

Mesh with quads to triangle mesh

I want to use Blender for making models yet realize some of the polygons are not triangles but contain quads or more (example: cylinder top and bottom). I could export the the mesh as a basic mesh ...
2
votes
2answers
2k views

Are there any OpenGL ES 2.0 examples for JOGL?

I've scoured the internet for the last few hours looking for an example of how to run even the most basic OpenGL ES 2 example using JOGL but "by Jupiter!" it has been a total fail. I tried ...
2
votes
1answer
257 views

Keeping everything within one Activity

Overview My game is currently based on a single activity (rather than multiple activities) and I would like to keep it that way. At the moment, it goes straight into the game at level 1. I will ...
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 ...
2
votes
2answers
3k views

What is the proper use of CADisplayLink, and where do I put game logic?

I have an iOS OpenGL ES 2.0 game and currently have a CADisplayLink with a :render method. In this render method I do all the game's logic updates and drawing. Is this correct? Or should my game ...
2
votes
1answer
955 views

gluLookAt on OpenGLES2

gluLookAt is not available in OpenGLES 2. OpenGLES 2 is also using floats not doubles. Taking the description on the gluLookAt man-page, I have implemented it like this: void ...
2
votes
1answer
3k views

How can I write only to the stencil buffer in OpenGL ES 2.0?

I'd like to write to the stencil buffer without incurring the cost of my expensive shaders. As I understand it, I write to the stencil buffer as a 'side effect' of rendering something. In this first ...
2
votes
1answer
123 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 ...
2
votes
1answer
281 views

How do I draw an animated object in OpenGL ES?

I have a VBO, which I initialise like this (just an example): - (void)setupVBOs { GLuint vertexBuffer; glGenBuffers(1, &vertexBuffer); glBindBuffer(GL_ARRAY_BUFFER, vertexBuffer); ...
2
votes
2answers
156 views

What are the pros. and cons. of different representations a custom geometry format for a mobile based engine?

I am trying to create 3D model importer for my mobile based engine. These are what I am considering: Convert .obj file to text based structure like JSON or custom. So, basically, convert .obj ...
2
votes
1answer
191 views

What is faster - loop in shader vs draw-call

I am doing some program, that can be written in two ways. render full screen quad and send some additional info to fragment shader. But in fragment shader I need to perform for-loop Move the loop to ...
2
votes
1answer
331 views

Full-screen post-processing and texture size

I am newbie writing a post-processing code for mobile devices, and asking some trivial, conventional solution for a specific problem. AFAIK, post-processing in OpenGL is trivially done with FBO bound ...
2
votes
1answer
795 views

Separate renderng thread in Android (OpenGL ES 2.0)

I'm used to mainly working with the Canvas SurfaceView API on Android and have recently been learning openGL ES 2.0 With canvas I know that surfaceView gives you the ability to start a new thread to ...
2
votes
2answers
189 views

how to render small texture on another texture?

can anybody help me to render small texture on another texture. i.e I have one background image, when user touches on the screen it should draw small(circle or any object) on it. can anybody suggest ...
2
votes
1answer
490 views

cocos2d/OpenGL multitexturing problem

I've got a simple shader to test multitextureing the problem is both samplers are using same image as their reference. the shader code is basically just this : vec4 mid = ...
2
votes
1answer
150 views

How to implement custom texture formats in Android?

What I know: Android can load PNG, BMP, WEBP,... via BitmapFactory. What I want to achive: Load my own 2D file format (e.g. 1-bit texture with a 1-bit alpha channel) and output a RGBA8888 texture. ...
2
votes
1answer
362 views

Efficient manager/controller for uniform and/or attribute variables in a rendering engine

Most engines on the market have their drawbacks and it's difficult to find a simple/light-weight one that's open-source and doesn't have to put you through a rather complex learning process. Writing ...
2
votes
1answer
274 views

Is there any reason not to save skinning animation data in texture?

I have thought about saving animation data in texture. I think I can save shader parameter setting and interpolation cost in CPU, and also enable animated instancing. But I couldn't find no text ...
2
votes
1answer
3k views

in iOS, does CADisplayLink automatically control the app's 'timestep'?

I'm writing an iOS game that uses OpenGL ES 2.0. I have my 'OpenGLView' which contains a - (void)setupDisplayLink { CADisplayLink* displayLink = [CADisplayLink displayLinkWithTarget:self ...
2
votes
1answer
167 views

re-using objects

I'm working with openGL ES 2.0 on Android and I've created a custom 'Quad' class. This allows me to make a sprite object like so: Quad mySprite = new Quad(); mySprite.setSize(w,h); ...
2
votes
2answers
752 views

How can I use an unsigned int as a GLSL attribute for OpenGL ES 2

I'm having trouble finding conclusive information on this, but it seems like I can't pass integer attributes to GLSL for OpenGL ES or that if I do they'll be converted to float. I need a value between ...
2
votes
1answer
189 views

What causes the iOS OpenGLES driver to allocate extra memory?

I'm trying to optimize the memory usage of our iOS game and I'm puzzled about when/why the iOS GLES driver allocates extra memory at runtime... When I run our game through Instruments with the OpenGL ...
2
votes
1answer
2k views

Best practice to use Sprites in a game using AndEngine GLES2

Currently I am having static reference to all my sprites and loading and initializing them in my OnCreateResource mthod of SimpleBaseGameActivity, But now I have to override onAreaTouched listener on ...
2
votes
2answers
665 views

Horizontal wrapping with AndEngine

How would one implement the effect of a sprite disappearing on one side of the screen and appearing on the other using AndEngine? Like in Kid Icarus, seen here at around 1:22.
2
votes
0answers
140 views

OpenGL transparent framebuffer texture

I'm trying to implement atmospheric glow like this. It was a huge pain to get it done, since I'm new to FBO and OpenGL, but I managed to do something similar to what the OP wanted. I followed his ...
2
votes
1answer
375 views

Combining 2D and 3D in game engine

I've implemented basic 3D functionality and made little "2.5D" demo in orthographic projection using OpenGL ES 2 and Box2D. Now I want to make completely two-dimensional game (using sprites) and ...
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. ...
2
votes
0answers
232 views

Camera - View matrix in Android + openGLES 2

I am trying to use the touch screen on the tablet to control my camera movements and generate the view matrix accordingly. I get the x and y coordinates of the screen and after doing some sanity ...
2
votes
0answers
384 views

Can I use a shader with 2 different textures in Cocos2D (x)?

We are evaluating a variety of different graphic engines for use in our game and we want to be able to use 2 different textures for many of our sprite maps. One sprite map would be the standard RGBA ...
2
votes
2answers
576 views

In OpenGl ES 2, should I allocate multiple transformation matrices?

In OpenGl ES 2, should I declare just one transformation matrix, and share it across all objects or should I declare a transformation matrix in each object that needs it? for clarification... ...
1
vote
3answers
507 views

OpenGL are strips/fans faster for rendering or just data bandwidth

When we send data for drawing we can mark it as TRIANGLE_STRIP or TRIANGLE_FAN to reduce the number of vertices we have to specify. Now, does this actually improve the rendering speed on the graphics ...
1
vote
2answers
517 views

OpenGL ES - DrawCalls count - bottleneck?

I am newbie to OpenGL ES (so far, I used mainly DX11). Now for my scene, I have about 100 draw calls. I can use instancing, but only about half of objects can be instanced, so draw calls count would ...