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

2
votes
0answers
208 views

iPhone GLSL shader dynamic branching issue

I am trying to pass an array of vec3 as uniform and then iterate through them on each pixel. The size of array varies on situations so I can't make the loop with constant number of iterations. ...
3
votes
1answer
768 views

Proper way to maintain Vertex Buffer Objects

I've started learning WebGL, currently I'm building a 2D lighting system, but there is some confusion going on inside my head. How the lighting works is based on this tutorial ...
0
votes
1answer
428 views

Get back or delete an existing OpenGL object, then change it and draw at new. How?

With OpenGL i'm drawing for example a circle. Can i take this drawn circle back out of the window and change something and then draw it back on the window? Or can i /have to delete it and then draw ...
7
votes
2answers
584 views

What's the best way to draw lots of trees

I'm writing an app which renders a random island planted with trees. The trees are currently two quads, criss-crossed and drawn with textures. I plan to have more complex meshes that form different ...
1
vote
2answers
262 views

Why doesn't a line draw after instantiating it on a thread other than the renderer thread?

I'm making a 2D game with OpenGL ES 2.0 on Android, as an excuse to learn a bunch of things. I'm drawing many lines to make a grid, but setting everything up takes time and I'd like to render a ...
-1
votes
1answer
111 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 ...
3
votes
1answer
225 views

Cut a translucent square in a texture

How to remove (cut-out) a transparent rectangle in a Texture, so that the hole will be translucent. On Android I would use the Xfermodes approach: ...
1
vote
2answers
238 views

How to get a texture from current point of view in OpenGL 2.0 ES?

Probably the title is confusing, but I didn't know how to ask better, sorry about that. What I would like to do is get a bitmap texture that represents exactly what's rendered at one point in time and ...
4
votes
2answers
352 views

Shadow artifacts caused by filtering

I'm working on a shadow-mapping implementation for an OpenGLES 2.0 environment (Stage3D in Flash to be exact). This is how my current implementation works: Render the scene to backbuffer. Render ...
2
votes
1answer
1k views

Trying to run sample AndEngine gles2 code in the simulator throws “java.lang.IllegalArgumentException: No EGLConfig found!”, how can I fix this?

I tried to run a small sample game code in the emulator but it crashed. My LogCat is given here. Can you help me resolve the issue. 02-23 15:18:50.543: D/AndEngine(636): MainActivity.onCreate ...
0
votes
1answer
805 views

Which version of AndEngine (gles1 or gles2) should I learn? [closed]

I m new to Game Development. I've chosen AndEngine, but there are 2 versions: gles1 and gles2. I tried sample code from both and found that gles2 code is not run on an emulator, but required an actual ...
0
votes
3answers
1k views

Why doesn't glBindVertexArray work in this case?

From my understanding of what glBindVertexArray does and how it works, the following code should work fine: First init: glGenVertexArraysOES(1, &_vertexArray); ...
2
votes
0answers
223 views

Camera - View matrix in Android + openGLES 2

I am trying to use the touch screen on the tablet to control my camera movements and generate the view matrix accordingly. I get the x and y coordinates of the screen and after doing some sanity ...
1
vote
0answers
309 views

Converting motionevent.getx and motionevent.gety to pixel or Object coordinates in the view

I am trying to draw buttons using OpenGL I have added a Gesture Listener for the GLSurface View now i have motionevent when ever the user touches. My question is how can i convert motionevent.getx and ...
2
votes
0answers
370 views

Can I use a shader with 2 different textures in Cocos2D (x)?

We are evaluating a variety of different graphic engines for use in our game and we want to be able to use 2 different textures for many of our sprite maps. One sprite map would be the standard RGBA ...
3
votes
1answer
320 views

Fill texture with white color

How to paint texture with white color? Example what I mean: SpriteBatch.setColor changes tint only.
0
votes
1answer
740 views

All of my matrix functions not working? OpenGL ES 2.0

I am trying to make a projection matrix scaling the screen and making a coordination system. For some reason I don't think any of my matrix calling is working... the 3 function I am using are ...
0
votes
1answer
172 views

OpenGL RTT FrameBuffer question and Rendering to texture while sampling it

What i need to do: Blur the selected texture and pass the texture to another effect for postprocessing. Notice that i want one texture passed all over. How do i want to do this: Bind the FBO ( ...
3
votes
2answers
1k views

OpenGL GL_TRIANGLE_STRIP creating grid with degenerate triangles / for one draw call

I need to create a grid ready for GL_TRIANGLE_STRIP rendering with One drawcall - so i need to degenerate the triangles. I am almost there but missing last row/column and can't figure out why. My ...
1
vote
1answer
190 views

Horizontal scroll only part of the view

I would like to know the best way on how to implement horizontal scrolling to only part of the view and vertical scrolling to complete view. I was able to achieve horizontal and vertical scrolling to ...
1
vote
1answer
683 views

How do I dispose of OpenGL resources cleanly on Android?

I am creating a framework for OpenGL ES 2.0 for Android. How can I cleanly dispose of my OpenGL resources when my Android app is done? I check for isFinished() in the onPause() event and then dispose ...
-1
votes
2answers
608 views

OpenGL 2.0 Android Scrolling Horizontally and Vertically

I am new to OpenGL2.0 in Android. How can I scroll the GLSurfaceView both horizontally and vertically?
1
vote
0answers
1k views

Draw Sphere - order of vertices [closed]

I would like draw sphere in pure OpenGL ES 2.0 without any engines. I write next code: int GenerateSphere (int Slices, float radius, GLfloat **vertices, GLfloat **colors) { srand(time(NULL)); int ...
3
votes
3answers
2k views

How can I make a shader effect that looks like a lightly shaded pencil drawing?

I want to make a shader effect using OpenGL ES 2.0 that looks like this image: I'm not sure if this image was painted or is the result of some filter, but I want to create a shader that produces ...
3
votes
4answers
585 views

Benefits of upgrading from OpenGL ES 1.1 to 2.0 on iOS

I have an animated 3D iPhone game that I first wrote using OpenGL ES 1.1 in late 2009. After many updates to the rest of the game, the OpenGL ES 1.1 code still runs fine under iOS 6, but I'm ...
1
vote
0answers
671 views

How can I use an unsigned int as a GLSL attribute for OpenGL ES 2

I'm having trouble finding conclusive information on this, but it seems like I can't pass integer attributes to GLSL for OpenGL ES or that if I do they'll be converted to float. I need a value between ...
1
vote
1answer
361 views

How to have qt5 work on desktop like on mobile devices (es2, correct glsl version)?

I am looking for help/information concerning this issue : My work: I have an opengl es2 render engine that works on an iOS app. I almost managed to make it work by calling the same openGL rendering ...
7
votes
1answer
2k views

OpenGL ES create stencil effect using texture

Environment This is the environment I am working in: OpenGL ES 2.0 iPhone Simulator & iPhone 4 iMac 27" using NVIDIA GeForce GTX 680MX 2048 MB Hope that helps. The Problem Been searching ...
4
votes
3answers
563 views

OpenGL ES 2.0 - How to batch draw particles that have unique translations, rotations, scales, and alphas?

I've combined all of my vertex data for many particles into a single array. How would I batch draw all of those particles in a manner that preserves their unique translations? Any code examples ...
2
votes
3answers
3k views

Mesh with quads to triangle mesh

I want to use Blender for making models yet realize some of the polygons are not triangles but contain quads or more (example: cylinder top and bottom). I could export the the mesh as a basic mesh ...
6
votes
1answer
613 views

FBO rendering different result between Galaxy S2 and S3

I'm working on a pong game and have recently set up FBO rendering so that I can apply some post-processing shaders. This proceeds as so: Bind texture A to framebuffer Draw balls Bind texture B to ...
15
votes
2answers
564 views

OpenGL: Where shoud I place shaders?

I'm trying to learn OpenGL ES 2.0 and I'm wondering what is the most common practice to "manage" shaders. I'm asking this question because in the examples I've found (like the one included in the API ...
2
votes
1answer
180 views

What causes the iOS OpenGLES driver to allocate extra memory?

I'm trying to optimize the memory usage of our iOS game and I'm puzzled about when/why the iOS GLES driver allocates extra memory at runtime... When I run our game through Instruments with the OpenGL ...
0
votes
1answer
355 views

Android, apply a pixelshader on a canvas

Can an opengl pixelshader be applied on a Canvas? I want to render a bitmap on a canvas, then apply a pixelshader to get, for example, a blur effect. Is this possible? I don't want to simulate the ...
3
votes
1answer
743 views

exporting bind and keyframe bone poses from blender to use in OpenGL

EDIT: I decided to reformulate the question in much simpler terms to see if someone can give me a hand with this. Basically, I'm exporting meshes, skeletons and actions from blender into an engine ...
1
vote
2answers
249 views

Low complexity shader to indicate the sides of a polyline

I have a bunch of polylines that I draw using GL_LINES. They can have thousands of points. They actually represent the separation of land and water on a map. I don't have complete polygons, just the ...
1
vote
1answer
349 views

GLES2.0 3D Android game performance and multi threading the update?

I have profiled my mixed Java\C++ Android game and I got the following result: As you can see, the pink think is a C++ functions that updates the game. It does things like updating the logic but it ...
0
votes
1answer
354 views

OpenGL ES 2. How do I Create a Basic Fading Streak Effect?

For the iPad app I am writing using OpenGL ES 2 I have a single quad - shaded using GLSL - that is dragged around the screen. Very basic. This works fine. But is rather boring. I want to increase ...
0
votes
1answer
564 views

Why do my 512x512 bitmaps look jaggy on Android OpenGL?

This is sort of driving me nuts, I've googled and googled and tried everything I can think of, but my sprites still look super blurry and super jaggy. Example: Here: ...
3
votes
1answer
296 views

cocos2d mask rotation

I've been experimenting with Ray Wenderlich's tutorial about masking sprite using shaders with cocos2D 2.0. It works pretty well but now I'd like to rotate the mask independently of the masked ...
2
votes
2answers
187 views

how to render small texture on another texture?

can anybody help me to render small texture on another texture. i.e I have one background image, when user touches on the screen it should draw small(circle or any object) on it. can anybody suggest ...
2
votes
1answer
470 views

cocos2d/OpenGL multitexturing problem

I've got a simple shader to test multitextureing the problem is both samplers are using same image as their reference. the shader code is basically just this : vec4 mid = ...
1
vote
1answer
438 views

Draw multiple objects with textures

I want to draw cubes using textures. void OperateWithMainMatrix(ESContext* esContext, GLfloat offsetX, GLfloat offsetY, GLfloat offsetZ) { UserData *userData = (UserData*) esContext->userData; ...
1
vote
2answers
269 views

Depth buffer values reset on change shader?

I have 2 different shaders, and when I change the shader (glUseProgram), it seems that the depth information is lost, because everything drawn with the 2nd shader appears completely on top of anything ...
3
votes
2answers
712 views

OpenGL sprites and point size limitation

I'm developing a simple particle system that should be able to perform on mobile devices (iOS, Andorid). My plan was to use GL_POINT_SPRITE/GL_PROGRAM_POINT_SIZE method because of it's efficiency ...
3
votes
1answer
470 views

how to do sprinkle effect of water in opengl in android?

I want to achieve sprinkling effect of water in android using opengl. so, do i need to achieve it with graphics? is there any other way to do it using opengl? or how can i start working on this,any ...
1
vote
1answer
134 views

running GL ES 2.0 code under Linux ( no Android no iOS )

I need to code OpenGL ES 2.0 bits and i would like to do this and run the programs on my desktop for practical reasons. Now, i already have tried the official GLES SDK from ATI for my videocard but ...
2
votes
1answer
147 views

How to implement custom texture formats in Android?

What I know: Android can load PNG, BMP, WEBP,... via BitmapFactory. What I want to achive: Load my own 2D file format (e.g. 1-bit texture with a 1-bit alpha channel) and output a RGBA8888 texture. ...
5
votes
2answers
1k views

OpenGL 3.0+ framebuffer to texture/images

I need a way to capture what is rendered on screen, i have read about glReadPixels but it looks really slow. Can you suggest a more efficient or just an alternative way for just copying what is ...
4
votes
2answers
854 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 ...