Subset of the OpenGL 3D graphics API designed for embedded devices such as mobile phones.

learn more… | top users | synonyms

1
vote
1answer
422 views

Transparency in GLSurfaceView

I'm new in game development. I have a view using GLSurfaceview and call in MainActivity. i want to make transparent that view. i have tried setZOrderOnTop() method in MainActivity and glClearColor() ...
1
vote
1answer
189 views

How to clip or mask entity in adnroid/andengine?

I want to implement masking with sprite in Andengine. I want same functionality as in ios class called SKCropNode which works like an masking node! Is there any workaround like this in ...
3
votes
2answers
138 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 ...
0
votes
1answer
133 views

OpenGL: How to map point inside frustrum to normal device coordinates (NDC)?

I read this article http://www.songho.ca/opengl/gl_projectionmatrix.html. It's explain how calculate projection matrix coefficients. But I completely can't understand how author perform mapping from ...
1
vote
2answers
32 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
1answer
51 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 ...
1
vote
0answers
14 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
22 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 ...
0
votes
2answers
68 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
77 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 ...
4
votes
2answers
3k views

How should I represent a tile in OpenGL-es

Let me start with I am currently learning OpenGl-es using Android. I have been having the hardest time trying to design a simple and logical way of making tiles (2d flat polygons). The tutorials tell ...
3
votes
2answers
1k views

Cocos2d v2.0 and OpenGL 2.0/1.0: where to start

I started developing my very first game 3 months ago using Cocos2d 2.0 for iPhone. I am now in the stage where I'd like to add some cool effects to the bullets and some special weapons (see my ...
34
votes
5answers
24k views

Workaround to losing the OpenGL context when Android pauses?

The Android documentation says: There are situations where the EGL rendering context will be lost. This typically happens when device wakes up after going to sleep. When the EGL context is ...
3
votes
2answers
2k views

Identity matrix, What does it really do?

I understand that multiplying by the identity matrix is like multiplying by 1. Why would you multiply a matrix that will only contain the same result? Also, I'm experimenting with some OpenGL code ...
2
votes
1answer
65 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
28 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
63 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 ...
2
votes
1answer
70 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 ...
5
votes
2answers
3k views

Rendering 2d sprites into a 3d world?

In opengl how do I render 2d sprites in opengl given that I have a png of the sprite? See images as an example of the effect I'd like to achieve. Also I would like to overlay weapons on the screen ...
4
votes
2answers
3k views

How to send multiple MVP matrices to a vertex shader in OpenGL ES 2.0

I'm working my way through optimizing the rendering of sprites in a 2D game using OpenGL ES and I've hit the limit of my knowledge when it comes to GLSL and vertex shaders. I have two large float ...
0
votes
0answers
55 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
51 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
3answers
8k views

2D Rendering with OpenGL ES 2.0 on Android (matrices not working)

So I'm trying to render two moving quads, each at different locations. My shaders are as simple as possible (vertices are only transformed by the modelview-projection matrix, there's only one color). ...
4
votes
2answers
2k views

How to load a png file without alpha premultiplying in ios?

I am making a game in which I use the alpha value, in some cases for transparency, in others for occlusion, and for HDR in others. I'm loading the images like this (this is MonoTouch, but objective-c ...
0
votes
0answers
39 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 ...
-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
37 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 ...
2
votes
0answers
61 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 ...
11
votes
6answers
15k views

OpenGL ES 2.0: Repository of Quality Shaders [closed]

Could I kindly ask, to suggest me a repository of high quality OpenGL (OpenGL ES 2.0) vertex and fragment shaders, please? I am looking for pixel based ligting shaders (such as phong) and simmilar. ...
0
votes
1answer
167 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 ...
5
votes
3answers
1k views

Creating a highlight halo around a selected object

I'm looking to create a halo highlight around the selected objects in my game screen. The main platform is android, but I am writing an iOS version as well, updating it whenever I successfully add the ...
9
votes
3answers
4k views

Order independent transparency in particle system

I'm writing a particle system and would like to find a trick to achieve proper alpha blending without sorting particles because: Each particle is a point sprite in a single mesh and I can't use ...
6
votes
1answer
7k views

OpenGL ES 2.0: Understanding Perspective Projection Matrix

Setting the Perspective projection matrix in Open GL (including OpenGL ES 2.0) has the following general format: glm::mat4 perspective(float fovy, float aspect, float zNear, float zFar); Notice the ...
3
votes
1answer
58 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, ...
5
votes
0answers
86 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 ...
2
votes
0answers
97 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
44 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 ...
17
votes
1answer
40k views

GLSL: How do I cast a float to an int?

In a GLSL fragment shader I am trying to cast a float into an int. The compiler raises an error: ERROR: 0:60: '=' : cannot convert from 'mediump float' to 'highp int' I tried raising the precision ...
4
votes
1answer
226 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
66 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 ...
1
vote
0answers
30 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 : ...
1
vote
0answers
128 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 ...
1
vote
2answers
278 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 ...
5
votes
4answers
11k views

GLM: Euler Angles to Quaternion

I hope you know GL Mathematics (GLM) because I've got a problem, I can not break: I have a set of Eular Angles and I need to perform smooth interpolation between them. The best way is converting them ...
2
votes
0answers
75 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 ...
0
votes
1answer
3k views

Rendering Texture Quad to Screen or FBO (OpenGL ES)

I need to render the texture on the iOS device's screen or a render-to-texture frame buffer object. But it does not show any texture. It's all black. (I am loading texture with image myself for ...
3
votes
2answers
278 views

How to set borders in Rubik's cube using opengl GLSurfaceView

I'm developing a Rubik's cube game like seen in the picture. But I'm facing problems to set the cube face color with black border. public void setupSides() { int i, j, k; // Paint back blue i = 0; ...
2
votes
1answer
66 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
0answers
48 views

Capture what is Rendered in OpenGL

Im Making an android Game with OpenGl ES, I Want to capture what is rendered onto screen By FloatBuffer and save it for later use, For Example If this is the OutPut: I want this for Result: How ...
0
votes
1answer
2k views

Is ETC2 Texture Compression available in OpenGL ES 2.0?

I have an ES 2.0 app and would like to use ETC2 texture compression if it is available (i.e. I am running on a device that supports ES 3.0 standard). Is it possible to use ETC2 in ES 1.1/2.0, and if ...