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
0answers
16 views

Best way to find line segment intersection

I am working with an OpenGL ES 2.0 shader and need to find the point of intersection between two line segments in 2D space. I receive them in terms of both coordinates of both lines. Because they are ...
0
votes
0answers
17 views

how to temporarily turn off/on multisampling for an OpenGL ES 2.0 render context in Android?

In my OpenGL ES 2.0 Android app, I render to an EGL surface with >= 2 samples; I obtain this surface by passing: EGL14.EGL_SAMPLES, 2 as part of the attribute_list argument for egl.eglChooseconfig() ...
0
votes
3answers
528 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 ...
0
votes
2answers
235 views

libgdx texture edge blending problem

I have two completely white bitmaps here: They're there, trust me. When I put one on top of the other and scale them down with TextureFilter.Linear I get this: How do I get rid of the dark ...
1
vote
1answer
356 views

Generate ETC2 compressed texture from Android Bitmap in OpenGL ES 2

My app currently uses a lot of textures most of which probably could be compressed quite a lot by using ETC2 (my app runs on 4.4 so i have a lot of devices supporting GLES30), i cannot use ETC1 since ...
0
votes
1answer
144 views

GLES2 rendering performance for different iPad generations

I'm using C++/GLES2 for iPad only (no iPhone). The only device I own is an iPad2 and I do not plan to support iPad 1. Can anyone help me understand realistic goals/limits on iPad 2/3/4 in terms of ...
1
vote
1answer
32 views

OpenGL ES 2.0 facet lighting

I am trying to figure out if there is a way to achieve facet lighting in OpenGL ES 2.0 without extensions. I know it is possible if I don't used indexed vertices but I don't really want to do that ...
1
vote
1answer
49 views

Effect of vertex winding on normals and shading

I have implemented a Phong and Gourand shader for a triangle mesh that is being imported from an STL file. It appears to be working fairly allright but some triangles seem to be what I can only ...
5
votes
1answer
339 views

Calculated normals for mesh not working

I am trying to implement a 3D mesh viewer with C++ and OpenGL ES 2. I am currently struggling with the calculation of the normals for the vertices, or at least I think that is where the problem ...
1
vote
0answers
21 views

blending with OpenGL glBlendFunc and glBlendEquation

I want to draw a bunch of images in front of a background. Where images overlap, I want those to be blended together (for now, using a mix of 0.5 source * 0.5 destination color every time an image ...
1
vote
1answer
32 views

Rendering sprites on a Mali-400 MP device

I started developing a small cross platform game engine using OpenGL, I am working actually on a sprite batch renderer. Everything is working fine on OS X, iOS, Win32, and some Android Devices. Here ...
3
votes
1answer
112 views

How to deal with overlapping black parts of Light mask textures?

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
1answer
35 views

drawing a horizon / sky in OpenGL ES 2.0

I want to render a sky: My camera is at the origin, and I want there to be a white background for all world coordinates with z < 0 (would normally be considered y > 0, but I have a different ...
0
votes
1answer
26 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 ...
1
vote
0answers
25 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 ...
3
votes
0answers
37 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 { ...
2
votes
0answers
48 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
38 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
63 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
0answers
648 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 understanding is that this is how to ...
5
votes
0answers
138 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 ...
2
votes
1answer
71 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); ...
5
votes
3answers
1k views

What is Khronos EGL?

I see that modern OpenGL related code uses EGL, i can't get good resources for this so i ask here: what exactly is EGL ? if a platform supports OpenGL ES 2.0+ or OpenGL 3.0+ i can presume that will ...
1
vote
2answers
164 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
82 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
20 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
65 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
26 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 ...
1
vote
1answer
567 views

GL_EXT_shadow_samplers killing my shader

I have the following fragment shader for my scene #extension GL_EXT_shadow_samplers : require ... vec4 color = texture2D(uTextureUnit0, varTexCoord0); if (colorTransformEnabled != 0) { vec3 ...
0
votes
1answer
140 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 ...
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
50 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
52 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
51 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
1answer
138 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
1k 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 ...
0
votes
0answers
147 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
36 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
70 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
154 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 ...
1
vote
1answer
371 views

Java Buffers and OpenGL ES 2.0 (Android)

I've been trying to come up with a good solution for preloading textures asynchronously, but in Android with OpenGL ES you cannot create a texture out of context. Would the proper solution be to load ...
0
votes
1answer
46 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
157 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 ...
1
vote
1answer
185 views

OpenGL ES 2.0 and atlas

I'm trying to draw elements from a texture atlas with OpenGL ES 2.0 Currently, I'm drawing my elements using something like this in the shader: uniform mat4 uCamera; uniform mat4 uModel; attribute ...
0
votes
1answer
45 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
2answers
206 views

Replace each white spot of image to radial gradient

Recently, I read an article about a sun shader (XNA Sun Shader) and decided to implement it using OpenGL ES 2.0, but I encountered a problem with the shader: I have two textures, one of them is the ...
1
vote
1answer
209 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
2answers
457 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 ...
0
votes
1answer
171 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
259 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 = ...