For some reason my code here (this is the entire thing) doesnt actually render anything besides a red screen.. can anyone tell me why?
package com.ntu.way2fungames.earth.testbed;
import java.nio.FloatBuffer;
import javax.microedition.khronos.egl.EGLConfig;
import javax.microedition.khronos.opengles.GL10;
import android.app.Activity;
...
Hi!
I'm developping an game using the API opengl es 2.0. I need to know how to generate the normal coordinate because i need them to developp the lighting.
I'm wondering if there is a software or an algorithm that generate normal coordinate.
Great thanks!
...
Hi!
As far as i know, we can't read the Z(depth) value in OpenGL ES 2.0.
So I am wondering how we can get the 3D world coordinates from a point on the 2D screen?
Actually I have some random thoughts might work. Since we can read the RGBA value by using glReadPixels, how about we duplicate the depth buffer and store it in a color buffer...
Hi all!
I'm having a hard time deciding whether to go with Quartz2D or OpenGL for an iPad game. It will be 2D mostly, but effect-intense (simultaneous lighting effects for 10-30 objects, 10-20 simultaneous animations on the screen).
So far, assuming i'm equally dumb in both technologies and have to learn them from the ground, i came to ...
I've googled around everywhere, but cannot find much for rendering strings to textures and then displaying that texture on a quad on the screen. Can someone provide a run-down on the process or provide good resources that describe how? Is rendering strings to textures even the best method for displaying text in an Android OpenGL ES app?
...
Based on my reading of Ch. 6 in the Red Book, changing the things that need to be changed for ES, I thought the following code should have done it:
gl.glEnable(GL10.GL_POLYGON_SMOOTH);
gl.glBlendFunc(GL10.GL_SRC_ALPHA_SATURATE, GL10.GL_ONE);
gl.glHint(GL10.GL_POLYGON_SMOOTH_HINT, GL10.GL_NICEST); // no visible diff
gl.glHint(GL10.GL_PER...
I am quite new in 3D programming on iPhone and I would like
to ask for hints about organizing a work between designers
and programmers on that platform. Most of all: what kind of
tools, libraries or plugins cooperate the best on both
sides.
Although I consider the question as looking for general
best-practices advice I would like t...
I'm porting a 2d retro game to iPhone that has the following properties:
targets OpenGL ES 1.1
entire screen is filled with tiles (textured triangle strip
tile textured using a single 256x256 RGBA texture image
the texture is passed to OpenGL once at the start of the game
only 4 displayed colours are used
one of the displayed colours i...
I several views in an iPhone app which happen to use independent openGL contexts. They are not necessarily long-lived so they go away before the process does. And they have a couple textures in each.
Does -releaseing the EAGLContext cause all that GL state to get cleaned up for me? Or am I leaking textures etc by not finding a place to...
I can't find any support for GL_TEXTURE_RECTANGLE_ARB in OpenGL ES. Is there any extension specific for iPhone or iPad which can render arbitrary sprites (non power of two)?
Thanks for help.
...
Is there a way to create a lightning effect on the iPhone using opengl?(like this app)
Right now I have modified the glpaint sample to draw random points around a line (between two points that the user touches) and then connecting them, but the result is a zigzag line that constantly jumps around and lags horribly on the actual device....
I have opengl only view that displays in portrait and landscape mode using projection matrix (view's transformation is identity all the time). I need to show status bar with proper orientation. I do this by setting status bar orientation property in UIApplication and changing frame of opengl view so the view won't go under status bar.
W...
I need stencil buffer on 3GS to render planar shadow, and polygon
offset won't work prefect, still has z-fighting problem. So I use
stencil buffer to make the shadow correct, it works on win32 gles2
emulator, but not on iPhone. After I added a post effect to the whole
scene. The stencil buffer won't work even on win32 gles2 emulator.
An...
I have made a ViewController in XCode for an iPhone project I'm working on, but I have a question about nested ViewControllers and what the best way to access a parents ViewController functions?
Essentially, at the moment I have a SwitchViewController with MenuViewController (nested) and GameViewController (nested, which renders OpenGL ...
When setting the ModelView matrix you normally go through several transformations from the identity matrix. for example:
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
glRotatef(270.0f, 0.0f, 0.0f, 1.0f);
glTranslatef(-rect.size.height / 2, -rect.size.width / 2, 0.0f);
Instead of doing those operations one after the other (assume there...
I've been plowing through basic shaders and whatnot for an application I'm writing, and I've been having trouble figuring out a high-level organization for the drawing calls.
I'm thinking of having a singleton class which implements a number of basic drawing operations, taking data from "user" classes and passing that to the appropriate...
I am trying to modify the GLPaint sample from apple to draw a solid line instead of the transparent neon like line in it. I am trying to achieve the touch paint function to look something like a spray paint effect. I tried disabled the glblend but no effect. And also I am trying to make OpenGL to draw on a background image instead of the...
Hi,
I'm using OpenGL ES in my iPhone application and sometimes during startup the screen goes purple or black - in one case from twenty. This happens only during initialization and if the screen became black or purple it will remain in such a color - only restarting the application helps.
Also I found out that when this bug happens, app...
Hello!
I am trying to use OpenGLES to draw a x by y matrix of squares about an arbitrary point.
I have an array sideVertice[] that holds a series of vertex structs defined as such
typedef struct {
GLfloat x;
GLfloat y;
GLfloat z;
} Vertex3D;
and an element array defined as such
GLubyte elementArray[];
my draw loop is ...
In an .obj, file it is possible to specify 3 values for a vt line.
vt 0.769645 0.729072 0.00000000
The .obj spec says its for "depth". What does this actually do and when is it useful?
...