OpenGL ES 2.0 emphasizes a programmable 3D graphics pipeline (comparing to fixed-function pipeline of OpenGL ES 1.1).
0
votes
0answers
7 views
Opengles 2.0 multi Textures fade out one by one
I have multi textures, A was drawed on top of B, B was on top of C ...., ( like Picture 1) .I want to fade out A first, then B will appear and fade out either... But when A fade out, background color ...
0
votes
0answers
10 views
Orbid object around as if looking inside a sphere with the rotation sensor
I am trying to move objects around using the rotation matrix from the rotation sensor.
what I'm doing is basically changing the center view of the view matrix to be the coordinates from the rotation ...
1
vote
0answers
23 views
OpenGL ES 2.0: Highly variable time spent in GLES20.glDrawArrays(). How to find the cause?
How can I debug why the time take to issue exactly the same GL commands to render a frame, especially the call to GLES20.glDrawArrays(), is highly variable even when there is no garbage collection and ...
2
votes
0answers
34 views
When I add in Java transformationMatrix I can't see images? [closed]
When I add in Java transformationMatrix I can't see images moving but when I remove it I can see why and how to fix it? Any ideas how to fix it?
My Renderer class:
public class Renderer {
...
1
vote
0answers
26 views
Texture coordinates for custom geometry in SceneKit ios9
I am trying to texture the a custom plane shape I created in scenekit on iOS9. I need the texture to spread out and stretch over the entire surface. I have a vertex and fragment shader on an ...
1
vote
1answer
27 views
Get Stencil buffer working iOS OpenGL ES 2.0
I have been trying to get this work but either get black screen or reporting error when using XCode to analyze the GL code like below. Any help appreciated. I am using Swift here if that making a ...
4
votes
1answer
53 views
Shaders: packing 4 textures into a single RGBA - slower?
I'm experiencing something really strange on an iOS mobile device. I have 4 textures, and after some profiling it seems, that doing four separate grayscale texture reads is faster, than reading the ...
2
votes
1answer
47 views
Stencil Buffer not working as expected in OpenGL ES 2.0 (Android)
I'm trying to get to grips with the stencil buffer.
Apart from setting up viewport, camera, etc, my OpenGL ES 2.0 initialisation code is:
GLES20.glDisable(GLES20.GL_CULL_FACE);
...
3
votes
0answers
112 views
What's the best practice for a progress bar in OpenGL ES 2.0 (Android)
As the title says, what is the best practice for a progress bar in OpenGL ES 2.0 on Android ?
My attempt: I make a texture (could be a single colour or otherwise), and then stretch that texture from ...
1
vote
2answers
121 views
Optimize drawing “different” sprites in OpenGL ES 2.0 (batching?)
I started experimenting with OpenGL ES 2.0, and I'm trying to figure out a way to optimize/batch sprite drawing, where sprites only have the texture in common, but differ in the following properties:
...
1
vote
0answers
65 views
How do I draw multiple irregular polygons with OpenGL ES?
In this post I was asking how to program a map of a Risk-like game.
Now that the map is pretty coded, both client and server-side, I'd like to finally draw the map.
I'll try to keep least broad as ...
0
votes
0answers
19 views
OpenGL ES 2.0 save data for next render cycle
I'm currently writing a simple game, that should be able to cope with moving and rendering a large number of ships (particles). I started benchmarking with a sprite system, but obviously it was to ...
3
votes
1answer
60 views
Do shader compilers typically know not to look up unused texture channels?
I have a texture that's from the color attachment of an FBO in OpenGL ES 2.0, so I have limited control over the number of channels in the image.
Suppose I only need the color from the R channel of ...
0
votes
0answers
21 views
OpenGL ES 2.0 + Cairo HUD
I have posted this on StackOverflow before finding this Q&A so please excuse the double post but I think there will be more experts in terms of OpenGL around here.
I am trying to render a HUD ...
0
votes
1answer
118 views
Setting up a Visual Studio project for OpenGL and OpenGL ES
I want to make a small game with OpenGL and glew for desktop, android and web.
So far I know how to set up a project for opengl and a project for opengl es but I would like to have the game source ...
3
votes
1answer
81 views
LibGdx OpenGl prevent black part of Light mask texture from overlapping
I am using this masking texture for a dynamic lighting effect in my game:
It looks beautiful until two lights begin to overlap:
This is obviously because the textures are overlapping when I draw ...
0
votes
0answers
12 views
AndEngine : Collision does not make line disappear
I have drawn the line between two sprites and there is a rectangle.
When the line collides with rectangle the line should be invisible else the line should be visible.
But i am having problem with ...
0
votes
0answers
48 views
Opengl Create FBO- fatal signal 11 error
in my android game, i want to render My scene in the FBO and a texture attached to it, and use that texture later, But When i use glGenFramebuffers i get this error:
07-30 06:17:27.839: A/libc(1338): ...
2
votes
1answer
46 views
OpenGL ES God Ray Precision error
I have encountered the following (i think) precision error.
(missing link need 10 rep)
My source of inspiration was:
(missing link need 10 rep)
On the PC everything works fine, but on android it ...
0
votes
1answer
130 views
How to send dynamic data to a vertex shader OpenGL ES 2 Android
I'm very new to Android development and OpenGL ES 2.0.
I have been working through a book called "OpenGL ES 2 for Android A Quick Start Guide" which has been useful, but at times I get a bit lost as ...
0
votes
1answer
48 views
Best approach for level specific textures
TL;DR: Best way to handle level-specific textures without overkilling memory usage and killing performance and keeping things clean in OpenGL for mobile (also lower-end devices) and desktop using ...
0
votes
0answers
136 views
OpenGL - Make two images blend together
I have 2 images that are .png and they mix together, The problem is that one overwrite the other. I know that the draw order matters, but In that case I should redraw the icons 2 times ( there is a ...
0
votes
0answers
35 views
Issue with texture mapping on a spehre using opgengl es 2.0
I have a problem to calculate the right UV coordinates.
I'm calculating the sphere by subdivate a ocathdron.
What did I do wrong?
Calculate UV Points for the texture:
private ...
1
vote
1answer
68 views
How to debug a GLSL shader? [duplicate]
I cannot find any tutorial in Google and Youtube. I have a C++ program that uses OpenGL ES 2.0 API to render something on the screen. How can I debug my shaders? Any step-by-step guide? What is the ...
2
votes
1answer
128 views
Looking for specific “textured quad” openGL tutorial in c++ [closed]
I'm new to openGL and I've been googling around for the old and simple textured quad tutorial in openGL but I haven't been able to find one that suits my needs.
OpenGL3.X compatible
OpenGL|ES 2.0 ...
0
votes
1answer
136 views
Moving texture OpenGL ES 2.0
I am trying to implement a sprite of 8 columns and 8 rows in OpenGL ES 2.0
I made appear the first imagen but I cant figure out how to translate the Texture matrix in OpenGL ES 2.0 , the equivalent of ...
0
votes
1answer
38 views
Android Density Independent Pixel Drawables Resource Folder
I'm trying to get to grips with DIP in Android (using Eclipse). I'm writing a little game with OpenGL ES 2.0. Could I get some guidance and tips on what I'm not understanding/doing right.
From what I ...
0
votes
1answer
42 views
OpenGL ES 2.0 basic camera issues
I am having issues with the camera, I cant find how to invert the AXIS
Now
A point is 0,0,0
B point is 1,0,0
C point is 0,0,1
What I want is
A point 0,0,0
B point 0,0,1
C point 1,0,0
...
1
vote
1answer
186 views
Techniques for drawing lines, with mouse, on 3D objects in WebGL or OpenGL?
Can anyone point me to techniques for drawing lines, with the mouse, on 3D objects in WebGL or OpenGL?
Here's the effect I'm looking for, using WebGL: http://www.spacegoo.com/cadillac/
I can imagine ...
0
votes
1answer
146 views
OpenGL ES 2.0 2D-Image displaying
I have followed the official OpenGL ES tutorial to create a working OpenGL-environment. I have been able to do anything I wanted to except for displaying 2D-images. To do so I worked through this ...
0
votes
1answer
210 views
OpenGL ES 1.0 to OpenGL ES 2.0, I cant draw a square
I am learning open GL ES 2.0 and I just made 1 easy game for 1.0
I am following tutorials but I cant understand this thing
In OpenGL ES 1.0 if I define a square that way:
private float[] vertices = ...
3
votes
0answers
94 views
Does anyone know what technique was used in Minecraft to create shadows? [closed]
Specifically I want to know the technique used to render shadows under animals and players.
I would like to create shadows like that for my own block game but I don't even know what to google. Any ...
0
votes
1answer
122 views
Should I update VAO when I update a VBO?
My VAO/VBO/IBO work fine on iPad and other devices on Android excepted two (A Samsung galaxy S4 and a Sony Xperia S).
A problem is present when I start my application on this devices, every elements ...
0
votes
1answer
85 views
How can I render a simple lattice in LibGDX?
I have searched all over, but I can't find what I think will be a simple answer. I am using Opengl ES 2.0, and LibGDX. I simply want to use GL_LINES primitives to create a lattice structure.
I have ...
3
votes
1answer
113 views
Texture loading: Everything at once OR un-/loading the needed assets? [duplicate]
Good evening. We've been developing quite a huge game for android on the basis of AndEngine. So we have a lot of assets to load, especially textures.
At the moment everything (sound, textures etc) ...
2
votes
1answer
116 views
How do OpenGL ES 2 engines typically handle automatic geometry sorting and batching?
I'm trying to write a basic OpenGL ES 2 engine that can automatically sort and batch a fairly flexible set of input draw descriptions.
When I say 'draw description' I mean the actual uniforms, ...
0
votes
1answer
76 views
How to combine VAO and shader language?
I'm new and trying to draw a very simple quad with VAO and GLSL.
My definitions:
typedef struct SPos
{
float x;
float y;
} SPos;
SPos mVertices[6];
SPos mIndicies[6];
GLuint mVao;
GLuint ...
0
votes
0answers
50 views
Use Android 4x5 ColorMatrix in OpenGL ES 2 Shader
I am trying to use Android Color Matrix in OpenGL ES 2. I have been able to use a 4x4 Matrix using the following code in the Shader (this adds also an intensity parameter):
varying vec2 ...
0
votes
1answer
148 views
Android OpenGL: Use several Textures for one Animated Sprite
Good evening. I'm programming an Android Game. To reduce the amount of textures that need to be loaded (OpenGL ES 2.0) I've created several spritesheets of size 1024x1024. Some frames of the same ...
0
votes
0answers
67 views
Android View (Splashscreen) Vanishes after phone woken up from sleep
My game uses OpenGL ES 2.0 and I have a splashscreen which uses a standard Android View. This plashscreen is shown on top of the GLSurfaceView and then simply removed once everything has been loaded ...
0
votes
1answer
95 views
Reasonable texture Formats for VertexTextureFetch in GL
Wich is a reasonable GL version that have support for vertex textures fetchs(VTF) in OpenGL ? (for example GL 3.0, 3.1, 3.3) What textures formats should I expect to be supported in average video ...
0
votes
2answers
401 views
Accurately measure time between calls to onDrawFrame (Android OpelGL ES 2.0)
I'm trying to sort out some timing issues within my gameloop and I've seen something that I don't understand.
The Nexus 10 is supposed to have (as far as I'm aware) a VSync on 60Hz. So that would be ...
8
votes
1answer
3k views
Taking advantage of multithreading between game loop and openGL
Talking in context of a game based on openGL renderer :
Let's assume there are two threads :
Updates the game logic and physics etc. for the in game objects
Makes openGL draw calls for each game ...
4
votes
1answer
1k views
Should unbind buffers?
I'm making some tests with OpenGL ES 2 and got some questions, my current program is like that:
Init
-------
-> create index buffer
-> fill index buffer glBufferData …
-> create vertex ...
1
vote
1answer
91 views
render with const depth value
This is a question that may have an answer that differs for vanilla desktop GL and GL ES 2.0 (and wishful thinking is that ES 3.0 would have the same answer as vanilla GL).
What I'm doing is ...
1
vote
1answer
50 views
Drop in quality of rendering of texture [closed]
Platform: Android OpenGL ES 2.0
I'm drawing a texture on to a square using OpenGL ES2.0.
The texture scrolls infinitely in vertical direction.
The rendering quality drops very rapidly after a few ...
2
votes
1answer
931 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 ...
1
vote
1answer
569 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
508 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 ...
0
votes
1answer
1k 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. ...