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

1
vote
2answers
152 views

Adding an angle variance to a 3d vector

I am converting a particle emitter from 2d to 3d. In the 2d system the original coder used a random angle variance and added it to the angle. So it would be something like: thisAngle = emitterAngle ...
5
votes
3answers
376 views

How do I send multiple matrices to a vertex shader?

I'm practising animations using bones/skinning. I am trying to send the shader one matrix per vertex. I can think of these two approaches. Method 1 I have one uniform handle for each bone matrix ...
0
votes
1answer
61 views

What is the correct Order of Operations on OpenGL 2.0 Loading Texture in condense format?

I have come across a problem when I am loading a single texture onto a single quad, and this problem persisted during the planning phases of my project, before starting my development phase. I am ...
3
votes
1answer
142 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 ...
2
votes
1answer
243 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); ...
0
votes
2answers
136 views

Manage shader parameters

I'm making some test with OpenGL and I've got a problem with my application design. Currently, I've got something like that in pseudo code: // Ask to draw a given scene. renderer->drawScene( ...
1
vote
1answer
92 views

Run OpenGL shader on part of a texture

How do I run an OpenGL shader on just a portion of an off screen texture and leave the rest of the texture unmodified? Are there any calls that restrict the sampled pixels to just a rectangle or do I ...
0
votes
1answer
281 views

libgdx game process dies on loading texture atlases

I try to load a lot of texture atlases (10) with approximately 5 (~2048x~2048)(not using PoT) .pngs each. I'm using AssetManager and there is no trouble with it on my pc but when I try it on my tablet ...
0
votes
1answer
241 views

Should I delete the textures I use in OpenGL ES 2 (Android)?

Say I have a skybox and the user can choose out of 2 sets of 6 textures (one for each face of the cube) to use on that skybox. For example if user selects set A, I load the textures ...
2
votes
2answers
142 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 ...
5
votes
1answer
121 views

portal cutoff effect

I want a 3D Mesh to come out of a flat portal. Only the part of the mesh that's coming out of the portal should be rendered, so the mesh should be cut off or sliced until it's fully outside the ...
0
votes
1answer
126 views

Sphere turns to ellipsoid further away from origin (OpenGL ES 2, Android)

I'm not even sure what code to share, but maybe someone's been in a similar situation or has a good suggestion. I'm basically rendering a sphere in the middle of the screen (placed at (0, 0, 0)) and ...
2
votes
0answers
120 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 ...
1
vote
1answer
334 views

iOS: OpenGL ES 2.0 render texture with glScissor performance

I have drawn image with OpenGL and will redraw tile of its texture (non filled area). Which case will work faster? Set glViewport with full texture's rect, draw full texture and use glScissor ...
0
votes
2answers
212 views

OpenGL ES, orthopgraphics projection and viewport

I want to make some simple 2D game on iOS to familiarize myself with OpenGL ES. I started with Ray Wenderlich tutorial (How To Create A Simple 2D iPhone Game with OpenGL ES 2.0 and GLKit). That ...
3
votes
0answers
64 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 ...
0
votes
1answer
670 views

Rotation about a point in OpenGL ES 2 (Android)

I'm trying to implement rotation about a point (the origin) using quaternions. My camera is at (0, 0, 3). I'm applying all the operations to the view matrix. Basically my rotation is at the moment not ...
0
votes
1answer
91 views

Unit conversion for physics

I'm doing the physics for a 2D game which visuals are represented in openGl. Gravity is 9,8 m/s^2, how do i convert that to my screen size? OpenGl sets width to -1 to 1, and does aspect ratio of the ...
0
votes
0answers
199 views

How to create a shining sun in OpenGL ES 2 (on Android)

Let's say I created a space scene in OpenGL ES 2 similar to this one: At the moment my sun is just a small texture similar to the one in the image that I place somewhere far, but it obviously looks ...
0
votes
1answer
111 views

Particles placed in the middle of the screen (OpenGL ES 2 / Android)

It seems like each of my particles is placed at (0, 0, 0) even though I'm setting different positions for each of them (debugger also confirms this). It must be something really silly that I'm ...
1
vote
2answers
135 views

How can I handle shadowing of a planet's rings by the planet itself?

I assume the most straightforward way to draw planetary rings (such as those around Saturn) is to use a texture that is transparent everywhere except for the rings, and then place the planet in the ...
0
votes
1answer
209 views

Swaying tree in OpenGL ES 2

I've seen this many times, but I have no idea what's the best way to achieve it. I am looking for something close to, for example, this: Lonely Tree Live Wallpaper I have two approaches in mind: one ...
0
votes
0answers
100 views

OpenGL ES Renderer, how to know if onSurfaceCreated has been called?

Obvious answer is to set a boolean to true, but that wouldn't consider recreation. I'll tell you what I'm doing, and what's my problem for bringing light to the question. So, I was working on the ...
0
votes
0answers
48 views

Create quad from texture and screen metrics

If I have a texture with known metrics (pixel size, byte type) and a GL surface to render to of a know density and measures, and I want to draw a quad composed of two triangles that correspond to the ...
0
votes
1answer
304 views

Android OpenGL ES 2 framebuffer not working properly

I'm trying to understand how framebuffers work. In order to achieve that, I want to draw a very basic triangle to a framebuffer texture and then draw the resulting texture to a quad on the default ...
1
vote
1answer
150 views

Fragment shader seems to floor() imprecisely

I'm trying to interpolate coordinates in my fragment shader. Unfortunately if close to the upper edge the interpolated value of fVertexInteger seems to be rounded up instead of beeing floored. This ...
-1
votes
1answer
328 views

What's wrong with this Open GL ES 2.0. Shader?

I just can't understand this. The code works perfectly on the emulator(Which is supposed to give more problems than phones…), but when I try it on a LG-E610 it doesn't compile the vertex shader. This ...
0
votes
3answers
405 views

Android : glowing/pulsing line/triangle

I would like to create a simple Android app using Opengl ES 2.0 that is showing a simple shape (like line or triangle) that is glowing and pulsing like Nexus X logo in this video : ...
1
vote
1answer
1k views

OpenGL ES 2.0. Sprite Sheet Animation

I've found a bunch of tutorials on how to make this work on Open GL 1 & 1.1 but I can't find it for 2.0. I would work it out by loading the texture and use a matrix on the vertex shader to move ...
0
votes
1answer
170 views

Drawing a random x,y grid of objects within a prespective

I'm wrapping my head around OpenGL ES 2.0 and I think I'm trying to do something very simple, but I think the math may be eluding me. I created a simple, flat-ish cylinder in Blender that is 2 units ...
1
vote
1answer
1k views

How to use multiple textures in OpenGL ES 2.0?

I am working in OpenGL ES 2.0. I load two png images as my textures with the libSOIL. I need to use one of them as the texture for the background and another one as the texture of a rotating cube. ...
1
vote
1answer
110 views

What is w componet [duplicate]

What is the W component on graphics programming. I read a blog about opengl that says that w must be equal to either 0 or 1 here. But the book I am currently reading has put w component to more than 1 ...
1
vote
0answers
141 views

Cylinder scrolling / wrap-around world using shaders?

I am making a 2D game using OpenGL ES 2.0 (libgdx), where the world will wrap-around itself on Y-axis. Apart from implementing the "modulo" method in my rendering code, I'm wondering whether it's ...
0
votes
1answer
135 views

Timing Calculations for Opengl ES 2.0 draw calls

I am drawing a cube in OpenGL ES 2.0 in Linux. I am calculating the time taken for each frame using below function #define NANO 1000000000 #define NANO_TO_MICRO(x) ((x)/1000) uint64_t getTick() { ...
0
votes
1answer
80 views

Particle system lifetimes in OpenGL ES 2

I don't know how to work with my particle's lifetimes. My design is simple: each particle has a position, a speed and a lifetime. At each frame, each particle should update its position like this: ...
1
vote
1answer
981 views

android: How to apply pinch zoom and pan to 2D GLSurfaceView

I want to apply pinch zoom and panning effect on GLSurfaceView. It is Image editor, so It would not be 3D object. I tried to implement using these following links: ...
0
votes
1answer
55 views

Working with floats in OpenGL ES 2

Are there any reasons or situations one would use in their shader float(1) over just 1.0 ?
0
votes
0answers
177 views

Moving clouds in OpenGL ES 2

I'm trying to implement a cloudy sky like the one in this video: https://www.youtube.com/watch?v=IGOL0OyiJ6s Basically what I want is to have a scene and then the above effect in the background: huge ...
1
vote
2answers
257 views

Error while reading TGA file and doing Texture Cube map

In my program, i read a TGA file with a function like this: char* LoadTGA(char* filename, int* width, int* height, int* bpp); As you can see, this function: return a char array of image data ...
1
vote
1answer
181 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 ...
5
votes
1answer
509 views

OpenGL ES 2.0 obscured texture is visible

Hi, I am using LibGDX and OpenGL 2.0 to create a game. So far I have created two meshes. The front mesh is the one with the brown circle texture and another mesh on the top with a green to white ...
0
votes
0answers
164 views

Error when create FrameBuffer: GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS

I'm using libgdx, to create some program. I need used some operation in framebuffer. For this operation I create new framebuffer, after this operation I'm call in framebuffer dispose(). When I create ...
0
votes
1answer
490 views

Drawing Text on a scene

I am not sure if I am missing something but I was thinking about how text entities are drawn on a scene, are they drawn with an offset depending on the length of the text? I notice that when I add a ...
6
votes
2answers
295 views

Implementing realistic sun reflection on a sea

I'm drawing a 3d rendered island which has a day / night cycle and a sun that rises and sets over water. The sea is rendered with a fragment shader derived from this Blinn-Phong tutorial. ...
4
votes
1answer
160 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 = ...
0
votes
1answer
126 views

Version number not supported by gl2 in andengine

I am new to andengine. From various forums, i got to know that my system should support hardware virtulisation. I have installed "Intel X86" and my system didn't throw any problem regarding "HAX" now. ...
0
votes
1answer
181 views

OpenGLES 2.0 batching method and do not draw inactive object

I am researching about "batching" objects for one big VBO and reduce draw call. These are what I am doing now: Create interleaved VBO based on texture or render state (like Blending) So, for ...
1
vote
0answers
192 views

How do you tell OpenGL ES 2.0 to use a texture as the depth buffer?

I want to render a scene with an outline post processing effect in OpenGL ES 2.0. First I render all the opaque objects. Then I use a post processing shader for silhouette detection that uses the ...
0
votes
2answers
250 views

Which code is faster to convert -1 to 0 and 1 to 1?

I'm writing a shader for rendering the sides of triangles with different colors. I have a value mediump float back = dot(V, N) which is positive if the normal faces away from the camera and negative ...
3
votes
1answer
664 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 ...