Subset of the OpenGL 3D graphics API designed for embedded devices such as mobile phones.

learn more… | top users | synonyms

2
votes
2answers
946 views

Cocos2d v2.0 and OpenGL 2.0/1.0: where to start

I started developing my very first game 3 months ago using Cocos2d 2.0 for iPhone. I am now in the stage where I'd like to add some cool effects to the bullets and some special weapons (see my ...
2
votes
2answers
181 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 ...
3
votes
1answer
617 views

Z Order in 2D with orthographic projection and texture atlas

I am working with a 2D game in OpenGL ES and have a question about z-order together with a texture atlas. I am using an orthographic projection because I want pixel-perfect rendering of 2D sprites, ...
1
vote
3answers
2k views

How do I repeat a texture with GLKit?

I am using GLKit in order to show textures on my project. The code is like this: -(void)setTextureImage:(UIImage *)image { NSError *error; texture = [GLKTextureLoader ...
-5
votes
4answers
2k views

How to implement a 2d collision detection for Android

I am making a 2d space shooter using opengl ES. Can someone please show me how to implement a collision detection between the enemy ship and player ship. The code for the two classes are below: ...
1
vote
0answers
536 views

OpenGL ES multiple objects not being rendered

I am doing the following to render multiple balls move around the screen but only 1 ball is seen to appear and function. I don't know why the rest (count-1) balls are not being drawn public void ...
2
votes
1answer
409 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 = ...
2
votes
2answers
1k views

Can I use PBOs for textures in iOS?

As far as I can see, there is no GL_PIXEL_UNPACK_BUFFER. Also, the OpenGL ES 2.0 specification (and as far as I know, no iOS device currently supports OpenGL ES > 2.0) states that glMapBufferOES() can ...
2
votes
0answers
122 views

Is there a way to export 3D objects with animation from Blender or any other app into OpenGL ES 1.1 code?

The problem is that all the examples I've found are obsolete or iOS/Android specific and not "pure" OpenGL ES 1.1. If anyone can provide me with a good example/tutorial/book it would be very much ...
1
vote
1answer
821 views

Sprite animation in openGL - Some frames are being skipped

Earlier, I was facing problems on implementing sprite animation in openGL ES. Now its being sorted up. But the problem that i am facing now is that some of my frames are being skipped when a bullet(a ...
1
vote
2answers
1k views

Trying to Draw a 2D Triangle in OpenGL ES 2.0

I'm trying to convert a code from OpenGL to OpenGL ES 2.0 (for the BlackBerry PlayBook). So far what I got is this (just the part of the code that should draw the triangle): void setupScene() { ...
1
vote
1answer
589 views

Rotate triangle so that its tip points in the direction of the point on the screen that we last touched

OpenGL ES - Android. Hello all, I am unable to rotate the triangle accordingly in such a way that its tip always points to my finger. What i did : Constructed a triangle in by GL.GL_TRIANGLES. Added ...
0
votes
1answer
144 views

Lighting get darker when texture is aplied

Im using OpenGL ES 1.1 for iPhone. I'm attempting to implement a skybox in my 3d world and started out by following one of Jeff Lamarches tutorials on creating textures. Heres the tutorial: ...
2
votes
4answers
581 views

How to create OpenGL (ES 1.0) texture programmatically?

I need to draw inside a buffer and then upload it as texture to OpenGL. So basicaly unsigned char* buffer and then call to glTexImage2D(). I will be using Marmalade mobile SDK and OpenGL ES 1.0.
3
votes
2answers
642 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 ...
1
vote
1answer
594 views

openGL ES - change the render mode from RENDERMODE_WHEN_DIRTY to RENDERMODE_CONTINUOUSLY on touch [closed]

i want to change the rendermode from RENDERMODE_WHEN_DIRTY to RENDERMODE_CONTINUOUSLY when i touch the screen. WHAT i Need : Initially the object should be stationary. after touching the screen, it ...
1
vote
3answers
131 views

How to handle wildly varying rendering hardware / getting baseline

I've recently started with mobile programming (cross-platform, also with desktop) and am encountering wildly differing hardware performance, in particular with OpenGL and the GPU. I know I'll ...
5
votes
5answers
921 views

Which version of OpenGL for Android?

I've been trying to learn OpenGL ES 2.0 to create a simple 2D game. I bought a book on android development, but after seeing that the author uses his own SDK that implements OpenGL ES 1.0 I decided to ...
3
votes
1answer
435 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
147 views

Artifacts when draw particles with some alpha

I want to draw in my game some particles. But when I draw one particle above another particle, alpha channel from this above "clear" previous drawed particle. I set in OpenGL blend in this way: ...
0
votes
2answers
497 views

Help with Meshes, and Shading

In a game I'm making in LibGdx, I wish to incorporate a ripple effect. I'm confused as to how I get access to the individual pixels on the screen, or any way to influence them (apart from what I can ...
9
votes
6answers
10k views

OpenGL ES 2.0: Repository of Quality Shaders

Could I kindly ask, to suggest me a repository of high quality OpenGL (OpenGL ES 2.0) vertex and fragment shaders, please? I am looking for pixel based ligting shaders (such as phong) and simmilar. ...
1
vote
2answers
632 views

What is the best way to store meshes or 3d models in a class

I am wondering, how I should store my mesh into memory after loading it from whatever file. I have Questions floating in my head: Should a mesh could have sub meshes or does the 3d model just store ...
0
votes
1answer
150 views

Writing a basic shader for large input files

I started writing a shader for my iOS app and instead of starting from scratch i used this tutorial here: http://www.raywenderlich.com/3664/opengl-es-2-0-for-iphone-tutorial I wrote an import ...
12
votes
1answer
1k views

Should I distribute shaders in a compiled form or in plain text?

Having an application that uses shaders that have been wrote in GLSL, what is the best strategy for the distribution in the real world and for the desktop and mobile? I'm aiming to distribute this in ...
0
votes
3answers
4k views

2D Rendering with OpenGL ES 2.0 on Android (matrices not working)

So I'm trying to render two moving quads, each at different locations. My shaders are as simple as possible (vertices are only transformed by the modelview-projection matrix, there's only one color). ...
1
vote
1answer
172 views

if a desktop machine supports OpenGL 3.0+ I can assume that it supports OpenGL ES 2.0 too?

This isn't clear for me, if i use the drivers from the GPU manufacturer and they support OpenGL 3.0 and/or above, i can always make an OpenGL ES 2.0 application work?
0
votes
1answer
1k views

Reducing Memory Use on OpenGL ES

I'm using an opengl es based framework to create my game.I have an out of memory problem on some devices.I have 15 textures with a size 1024x1024(totally 10 mb).On memory they covers a lot of ...
2
votes
3answers
1k views

glGetFloatv – should it be avoided? Can it be replaced?

Platform is OpenGL ES 1.x. I am using glGetFloatv() to get MODELVIEW matrix. This allows me to compute points, where I need to draw a shadow effect. This is very handy, as I can forget about ...
0
votes
1answer
123 views

android opengl-es spritesheet display number

Whats the best way to display numbers on android with opengl using a spritesheet? I like to display the number "294" using the spritesheet: http://i.stack.imgur.com/wv5Zh.png
1
vote
2answers
638 views

Android OpenGL textures sometimes corrupted

Just trying to get some sprites (textured squares) to draw from a texture atlas and 50% of the time after the application is first launched/ reorientated/ brought from sleep these various graphical ...
0
votes
2answers
406 views

Can I dynamicaly modify 3D objects?

I am new to OpenGL, I am able to render a model object (a human model) that is using .obj and .mtl file in iOS. Now I want to make a modification to the loaded model. For example, I want to change ...
3
votes
1answer
2k views

Sea water shader using only fragment processor

I have a game that runs on mobile devices (OpenGL ES 2.0) and for which I would like to create some sea water using the shaders. Now, the plane on which the sea water texture will be has only 4 ...
1
vote
2answers
374 views

Lights system with shaders in OpenGL?

In more than just 1 occasion, i read about 2 ways of doing a light's system in OpenGL: normal way? i don't know how to call this one with the shaders ( GLSL ) The problem is i don't get the ...
2
votes
1answer
104 views

Touch point on the near plane

I have a matrix created with either orthoM or frustumM GL function, where the near plane is logically the surface of the tablet. I would like to translate touch locations to their location on the near ...
5
votes
1answer
1k views

OpenGL ES 2.0 Best Practices / Architecture Guide

I've recently started working with OpenGL (ES 2.0) on the Android. While there is lots of documentation about the basics, I can't seem to find much about the overall architecture of OpenGL. In ...
1
vote
1answer
977 views

Shader authoring/editing tools for GLSL ES

Since Render Monkey has been discontinued (perhaps due to the complexity of today's shading languages), there are few successors that can match its functionality. Is there any useful tool for material ...
4
votes
3answers
3k views

OpenGL ES and Screen Coordinates

Is there anyway I can make OpenGL ES 2.0 to accept coordinates (for Vextex for example) in int meaning the pixels instead of the default float system? Also how can I set the point (0,0) to be at the ...
1
vote
1answer
483 views

How to obtain contrail visual effect?

I have objects moving in OpenGL ES1 application. I want some of them to leave behind contrail – like if they would emit some radiation or something. EDIT: the kind of contrail is: light contrail – ...
4
votes
1answer
461 views

Creating a highlight halo around a selected object

I'm looking to create a halo highlight around the selected objects in my game screen. The main platform is android, but I am writing an iOS version as well, updating it whenever I successfully add the ...
1
vote
1answer
430 views

Why is my mesh generation algorithm not working properly?

I am trying to generate a grid in OpenGL ES, using known methods for triangle strips and stitching as shown in: this post and this post The code below, generates the vertices for a 4x4 grid with a ...
1
vote
1answer
2k views

2D Quads : Translation with OpenGL ES 2.0 on Android [closed]

I have a simple 2D engine that renders 2D textured quads, and right now I can scale the quad or rotate it, but when I try to translate it I have a strange distortion (the quad is squashed in the half ...
-1
votes
1answer
2k views

How to display bitmap using Texture api in android opengl

I want to display a bitmap image at screen using texture api in android opengl. Some code which I have used in our code as below. public void onSurfaceChanged(GL10 gl, int width, int height) { ...
1
vote
0answers
229 views

Getting contour without the background [closed]

I have a texture and vertex which are needed to create a set of closed polygons. For this purpose I use these functions: Code for create texture: CCSprite* spr = ...
1
vote
0answers
189 views

Remove “dots” noise (like from dot-matrix printer)

I have 2D array of floats. Using the floats, I generate image by doing proportional selection of color from between COLOR_MIN, COLOR_MAX – for maximal float value at given (x,y), I choose COLOR_MAX ...
4
votes
2answers
402 views

Geometry vs sprites

I'm developing an android game, where the enemies are geometrical shapes. Performance is a main goal for me so I was wondering if defining shapes directly in OpenGL would be more efficient than using ...
2
votes
3answers
2k views

How do I render .dae models?

I'm building a game for iOS. I'm quite new to OpenGL but what I want is to take a 3D model I have made in Google SketchUp and use it in my 3d game. The problem is I don't know how to proceed. I have ...
3
votes
2answers
4k views

Creating an OpenGL FPS camera: I have the position and orientation vectors, now what?

I have been struggling to create a first person camera in OpenGL ES 2.0 without using gluLookAt(). I grab the camera's orientation vectors (the way it's looking) from the current modelview matrix, and ...
7
votes
2answers
2k views

OpenGL ES 2.0: Mixing 2D with 3D

Is it possible to mix 2D and 3D graphics in a single OpenGL ES 2.0 game, please? I have plenty of 2D graphics in my game. The 2D graphics is represented by two triangular polygons (making up a ...
2
votes
2answers
2k views

How to use OpenGL's glUseProgram?

While in the rendering loop, is it OK to call glUseProgram? Does it have a big overhead? I'm planing to use a program for each different material in the scene. I'm a real beginner with OpenGL and I'm ...