Subset of the OpenGL 3D graphics API designed for embedded devices such as mobile phones.
4
votes
0answers
164 views
+50
Optimizing performance of a heavy fragment shader
I need help optimizing the following set of shaders:
Vertex:
precision mediump float;
uniform vec2 rubyTextureSize;
attribute vec4 vPosition;
attribute vec2 a_TexCoordinate;
varying vec2 tc;
...
1
vote
2answers
77 views
OpenGL ES 2.0: 2D game rendering, no performance gain with glDraw call batching
I just did a small benchmark. To my surprise batching sprites into a single draw call doesn't give any significant performance boost. Following are my results:
Hardware: iPod touch 4
Extra info: ...
5
votes
2answers
743 views
Implementing fog of war in opengl es 2.0 game
Hi game development community, this is my first question here! ;)
I'm developing a tactics/strategy real time android game and I've been wondering for some time what's the best way to implement an ...
3
votes
2answers
72 views
OpenGL ES 2.0: Enabling hi-res on iOS
I created an empty iOS project and then added a custom GLView class which is then added to AppDelegate. I have following questions:
1) How do I enable hi-res retina mode on iPhone 4? Currently I am ...
1
vote
1answer
120 views
World orientation in OpenGLES clarification
I have a 3d tile map made up of individual billboards in OpenGLES. Each is a 2 triangles mesh and has a 3D Vector to determine its position and another defining its rotation from the origin at ...
6
votes
4answers
1k views
Sprite Animation in Android with OpenGL ES
How to do a sprite animation in android using OpenGL ES?
What i have done :
Now I am able to draw a rectangle and apply my texture(Spritesheet) to it
What I need to know :
Now the rectangle shows ...
1
vote
2answers
84 views
Calling glGetError() in release builds?
Currently, I'm calling glGetError() after each OpenGL function call in order to be able to detect and report bugs.
I've been reading that glGetError() calls should be reduced to once per frame in ...
3
votes
2answers
845 views
Cocos2D: Upgrading from OpenGL ES 1.1 to 2.0
I have recently starting upgrading my ios game to the latest Cocos2D (2.0 rc), and I am having some difficulties upgrading my texture generation code to OpenGL 2.0.
In the old version I generated ...
3
votes
2answers
657 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 ...
0
votes
1answer
85 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 ...
2
votes
1answer
569 views
Game Development at iOS, Android and PC with OpenGL ES
I'm beginning iOS apps development, and my aim is to make games to launch on App Store.
But I want to know if it's possible to program a game on Xcode with OpenGL ES (C++ game logic), integrate it on ...
0
votes
1answer
74 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
52 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
44 views
texture movement stutters
Hey I at the moment I have got my texture to move however it stutters as I increment by 0.001 every second. My animation is done via FPS if that make sense and here is some code
FrameCount++;
...
2
votes
1answer
1k views
How do I implement a score database in Android?
I making a 2D game for Android using OpenGL-ES technology. It is a space shooting game where the player shoots enemy ships.
I want to keep a track of score for the amount of enemy ships destroyed ...
2
votes
0answers
45 views
OpenGL ES Single Bitplane Texture (or something close)
I'm looking to use a texture to store single bits (or a low number of bits, two or three). This in of itself isn't hard if you're using nearest neighbor sampling with some bit plane unpacking. The ...
0
votes
3answers
191 views
Simple iOS glDrawElements - BAD_ACCESS
You can copy paste this into the default OpenGl template created in Xcode.
Why am I not seeing anything :-)
It is strange as the glDrawArrays(GL_TRIANGLES, 0, 3); is working fine, but with
...
7
votes
4answers
4k views
Updating OpenGL ES 1.1 based iPhone game to use Open GL ES 2.0
I'm fairly new to anything OpenGL in general. I've made an OpenGL ES 1.1 based 2D iPhone game by working from sample code. I'm under the impression that OpenGL ES 2.0 is substantially different from ...
0
votes
0answers
48 views
Cocos2d/Box2d Component based entity system
Recently I've read somewhere that it is not a good idea to inherit from CCSprite class when making your game objects. In my CBES each Game Object has :
-PhysicsComponent(responsible for updating ...
1
vote
1answer
79 views
Switching from OpenGL ES 1.0 to 2.0
I have been developing an Android app using OpenGL 1.0 for quite some time using a naive approach to rendering, basically making a call to glColor4f(...) and glDrawArrays(...) with FloatBuffers each ...
2
votes
2answers
3k views
Drawing a circle in OpenGL ES Android, squiggly boundaries
I am new to OpenGL ES and facing a hard time drawing a circle on my GLSurfaceView. Here's what I have so far.
The circle class
public class MyGLBall {
private int points=40;
private float ...
-1
votes
1answer
34 views
Why doesn't onSurfaceCreated ever run in this code?
I create my game element this way in my activity:
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mGame = new Game(this);
mGame.bootstrap();
...
1
vote
0answers
69 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. ...
1
vote
0answers
45 views
Android opengles how to use glunproject
How to use glunproject in my android app?
I have the following parts in my engine:
A projection matrix
A view matrix for the camera
A model matrix for each of the objects in my world. This matrix ...
0
votes
1answer
99 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 ...
1
vote
0answers
68 views
How to change/modify or animate an existing OpenGL object on Android?
I maybe know understand it all a little bit better so i thoug i make a new shorter question to eventually get an answer.
Get back or delete an existing OpenGL object, then change it and draw at new. ...
2
votes
0answers
125 views
How to make the background of an OpenGL object transparent?
It sounds so simple but i didn't get it to work.
The Background of my FrameLayout where i add the GLSurfaceView in is colored blue but there is only black.
So here is my method to initiate the ...
1
vote
1answer
164 views
How to draw an OpenGL object in another on Android? -> Eyes and Eyeballs
As i allready wrote in another question:
I'm working on OpenGL since a Week, so i'm new to the most stuff. (also my englisch isn't the best. Hop you can understand the most anyway)
So i'm ...
3
votes
2answers
465 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 ...
1
vote
1answer
218 views
How do I get smooth edges with OpenGL on Android?
Here is a screenshot that maybe makes clear what my problem is.
I'm only drawing 2D circles with OpenGL.
I already read the following:
...
1
vote
1answer
172 views
Selecting and moving object in OpenGL Gameplay3D Engine
I'm using Gameplay3d as a game engine to develop a simple board game. PEG Solitaire
I've come to the part where I've created a 2D grid for all the movable object, empty locations and also where it's ...
1
vote
2answers
203 views
GLSL Motion blur on mobile.. possible at acceptable framerates?
I have been struggling to implement a simple linear motion blur effect on mobile (Android, OpenGLES 2.0) but it just seems to destroy my framerate.
I'm rendering to texture (FBO) then applying a ...
2
votes
2answers
312 views
Point Sprites vs Textured Quads in Open GLES 2.0
I'm wondering what would perform better, point sprites (GL_POINTS) or regular sprites (GL_TRIANGLES). Here's the scenario:
I am developing a simple particle system to allow me to produce various ...
2
votes
0answers
92 views
Displacement Mapping opengl-es
I need to do an application similar to this Morfo. And I posted a question here where the answer states the solution is "Displacement Mapping" . And I googled this to do it in opengles. I couldnt get ...
0
votes
1answer
65 views
Interleaved formats for meshes confusion
So I have been reading up on data formatting for 3D objects so that I can render my meshes as fast as possible in openGL, I am quite new to openGL so bear with me.
The format for interleaving your ...
1
vote
0answers
74 views
Android multi screen rendering
Is it possible on Android to render specifically / only, to the connected Monitor/TV on the hdmi port?
If so, is it possible to use OpenGL ES to render a different scene on the monitor and on the ...
7
votes
1answer
341 views
How wise is this multithreading architecture?
I'm rewriting a game engine I wrote in an attempt to parallelize as much as possible. I'm considering making properties which may be accessed from multiple threads all use accessors which use boost ...
11
votes
5answers
5k views
Complete Math Library for use in OpenGL ES 2.0 Game?
Are you aware of a complete (or almost complete) cross platform math library for use in OpenGL ES 2.0 games?
The library should contain:
Matrix2x2, Matrix 3x3, Matrix4x4 classes
Quaternions
...
0
votes
1answer
227 views
Create cylinder using OpenGL-ES [closed]
I want to draw cone using OpenGL ES I have gone through many links to draw cylinder but I don't have any idea or approach to draw the cylinder. I've seen the gluCylinder function for OpenGL, but no ...
1
vote
1answer
345 views
Why do my pyramids fade black and then back to colour again [closed]
I have the following vertecies and norms
GLfloat verts[36] = {
-0.5, 0, 0.5,
0, 0, -0.5,
0.5, 0, 0.5,
0, 0, -0.5,
0.5, 0, 0.5,
0, 1, 0,
-0.5, 0, 0.5,
0, 0, -0.5,
0, 1, 0,
0.5, 0, 0.5,
-0.5, 0, ...
0
votes
0answers
27 views
Make a layer over an image and adjust its co-ordinates by touch
I need to make a layer over an image and adjust the layer to fit to image and get its co-ordinates of the layer.
I need to adjust the layer by touch and pinch.
The sample image is as below. I need ...
3
votes
0answers
64 views
Rotate an image and get back to its original position - opengles glkit
I need to rotate an image in opengles GLkit and get it back to its original position in GLkit.
rotation += 5;
_modelViewMatrix = GLKMatrix4Rotate( _modelViewMatrix, GLKMathDegreesToRadians(5), 1, 0, ...
3
votes
3answers
5k views
OpenGL ES 2.0: Vertex and Fragment Shader for 2D with Transparency
Could I knindly ask for correct examples of OpenGL ES 2.0 Vertex and Fragment shader for displaying 2D textured sprites with transparency?
I have fairly simple shaders that display textured polygon ...
1
vote
1answer
110 views
opengles display human face in iphone and animate it?
I need to make a human 2D face to 3D face.
I used this link to load an ".obj" file and map the textures. This example is only for cube and pyramid. I loaded a human face ".obj" file.
This loads the ...
1
vote
1answer
54 views
Does iOS support BC4 compressed texture?
I've been designing a new OpenGL image algorithm using BC4 textures at its core.
It works well accross Windows and Mac, my main targets up to now.
But today, the customer added a new requirement : it ...
1
vote
1answer
176 views
OpenGL ES screen to world coordinate
I am currently attempting to convert my screen coordinates to world coordinates, to be able to interact with objects. I am using glm and unProject to try and achieve this, so far this is my code:
...
-1
votes
1answer
265 views
2d triangle with OpenGL-Es on Android
hey I am trying to draw a triangle on opengl es . I just followed a tutorial to do it. eventhough everything seems to be fine it does not work. everytime I run my code it sends me back to main menu.
...
4
votes
3answers
393 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
0answers
270 views
Improving performance of a particle system (OpenGL ES)
I'm in the process of implementing a simple particle system for a 2D mobile game (using OpenGL ES 2.0). It's working, but it's pretty slow. I start getting frame rate battering after about 400 ...
0
votes
0answers
47 views
iOS billboard rendering performance
What is the fastest way to render semi-transparent billboards (for a particle system) on iOS? I'm currently using GLES1, but if required for performance I can switch to GLES2.
Does sorting the quads ...
