Questions tagged [opengl-es2]
OpenGL ES 2.0 emphasizes a programmable 3D graphics pipeline (comparing to fixed-function pipeline of OpenGL ES 1.1).
391
questions
1
vote
3
answers
1k
views
OpenGL ES, orthographic projection and viewport
I want to make some simple 2D game on iOS to familiarize myself with OpenGL ES.
I started with Ray Wenderlich’s tutorial (How To Create A Simple 2D iPhone Game with OpenGL ES 2.0 and GLKit). That ...
3
votes
0
answers
221
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
1
answer
3k
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. ...
1
vote
1
answer
580
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 ...
2
votes
0
answers
912
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
1
answer
239
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 ...
1
vote
2
answers
458
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
1
answer
676
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 ...
1
vote
0
answers
80
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
1
answer
2k
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 ...
4
votes
1
answer
4k
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 ...
0
votes
1
answer
2k
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 ...
1
vote
3
answers
2k
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 : http://youtu.be/...
5
votes
1
answer
4k
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
1
answer
255
views
How can I determine where objects can be seen from a given perspective?
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
1
answer
6k
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
1
answer
277
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 ...
2
votes
0
answers
763
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
1
answer
781
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
...
0
votes
1
answer
148
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
1
answer
4k
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:
https://groups.google.com/forum/#!...
0
votes
1
answer
72
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 ?
1
vote
2
answers
1k
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: ...
2
votes
1
answer
744
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
1
answer
1k
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
1
answer
1k
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
2
answers
1k
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.
http://...
5
votes
1
answer
384
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 ...
0
votes
1
answer
682
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
1
answer
1k
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 ...
2
votes
0
answers
685
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
2
answers
2k
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 ...
10
votes
1
answer
5k
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 ...
1
vote
1
answer
268
views
Orthogonal projection matrix affecting z-buffer on one device
I am experimenting using Matrix.orthoM for a isometric projection, rather than Matrix.frustumM.
On one device, the z buffering ...
1
vote
2
answers
3k
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 ...
-2
votes
1
answer
196
views
Can't get indices with VBO working [closed]
I'm learning opengl for a few days only. Now I'm trying to use indices for my cube, but can't get it working, I don't see anything on screen.
...
1
vote
1
answer
772
views
When to call GLBindTexture when using a spite-sheet?
Originally, I was using individual textures (ie, individual .png files) for my sprite's animation and recently altered my code so that I could put all my animation frames into 1 file (so it basically ...
6
votes
1
answer
2k
views
Sprite with alpha Blending in 3D world
I'm working on a game in a 3D world with elements 2D only (Like Don't starve game) for Android and IOS.
Currently, I've managed "Sprite" without alpha blending, I've just put a condition in the pixel ...
3
votes
2
answers
3k
views
How to flip a quad (openGL es 2.0 Android / Java)
How would one go about 'flipping' a quad, either horizontally or vertically? (Just a single quad, not everything in view).
I know how to rotate a quad, this is my rotation method:
...
0
votes
1
answer
690
views
How can I use ParallaxBackground in AndEngine?
I'm new to game development with AndEngine. I want to add ParallaxBackground but I don't know how to change the background when the player moves. I'm using arrows for moving a player.
Now my ...
19
votes
2
answers
43k
views
GLSL Shader - Change Hue/Saturation/Brightness
I'm trying to change the hue of an image using a GLSL fragment shader. I want to achieve something similar to Photoshop's Hue/Saturation Adjustment layer.
In the following image you can see what I've ...
3
votes
2
answers
1k
views
GLES2-AnchorCenter branch has no org.andengine.util.color.Color
I am porting my game from GLES2 to GLES2-AnchorCenter branch. I am using
...
6
votes
1
answer
440
views
How to prevent clipping when moving through a tunnel?
I'm developing for Android using OpenGL ES 2.0.
It's going to be a game where you have to fly through a tunnel without hitting the walls.
However, the tunnel wall gets clipped as the player ...
2
votes
1
answer
285
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:
...
1
vote
1
answer
1k
views
How to deal with lot of textures in one draw call?
I'am currently developing text rendering & some kind of tile based texturing for simple landscape with textures blending. e.g. something like this but in 3D.
In first realization I have been used ...
4
votes
1
answer
774
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
0
answers
1k
views
How to implement OpenGL triple buffering of buffer objects to avoid stalls?
I'm trying to implement the triple buffering described here. The intent is to gain higher frame rate by avoiding waiting for glBufferSubData() to finish.
My ...
0
votes
1
answer
184
views
OpenGL ES - write code in Windows
Is it possible to write application using OpenGL ES 2.0 "emulator" from AMD (AMD OpenGL ES SDK) and then use the same code (compile again, of course) in my iOS / Android / Whatever application ? The ...
0
votes
2
answers
3k
views
Scale Matrix Transform without moving primitive
So I have the following....
...
3
votes
2
answers
3k
views
Simple Android loading screen when using OpenGL
My game uses openGL ES 2.0 on Android and it's got to the point where the pause (while loading resources) has become noticeable.
All I'm after is to show a static screen (probably via an XML layout ...