Subset of the OpenGL 3D graphics API designed for embedded devices such as mobile phones.
2
votes
5answers
2k views
Skipping glReadPixels and reading iPhone's “VRAM” directly
I'd like to rapidly capture "screenshots" of my OpenGL ES iPhone game and turn them into a video. I've tried the following approach (it works but degrades the game play to an unacceptable level):
...
0
votes
3answers
675 views
does opengl automatically handle offscreen rendering?
I'm wondering if opengl can automatically manage offscreen rendering. I mean if it can detect and ignore sprites and textures if they are rendered out of screen.
if it makes any difference i'm ...
1
vote
1answer
804 views
What is OpenGL ES Shading Language based on and what are the differences?
My guess is that it is derived from version 1.10 of the OpenGL Shading Language, document revision number 59. Found it here, page 7:
...
0
votes
2answers
1k views
Most efficient way to capture OpenGL ES content of iPhone screen
I'd like to efficiently capture a "screenshot" of my OpenGL ES iPhone game. I put screenshot in quotes because I really want to move the screen contents into a pixel buffer that I can eventually use ...
7
votes
1answer
5k views
Blend Modes in Cocos2D with glBlendFunc
We've been trying to replicate the most common blending modes that are available in Photoshop and Quartz 2D, but we've only come up with 3 and that's after some long searching online.
For anyone ...
1
vote
0answers
540 views
Rotation deforming mesh (Opengl ES 2.0)
I'm trying to render a rotating cube on Opengl ES 2.0, using some math classes I wrote (based on a lot of online and offline info) for quaternions, matrixes and the like. As far as I know all the math ...
0
votes
0answers
487 views
Projective Transfrom Image Warping on iPhone
I'd like to perform a projective-transformation (a.k.a. perspective-transformation) warp on an image.
Given the 4 2D corners of the source and target quadrangles (from these the 3x3 Homography matrix ...
7
votes
2answers
629 views
Recording the gameplay in the game itself?
I'm presently working on a 3D car racing game for the iOS platform. I had to implement a replay system and then record that replay in a video file to upload it to YouTube.
I'm only having issues ...
0
votes
3answers
287 views
I started my journey this way, am I on the right track? [closed]
I started my journey to learn games programming from the scratch (I'm a software developer but not in gaming field), I'm targeting iOS games development.
Currently I'm ready "O'reilly iPhone Game ...
1
vote
1answer
197 views
Can OpenGL ES help in this game?
I am learning OpenGL ES and I have setup the environment. I believe the best way to learn things is to grab a dummy project and start working on it. So what I plan to do is...
Now I want this ...
3
votes
1answer
380 views
Phone complains that identical GLSL struct definition differs in vert/frag programs
When I provide the following struct definition in linked frag and vert shaders, my phone (Samsung Vibrant / Android 2.2) complains that the definition differs.
struct Light {
mediump vec3 ...
2
votes
2answers
1k views
Best method for 2 layer tile based map scrolling
What is the best general approach to implement scrolling for a 2D tile based game?
I need to scroll the map with a constant speed, lets say 2 pixels every frame (like in a top down shooter).
The ...
0
votes
2answers
552 views
Graphical Android game: Bad performance in some situations
I am developing a simple graphical game for Android (Java and OpenGL ES). There is no high-end graphics involved, basically a few (less than 10) sprites and some (about 10) dynamically drawn ...
4
votes
1answer
2k views
OpenGL or Canvas?
I'm writing a 2D snake-like game for android (Hungry Birds, already in the market), and now I'm wondering if I should port it to OpenGL so that the performance can stay stable while I continuously add ...
5
votes
2answers
1k views
Why must the transpose value of glUniformMatrix4fv in webgl/OpenGL ES be false?
Why must the transpose value of glUniformMatrix4fv in webgl/OpenGL ES be false?
The OpenGL ES spec says that the transpose value must be false or an INVALID_VALUE is generated. Why then have the ...
1
vote
1answer
479 views
Questions before I revamp my rendering engine to use shaders (GLSL)
I've written a fairly robust rendering engine using OpenGL ES 1.1 (fixed-function.) I've been looking into revamping the engine to use OpenGL ES 2.0, which necessitates that I use shaders. I've been ...
2
votes
2answers
1k views
How can I convert an image from raw data in Android without any munging?
I have raw image data (may be .png, .jpg, ...) and I want it converted in Android without changing its pixel depth (bpp). In particular, when I load a grayscale (8 bpp) image that I want to use as ...
2
votes
1answer
3k views
Faster way to draw dynamic meshes in OpenGL ES
I'm writing a 3D game which is going to inlcude some dynamic meshes.
For now, my code looks like this :
private float[] mVertices;
private FloatBuffer mVertexBuffer;
public void onDrawFrame(GL10 ...
4
votes
4answers
3k views
GLM: Euler Angles to Quaternion
I hope you know GL Mathematics (GLM) because I've got a problem, I can not break:
I have a set of Eular Angles and I need to perform smooth interpolation between them. The best way is converting them ...
0
votes
2answers
371 views
Linear Interpolation Causing Gimbal Lock?
I have created an object movement path in a 3D authoring application. Then, I exported the path (100 frames) into my custom text file in the form of Euler Angles.
The next point was loading the ...
2
votes
1answer
2k views
OpenGLES 2.0: Rendering Multiple Sprites - Texel Corruption
I'm having a tremendous time getting the second (or additional) sprites in my game engine to render properly. The first one always works great: it is positioned and sized properly in screen coords, ...
0
votes
2answers
1k views
OpenGL ES Framebuffer creation problem
I'm having some problems porting my D3D code to OpenGL ES. I have a Graphics Device class that encapsulates all rendering commands. The code below is in an ObjC++ file.
The problem code is the called ...
1
vote
2answers
3k views
OpenGL ES 2.0: Controlling Transparency in Fragment Shader
The following is the OpenGL ES 2.0 simple GLSL Fragment Shader, I use to place textures on polygons, to render 2D sprites.
varying mediump vec2 TextureCoordOut;
uniform sampler2D Sampler;
void ...
0
votes
2answers
1k views
OpenGL ES 2.0: Perspective Projection for 2D Games
Prespective Projection has features that could be very well used even in 2D games. At least two very beneficial characteristics that come to my mind are:
Using Perspective Projection to substitute ...
5
votes
1answer
4k views
OpenGL ES 2.0: Understanding Perspective Projection Matrix
Setting the Perspective projection matrix in Open GL (including OpenGL ES 2.0) has the following general format:
glm::mat4 perspective(float fovy, float aspect, float zNear, float zFar);
Notice the ...
23
votes
3answers
9k views
Workaround to losing the OpenGL context when Android pauses?
The Android documentation says:
There are situations where the EGL
rendering context will be lost. This
typically happens when device wakes up
after going to sleep. When the EGL
context is ...
2
votes
1answer
421 views
OpenGL ES GL_FIXED versus GL_FLOAT
I am writing an app for Android, using OpenGL ES 1.x
I am confused as to whether I should use GL_FLOAT or GL_FIXED, the priority being performance regarding GPU operations(does GL_FIXED need to be ...
1
vote
1answer
748 views
Android : Some textures not loading after resuming twice
This is an odd one. When I press home and then restart my game I reload all my textures (checking glIsTexture on the id's first). If I do this once, all textures load as expected, but if I do it ...
2
votes
2answers
793 views
Is there any scroll algorithm for OpenGL ES?
I was working on J2ME games in the past, when draw a large backgroud, I always use the Carmack 2d scroll algorithm, keep a image buffer a little larger than device screen, draw the changed small tiles ...
0
votes
2answers
1k views
OpenGL ES 2.0: Calculated Cube Vertex Normals Verification
Could I kindly ask to confirm, that the calculated normals are correct, please? I have calculated them on my own, but my testcube is still strangely lighted within OpenGLES 2.0.
The vertices were ...
9
votes
6answers
7k 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
1answer
1k views
OpenGL ES 2.0: Converting GL_TRIANGLES into GL_TRIANGLE_STRIP
I export my 3D geometry from a 3D authoring application. It is possible to export the vertex coordinates as full triangle arrays.
On ther other hand, triangle strips are more efficient for the ...
1
vote
1answer
3k views
OpenGL ES 2.0: Moving Camera in Orthogonal (2D) Projection
I have quite large 2D game scene. The scene is much larger than the screen of the LCD. Therefore, I have to move the camera (view) in desired directions, to display particular parts of the scene.
...
1
vote
0answers
191 views
How to ensure that a 3D coordinate at Z=1 act like a 2D coordinate (using perspective projection) [duplicate]
Possible Duplicate:
OpenGL ES 2.0: Mixing 2D with 3D
The title probably is not that clear but please help me out here. I am going to write a (mostly) 2D game using OpenGL ES 2.0 so if I ...
5
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 ...
1
vote
1answer
698 views
Data Organization in Custom 3D Mesh File Format
After careful consideration to use middleware, I have decided on creating my own 3d file format format to export meshes from 3D authoring application (Softimage) into my game.
I will need to export ...
4
votes
1answer
651 views
Middleware to Bring 3D Meshes into OpenGL ES 2.0
Say I develop a game for mobile platform running OpenGL ES 2.0. I have done 2D part, and now I wish to import some 3D objects.
The imported 3D objects must contain the following:
Vertices positions
...
2
votes
2answers
777 views
OpenGL ES on iOS Books
I was wondering if someone has read both the:
iPhone 3D Programming
And
OpenGL ES 2.0
books and have an opinion if one is better than the other?
I'm basically wanting to get into doing 3D ...
6
votes
1answer
686 views
Adding a simple mix() destroys the framerate
I have a very simple shader and added linear fog via mix like this:
finalColor = mix(finalColor, vec3(0.5, 0.8, 0.95), vUVoutAndViewZ.z);
Note that the view Z distance is in the variable that also ...
2
votes
1answer
3k views
Is it possible to overlay EditText box on a GLSurfaceView on Android?
I am trying to add a "PlayerName" box on top of a opengl menu background, is this possible? I've tried various layouts, but they don't seem to allow an EditText box to appear on top
What is the ...
9
votes
2answers
6k views
OpenGL ES 2.0 Point Sprites Size
I am trying to draw point sprites in OpenGL ES 2.0, but all my points end up with a size of 1 pixel...even when I set gl_PointSize to a high value in my vertex shader.
How can I make my point sprites ...
0
votes
1answer
720 views
OpenGL - resize texture when using cubemap
I want to resize my texture. I am using cubemap to compute reflection. I want to use this cubemap to draw skybox. Skybox is drawn but I want to resize texture down, because it is dilated. As I wrote ...
1
vote
2answers
359 views
opengl rotations for a human
I currently can rotate around a pivot point by first translating to the pivot point then performing the rotation and finally translating back to the origin. I do that easily enough for the shoulder in ...
3
votes
2answers
595 views
Faster way to scale images than gluScaleImage?
I'm porting a C++ game to Android using the NDK and there's one bottleneck that's really slowing down the code: gluScaleImage().
Does anyone know of a faster way to scale image textures?
2
votes
3answers
3k views
iPhone Open GL ES using FBX - How do I import animations from FBX into iPhone?
I've been researching this extensively.
We have a game that's 90% complete, using custom game logic in iPhone 4.0. We've been asked to import a 3D model and have it animate when various events happen ...
0
votes
3answers
721 views
OpenGL ES 1.1 strange slow drawing by zooming on iPhone
I have created a view (derived from UIScrollView) where the cells are drawn and zoom occurs. Everything is drawn with OpenGL ES 1.1. Zoom is specified by adding of a calculated new distance which is ...
4
votes
2answers
608 views
Optimising the modelview transformation in GLSL for 2D
So, the standard way to transform vertices and then pass to the fragment shader in GLSL is something like this:
uniform mat4 u_modelview;
attribute vec4 a_position;
void main() {
gl_Position = ...
2
votes
2answers
2k views
How do I create a sky box with OpenGL ES 2.0?
Can you give me hint to any good sky box example in OpenGL ES 2.0? I have found only OpenGL and does not work for me.
I am doing it this way:
Initialization:
glUseProgram(m_programSkyBox.Program);
...
3
votes
1answer
2k views
How to create a perspective field of view matrix?
Hey, hello. I am learning a little of WebGL (OpenGL ES 2.0) through the http://learningwebgl.com tutorials, but it uses a third party library to create the View, Projection and transformation matrices ...
4
votes
2answers
476 views
How effects found in “Autodesk Fluid FX” are implemented using OpenGL ES?
How this kind of effects are technically implemented using OpenGL ES? Are they performing simulation on GPU (using Shaders) or CPU while using some smart vertex positioning and texturing? Why it ...