Subset of the OpenGL 3D graphics API designed for embedded devices such as mobile phones.
0
votes
1answer
21 views
OpenGL - texture releasing
If I call glDeleteTextures, will it release memory immediately? And what is the performance? I know that glGenTexture is quite cheap, because it only alocated id, but I have nor found anything about ...
0
votes
0answers
20 views
Changing color of square on touch event android
How would you change the color of a square in android upon touching the screen? I used an array that passed a string to change the color to the square object itself and an incrementing integer to ...
1
vote
0answers
28 views
Line stipple with OpenGL ES 2.0
I found many threads about line stipple (dashed or dotted lines) with OpenGL ES2.0, but there are never any code examples or tutorials on how to implement it.
How do I implement line stipple in ...
0
votes
1answer
26 views
Can't understand why transformation doesn't work
To make a simple transformation like a rotation I want to use linear algebra -multiplying the vec4 vertex_position by a mat4 transformation
If alpha is the angle of rotation, then the mat4 is ...
0
votes
1answer
48 views
Best way to add and remove quads in a VBO?
What's the best way to handle adding and removing 2D sprites (quads) in a VBO?
I am working on a mobile board game and sometimes game pieces (represented by quads graphically) need to be added to or ...
0
votes
0answers
23 views
OpenGL ES framebuffers as screen cache
I develop android opengl MapView. It's drawn with square parts if map called tiles. I draw one tile per frame and use two framebuffers as cache. So the renderflow is following:
Bind current fbo -> ...
0
votes
3answers
62 views
What format is this 3D model in or how can I change my rendering code to accept obj files?
I have a file in my project that defines 2 numbers and 4 arrays:
#define NUM_TEAPOT_OBJECT_VERTEX 824
#define NUM_TEAPOT_OBJECT_INDEX 1024 * 3
static const float teapotVertices[...
3
votes
0answers
104 views
LibGDX Shader works fine on desktop but does not work at all on Android device
I made a very basic shader that works perfectly fine on Desktop, but when I try it with an AVD the sprite affected by the shader is not drawn. I have tried with WQVGA API 16 and Nexus S API 23. I have ...
5
votes
1answer
155 views
Difference in glDrawArrays and glDrawElements
While refreshing my mind on OpenGL ES, I came across glDrawArrays and glDrawElements.
I understand how they are used and sort of understand why they are different.
What I do not seem to understand ...
0
votes
1answer
63 views
OpenGL Regarding Frame/Buffer Caching
I have been trying to get myself refreshed on OpenGL ES. Whilst doing so, I had the following question in mind:
Does OpenGL have any "caching" mechanism?
For example:
Let's say we draw a stationary ...
0
votes
1answer
106 views
OpenGL ES 2.0 Without The Use of Shaders
While refreshing my mind on OpenGL ES, I decided to read a few of the books I brought a while back and search for some tutorials online.
Whilst doing so, I came across many beginner's tutorials that ...
0
votes
1answer
92 views
GUI rendered into texture(s) or not?
I am eyeing OpenVG and cairo as rendering libraries for my pet game GUI. You can use both to render either into a texture or issue GL commands to draw directly onto the display. If I would use them ...
1
vote
1answer
27 views
Fragment shader operations before vector transformations
I feel like I'm misunderstanding how to work with vector/fragment shaders. My vector shader is as follows:
uniform mat4 uVMatrix; // view (camera transformations)
uniform mat4 uMMatrix; // ...
1
vote
0answers
67 views
Texture rebind on android cause potential memory leak?
After context lost, I have to rebind all my textures. I want to it the correct way, so I check each handle for availability. It's done by calling unloadFromVram(), and then loadToVram()
first unload:
...
0
votes
1answer
46 views
Libgdx OpenGL ES pixel shader behaves differently on android and on desktop
I'm currently working on a mobile game that ressembles a snake game ; what I wished to do was use my limited glsl knowledge to write a pixel shader that could efficiently draw a curve with a certain ...
1
vote
0answers
122 views
Making use of the Android GPU debugging tools
I tried following the manual to install the Android GPU debugging tools for android Studio 2.0. Unfortunately it has not been very successful.
I have been following the instructions of the official ...
4
votes
1answer
72 views
OpenGL ES Frame Skipping causing visible artifacts
I'm using OpenGL ES 3.0 on Android 5.1, and am noticing the following issues. I tried to implement the game loop which does exactly 60 updates and do as many frames as it can. Everything is smooth, ...
1
vote
1answer
50 views
How to map control key to a specific angle or orientation?
At the moment, I basically have built out a large hash table of various angles and what direction they map to, if the user would press right, up, down, left. This is needed, in my case, as I have a ...
0
votes
0answers
120 views
glMapBufferRange performance on devices with shared memory
I have a few questions regards to the glMapBufferRange performance on devices with shared memory between CPU and GPU (OpenGL ES 3 capable Android devices to be specific).
1 - Is the mapped buffer ...
0
votes
0answers
59 views
How to scale the camera
I'm developing a game engine (for the sake of knowledge) using OpenGL ES 1.x (Android). There is a problem with camera scaling. To ensure that all textures are displayed correctly on various devices I ...
1
vote
0answers
31 views
OpenGL ES 2.0 not drawing images with shadows
I'm using OpenGL ES 2 to program a simple game 2D for Android mobile phones. I'm coding the rendering portion of the software, using the GLES20 default library.
All my sprites are rendered from a ...
0
votes
0answers
69 views
OpenGL ES vertex/fragment shaders - Blinn phong
I'm developing a simple educational project to study OpenGL ES.
I'm try to render some simple OBJ models using Blinn-Phong.
The first version of the of my implementation calculate all the lighting ...
1
vote
2answers
94 views
Should I use one GLSurfaceView.Renderer for each part of my game?
I am creating a small platformer-like game for Android using OpenGL. The game has 3 main screens/states:
Main menu screen
Level selection screen
The game screen
Currently I use a GLSurfaceView....
0
votes
2answers
87 views
2D Collision in tilemap - ArrayOutOfBounds
im trying to do collision detection with world based on tilemaps (two dimensional array)
array -
private int WIDTH = 10;
private int HEIGHT = 6;
String[][] simplemap = new String[][]{
{ "0","1"...
1
vote
0answers
223 views
How to draw 2D pixel data with OpenGL
I am fairly new to OpenGL. I have a 2D game in SDL2 that uses currently works by creating a SDL_Surface from the pixel data, copying it into a SDL_Texture, and rendering it to the screen with ...
2
votes
1answer
74 views
Is there any way in open-gl to “bit crush” everything on the screen?
I am making an educational game and am looking for options for a visual effect to show when something is "incorrect". So, I am looking to see if there's an easy way in openGL to temporarily distort ...
1
vote
0answers
84 views
Logical operations per component in GLSL
According to the OpenGL spec in GLSL, the logical operators: &&, || etc work between booleans, not vectors of booleans.
So, what is the best way to perform the logical and/or per component in ...
1
vote
2answers
77 views
How to optimize this branching instruction?
I have an outline shader, which samples my texture 8 times to compute the outline.
The problem is, that there's transitional alpha values between picture and background. To cut them off I'm using the ...
0
votes
0answers
163 views
YUV target on GL_TEXTURE_EXTERNAL_OES
I am using a surface texture bound to GL_TEXTURE_EXTERNAL_OES. I read that the GL_TEXTURE_EXTERNAL_OES texture target is usually in a YUV color space. I want to take "y" value for each pixel in ...
0
votes
1answer
66 views
Luminance 'y' value of surface texture
For my opengl video player app, I am using surface texture bound to GL_TEXTURE_EXTERNAL_OES
source : https://github.com/crossle/MediaPlayerSurface/blob/master/src/me/crossle/demo/surfacetexture/...
0
votes
0answers
55 views
OpenGL ES 2.0 how to access LUT
I've created a look up table for my fragment shader and I'm passing it in as a uniform float array.
uniform float hueLut[360];
My program works fine on most devices but I ran across one device where ...
-3
votes
1answer
25 views
OpenGL ES 2 inheriting issues [closed]
I am Having an issue where one of my classes will not inherit the other ones variable value. In the class which is inherited. It shows the value of the float just fine. But when I go to the Class ...
1
vote
1answer
58 views
Android Opengl: Alternate values for gl_FragColor
I'm writing an Android application that utilizes opengl to perform some changes to the camera output. I've written my code in such a way that I finally figured out what is causing the performance ...
0
votes
1answer
347 views
Is Angry Birds Made Purely Using Bitmaps/Raster graphics? [closed]
Being a beginner game developer I would like to start creating my own engine and graphics so I am concerned about how successful games accomplish the graphics portion.
My question is, are all the ...
3
votes
1answer
97 views
Libgdx - GLSL shader which uses mod doesn't seem to work properly on android
Through trial and error I've managed to come up with a scanline-ish shader I'm satisfied with. On my desktop testbed it looks like this:
Basically, every 2nd(vertical) pixel is darkened.
However, ...
1
vote
1answer
97 views
cannot implement GLSurfaceView.RENDERMODE_WHEN_DIRTY
I'm trying simply to display an openGL surface when I click the screen using GLSurfaceView.RENDERMODE_WHEN_DIRTY mode
but the surface does not display when I click it , why ?
my Activity :
public ...
2
votes
0answers
186 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
0answers
56 views
Stencil buffer confuse
I was trying to make two object outline. One would color the object with orange and other with green. I just wanna know if is it possible to have two object outline at the same time because every time ...
2
votes
1answer
164 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 ...
2
votes
0answers
69 views
Render triangles without index buffer in Opengl ES [closed]
I'm reversing a 3d model format from a famous game (not sure if i should mention it), which is released both for windows (app store) and for Iphone and android.
The weird thing is that while the ...
4
votes
1answer
416 views
Is this the typical approach to modern OpenGL UI & Text rendering, for mobile?
I'm implementing GUI in OpenGL ES 2.0 to fit with my application framework's existing structure. I'd like to have the UI rendering eat as little mobile processing capacity as possible. So to confirm......
2
votes
2answers
70 views
IOS/Android Game programming [closed]
I am somewhat new to the whole game programming thing. I was wondering if I could develop a game for IOS and Android with using openGLES. if so how can I run the code on the devices and what are some ...
5
votes
0answers
118 views
OpenGL: Frame partially jumps back and forth
I'm working on a project with SDL and OpenGL. The game works great on Windows, Linux, OS X and iOS. However, the Android version is showing a problem on my phone in particular. I have tested another ...
1
vote
0answers
33 views
How to use quaternion on another referential
I'm new on Three.js and despite a mechanical background, I can't find how quaternion works: it's like it always refers on local part referential and not the global one.
I've illustrated it here : ...
5
votes
3answers
247 views
How to hide a post-processed mesh outline when/where the mesh is hidden
I'm working on setting up an active outline in my 3d engine, a highlight effect for selected 3d characters or scenery in the screen. After working with the stencil buffer and getting some ...
1
vote
0answers
204 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 ...
2
votes
2answers
956 views
How to compile with OpenGL ES on Windows?
I downloaded OpenGL ES 3.1 sdk here.
But when I tried to run (or compile and run) the executable in "samples" directory, I got the following message:
The program can't start because libGLESv2.dll ...
2
votes
0answers
113 views
Using depth values for fake ambient occlusion
I'm using the normalized distance to the camera to get depth information in the fragment shader. When using this value as fragment color, it looks at lot like ambient occlusion (of course only in the ...
3
votes
1answer
84 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 ...
2
votes
1answer
118 views
Working around the current sad state of mobile GPU drivers
I'm working on a OpenGL ES3 app for Android: for various reasons, I decided to roll my own mini-OpenGL rendering engine. So far so good.
Problem is, the GPU drivers in the mobile industry are such ...