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

0
votes
1answer
111 views

Particles placed in the middle of the screen (OpenGL ES 2 / Android)

It seems like each of my particles is placed at (0, 0, 0) even though I'm setting different positions for each of them (debugger also confirms this). It must be something really silly that I'm ...
0
votes
1answer
209 views

Swaying tree in OpenGL ES 2

I've seen this many times, but I have no idea what's the best way to achieve it. I am looking for something close to, for example, this: Lonely Tree Live Wallpaper I have two approaches in mind: one ...
0
votes
1answer
135 views

Timing Calculations for Opengl ES 2.0 draw calls

I am drawing a cube in OpenGL ES 2.0 in Linux. I am calculating the time taken for each frame using below function #define NANO 1000000000 #define NANO_TO_MICRO(x) ((x)/1000) uint64_t getTick() { ...
0
votes
1answer
489 views

Drawing Text on a scene

I am not sure if I am missing something but I was thinking about how text entities are drawn on a scene, are they drawn with an offset depending on the length of the text? I notice that when I add a ...
0
votes
3answers
180 views

Rotating each quad in a batch separately?

Background In my app I use the following code to rotate my quad: Code //Rotate the quad Matrix.setIdentityM(mRotationMatrix, 0); Matrix.translateM(mRotationMatrix, 0, centreX, centreY, 0f); ...
0
votes
1answer
96 views

OpenGL ES2: Changing Z doesn't appear to change the location of triangle

So I am very new to OpenGL out I am playing around and trying to create a rectangle. GLfloat vVertices[] = { -0.5f, -0.5f, 0.0f, -0.5f, 0.5f, 0.0f, 0.5f, -0.5f, 0.0f,0.5f,0.5f,0.0f}; ...
0
votes
1answer
208 views

bump mapping with 2 normal maps

I was wondering if its actually possible to do bump mapping with 2 normal maps... I have tried doing it this way however I get a function overload on max and dot. uniform sampler2D n_mapTex; uniform ...
0
votes
1answer
227 views

texture won't move OpenGL ES 2.0

I want be able to move my texture in GLSL I have set my texture to wrap S and wrap T but not sure why it wont move my fragment shader looks like this at the moment uniform sampler2D n_mapTex; ...
0
votes
1answer
377 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 ...
0
votes
1answer
351 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 ...
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
503 views

OpenGLES how to make a 3D object iOS

I am a newbie in OpenGLES, so pardon me if I cannot state the question properly. Is it possible to create a 3D box with the following imports only: OpenGLES, QuartzCore, GLKit I have created a 2D ...
0
votes
2answers
2k views

Recreating assets after onResume()

After onPause is called for the GLSurfaceView the rendering surface is destroyed, along with all the textures, shaders and the like. On onResume() should the surface not be recreated and GLRenderer ...
0
votes
1answer
28 views

Batching and object's transformation

I'm trying to implement batching in my game (Sprite batching and 3D Mesh batching), I've read a lot of documentation about that but I don't understand something: When each object have is own ...
0
votes
0answers
34 views

Barycentric vertex coordinates in GLES 2.0

I have a certain set of polygons, which are stored in a vertex buffer and an index buffer. The polygons are textureless and normalless. The polygons are dynamic, their buffers get constantly emptied ...
0
votes
1answer
39 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
0answers
69 views

Android - OpenGL ES 2 - Cube with different texture in each side

I need to create a 3d cube, with a different texture on each side. Here is my cube class, which my other classes extend: import java.nio.ByteBuffer; import java.nio.ByteOrder; import ...
0
votes
0answers
70 views

Vsync and Gameloops

I was about to publish my app but I tested it on a cheap Android tablet. It's anew tablet, but a cheap / low spec one. The game runs, but is pretty choppy. I'm made a discovery that quite surprised ...
0
votes
0answers
46 views

Camera movement in Super Hexagon

I do realize there is no camera in OpenGL ES 2, but from my understanding you can simulate one using view and projection matrices. I'm using Android, by the way. Here's a video of the game, in case ...
0
votes
0answers
41 views

Scaling issues with Open GL viewport / scissor box (Trying to draw outside of viewport)

In my game I am currently scaling the viewport so it retains the ratio of my development device like so: width = (int) Math.min(deviceWidth, deviceHeight * 1.702127659574468); //1.702127659574468 is ...
0
votes
0answers
57 views

Export Blender 3D animation to be played by Android OpenGLES

Below code snippet shows the way to export coordinate of bones: def export_bone_matrix(armature, bone, label, file_handler): SystemMatrix = Matrix.Scale(-1, 4, Vector((0, 0, 1))) * ...
0
votes
0answers
35 views

Deleteing Textures in Android OpenGL ES 2.0

I'm confused about how to delete a previously applied texture. So, I've applied my texture and am happily rendering it. I decide I want to delete the texture, so this is what I've tried...... void ...
0
votes
0answers
50 views

Very basic OpenGL ES 2 error

This is an incredibly simple shader, yet I'm having a lot of trouble understanding what's wrong with it. I'm trying to send a float to my fragment shader. Its purpose is to adjust the alpha of the ...
0
votes
0answers
70 views

Displaying and updating score in Android (OpenGL ES 2)

I'm using a FrameLayout where I have a GLSurfaceView at the bottom and a few Views on top of it. One of those Views is a TextView that displays the current score. Here's how I'm updating the score ...
0
votes
1answer
50 views

glGetActiveAttrib on Android NDK

In my code-base I need to link the vertex declarations from a mesh to the attributes of a shader. To do this I retrieve all the attribute names after linking the shader. I use the following code (with ...
0
votes
0answers
65 views

Threading in Android OpenGL ES 2.0

Background I've encountered a strange issue when testing my level-select screen. I have 20 levels and display the 'select buttons' for them in 2 rows of 10 (I did this rather than display 4 rows of ...
0
votes
1answer
124 views

OpenGL ES 2 jittery camera movement

First of all, I am aware that there's no camera in OpenGL (ES 2), but from my understanding proper manipulation of the projection matrix can simulate the concept of a camera. What I'm trying to do ...
0
votes
0answers
96 views

Moving objects smoothly, bad perfomance

I just finished developing my mini-game on Android and I got some questions about perfomance and generally "how to": If I have 25+ objects on the creeen (just a polygon with 7-8 angles) its starts to ...
0
votes
0answers
141 views

glsl fragment shader work diffrently on different devices

i'm making a 2d android game where i have a mechanics that allow the player to move the camera away from the main character, and to not allow him to explore the hole world, a have create a Fog shader, ...
0
votes
1answer
280 views

libgdx game process dies on loading texture atlases

I try to load a lot of texture atlases (10) with approximately 5 (~2048x~2048)(not using PoT) .pngs each. I'm using AssetManager and there is no trouble with it on my pc but when I try it on my tablet ...
0
votes
1answer
238 views

Should I delete the textures I use in OpenGL ES 2 (Android)?

Say I have a skybox and the user can choose out of 2 sets of 6 textures (one for each face of the cube) to use on that skybox. For example if user selects set A, I load the textures ...
0
votes
1answer
126 views

Sphere turns to ellipsoid further away from origin (OpenGL ES 2, Android)

I'm not even sure what code to share, but maybe someone's been in a similar situation or has a good suggestion. I'm basically rendering a sphere in the middle of the screen (placed at (0, 0, 0)) and ...
0
votes
2answers
210 views

OpenGL ES, orthopgraphics projection and viewport

I want to make some simple 2D game on iOS to familiarize myself with OpenGL ES. I started with Ray Wenderlich tutorial (How To Create A Simple 2D iPhone Game with OpenGL ES 2.0 and GLKit). That ...
0
votes
1answer
666 views

Rotation about a point in OpenGL ES 2 (Android)

I'm trying to implement rotation about a point (the origin) using quaternions. My camera is at (0, 0, 3). I'm applying all the operations to the view matrix. Basically my rotation is at the moment not ...
0
votes
0answers
197 views

How to create a shining sun in OpenGL ES 2 (on Android)

Let's say I created a space scene in OpenGL ES 2 similar to this one: At the moment my sun is just a small texture similar to the one in the image that I place somewhere far, but it obviously looks ...
0
votes
0answers
100 views

OpenGL ES Renderer, how to know if onSurfaceCreated has been called?

Obvious answer is to set a boolean to true, but that wouldn't consider recreation. I'll tell you what I'm doing, and what's my problem for bringing light to the question. So, I was working on the ...
0
votes
0answers
48 views

Create quad from texture and screen metrics

If I have a texture with known metrics (pixel size, byte type) and a GL surface to render to of a know density and measures, and I want to draw a quad composed of two triangles that correspond to the ...
0
votes
1answer
301 views

Android OpenGL ES 2 framebuffer not working properly

I'm trying to understand how framebuffers work. In order to achieve that, I want to draw a very basic triangle to a framebuffer texture and then draw the resulting texture to a quad on the default ...
0
votes
1answer
170 views

Drawing a random x,y grid of objects within a prespective

I'm wrapping my head around OpenGL ES 2.0 and I think I'm trying to do something very simple, but I think the math may be eluding me. I created a simple, flat-ish cylinder in Blender that is 2 units ...
0
votes
1answer
80 views

Particle system lifetimes in OpenGL ES 2

I don't know how to work with my particle's lifetimes. My design is simple: each particle has a position, a speed and a lifetime. At each frame, each particle should update its position like this: ...
0
votes
1answer
55 views

Working with floats in OpenGL ES 2

Are there any reasons or situations one would use in their shader float(1) over just 1.0 ?
0
votes
0answers
176 views

Moving clouds in OpenGL ES 2

I'm trying to implement a cloudy sky like the one in this video: https://www.youtube.com/watch?v=IGOL0OyiJ6s Basically what I want is to have a scene and then the above effect in the background: huge ...
0
votes
0answers
164 views

Error when create FrameBuffer: GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS

I'm using libgdx, to create some program. I need used some operation in framebuffer. For this operation I create new framebuffer, after this operation I'm call in framebuffer dispose(). When I create ...
0
votes
1answer
180 views

OpenGLES 2.0 batching method and do not draw inactive object

I am researching about "batching" objects for one big VBO and reduce draw call. These are what I am doing now: Create interleaved VBO based on texture or render state (like Blending) So, for ...
0
votes
1answer
176 views

When to call GLBindTexture when using a spite-sheet?

Originally, I was using individual textures (ie, individual .png files) for my sprite's animation and recently altered my code so that I could put all my animation frames into 1 file (so it basically ...
0
votes
0answers
210 views

How to render alpha channeled animated 2D sprites in OpenGL ES 2.0

I searched, but I can't find specifically how to render animated 2D sprites with an alpha channel onto a 3D polygon, z=0, in OpenGL ES 2.0. This is just a basic 2D concept, but since I'm using, ...
0
votes
1answer
561 views

iOS OpenGL ES 2.0 How to Billboard on Sphere and Rotate with Sphere

I have a sphere (earth) in OpenGL ES 2.0 for iOS. I also have markers that I want to place at lat/lons on the earth - but I want the markers to always face the user ( billboards ) but also move with ...
0
votes
3answers
848 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 ...
0
votes
1answer
1k views

Android device - C++ OpenGL 2: eglCreateWindowSurface invalid

I am trying to debug and run OGLES on Native C++ in my Android device in order to implement a native 3D game for mobile smart phones. The point is that I got an error and see no reason for that. Here ...
0
votes
1answer
61 views

What is the correct Order of Operations on OpenGL 2.0 Loading Texture in condense format?

I have come across a problem when I am loading a single texture onto a single quad, and this problem persisted during the planning phases of my project, before starting my development phase. I am ...