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
votes
1answer
279 views

How can one make multiple movable images in OpenGL ES 2.0? [closed]

I was wondering, I've only seen examples of OpenGL ES 2.0 where people have used one or perhaps two images. I didn't see multiple images of where they each had independent movement. What if someone ...
1
vote
1answer
103 views

in an ios open gl es 2 game - is it better to use a few large texture atlas or many small textures

I'm working on new game, this time moving to more 3d objects and open gl es 2. Previous (successful) game was open gl es 1 and mostly 2d. For es 2 I'm developing my own 3d engine. My 3d artist ...
1
vote
1answer
399 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
3answers
908 views

Where to run logic update in openGL ES?

Using Canvas with Surfaceview I had a run() method where I would essentially do the following: onDraw(); update(); Where onDraw method would do the rendering and update would update all my game ...
-2
votes
1answer
214 views

Game code structure using openGL / Android [closed]

My game will have 3 activities (splashscreen, options menu and main game). As it stands, each is a separate activity with it's own activity class and GLSurfaceview class. Is this structure the right ...
2
votes
1answer
748 views

Separate renderng thread in Android (OpenGL ES 2.0)

I'm used to mainly working with the Canvas SurfaceView API on Android and have recently been learning openGL ES 2.0 With canvas I know that surfaceView gives you the ability to start a new thread to ...
1
vote
1answer
325 views

Powers of 2 textures in Android 2d games?

I've read a lot about the importance of using powers of 2 png's for textures when using OpenGL ES. However, how does this relate to Google's own documentation regarding the resizing of graphics for ...
0
votes
1answer
397 views

Drawing more that one quad with only one glDrawArray call…?

Edit After initially thinking that my sprite batch test was faster than calling each sprite individually, it appears that is not the case!! :-( With a single set of GL calls for a each sprite, I can ...
3
votes
2answers
2k views

Android: Loading bitmaps without premultiplied alpha (OpenGL ES 2.0)

Is this possible? To load textures in non-premultiplied format (Straight alpha?)? My game has 1 or 2 images which have semi-transparent pixels and I need to be able to fade them in and out but this ...
3
votes
1answer
855 views

How can I tell if OpenGL has finished rendering the current frame?

If I make a call to http://developer.android.com/reference/android/opengl/GLSurfaceView.html#requestRender() from my game loop, how can I tell when OpenGL has finished rendering? I don't want to ...
2
votes
0answers
214 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
830 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
437 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
593 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
269 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
115 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
235 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
243 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
353 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
821 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
227 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
317 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
377 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
327 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
758 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
177 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
2k 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
194 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
711 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
633 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
595 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
1answer
702 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
367 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
564 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
618 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
572 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
183 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
368 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
766 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
253 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
355 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
359 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
577 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
302 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 ...