Hi to all,
I am new in OpenGL ES. I earlier developed games in cocoa with objective-c. Now I want to develope 3D game for iPhone by using OpenGL ES. I am at beginner stage. I am able to create triangle, square, cube, pyramid by usng OpenGL ES. But if we have any .png image with us and we have to render it in our game then what we have t...
Hi
I´m trying to make simple game using OpenGLES.
I have two EAGLViews(menu and game view).
Each view has its own viewController. Initializing of the views is done by initWithNIBName method of the viewController.
And when I want to show the view, I simply use addSubview method of the main window.
The game view is initialized only once ...
What's the best choice when trying to mask a texture
like ColorSplash or other apps like iSteam, etc?
I started learning OPENGL ES like... 4 days ago (I'm a total
rookie) and tried the following approach:
1) I created a colored texture2D, a grayscale version of the first
texture and a third texture2D called mask
2) I also created a te...
Hello,
I am currently trying to learn about OpenGL ES for the iPhone and following Simon Maurice's excellent tutorial located here.
The problem I am running into is that in an attempt to personalize the tutorial, I have switched the PNG file from the one included with the tutorial to a custom one. Whenever I do, not only does the bac...
I am looking for a way to convert a .obj file of Lightwave 3D to a .h file for iPhone. I looked around and has seen several scripts that can generate .h files for you, but all of them cannot understand Lightwave 3D .obj format. If anyone appears to know some sort of methods that can translate lightwave 3d .obj files to .h file, please sh...
I am able to draw a sprite on the screen of an iPhone, but when I try to rotate it I am getting some weird results. It seems to be stretching the sprite in the y direction more the closer the sprite gets to pointing down the y-axis (90 and 270 degrees). It displays correctly when pointing down the x and -x axes (0 and 180 degrees). It is...
Hi,
I want to make a 2D tiled background system on the iPhone. Something that takes a tilemap and tileset image(s) and converts it into the full map on the screen.
Just doing some messing around, my first approach was to create a polygon for each tile. This worked fine until I started testing it for 400 polygons or so, then it starte...
I have been trying to perform some OpenGL ES performance optimizations in an attempt to boost the number of triangles per second that I'm able to render in my iPhone application, but I've hit a brick wall. I've tried converting my OpenGL ES data types from fixed to floating point (per Apple's recommendation), interleaving my vertex buff...
I have a UIViewController that instantiates several UIImageViews on the screen. Is it possible to instantiate an EAGLView (like the one in the OpenGL ES template in the iPhone SDK) in a similar manner in my View Controller, and possibly have the UIImageViews as well as an EAGLView all running simultaneously on the same screen?
...
If I have a texture of an irregular shaped object and want to limit drawing of another texture (that is a color image of any kind) only to the shape of the object from the first texture, how can I achieve this effect in OpenGL ES 1.1 ? It's like the shape from the first texture acts like a clipping area.
I've been trying to obtain this ...
When I render to texture, and then draw the same image, it seems to make everything darker. To get this image:
I'm rendering the upper-left square with color (1, 1, 1, .8) to a texture, then rendering that texture, plus the middle square (same color) to another texture, then finally that texture plus the lower-right square (same color...
Hi,
I have some memory which is initialized in initWithCoder:. I can verify that before the "return self" part of initWithCoder the memory is initialized.
I allocate the memory using malloc and fill it using a custom function:
// in initWithCoder:
fontTexCoords = (GLfloat *)malloc(10 * 8 * sizeof(GLfloat));
[fontInfo textureCoordinate...
Hi!
I'm currently developing a small OpenGL game for the Android platform and I wonder if there's an easy way to render text on top of the rendered frame (like a HUD with the player´s score etc). The text would need to use a custom font also.
I've seen an example using a View as an overlay, but I don't know if I want to do that since I...
hi guys.
I am developing GL paint application.
To paint any object, I am using UIView that implemented.
Starting paint method :
- (void)viewDidLoad {
....
[NSThread detachNewThreadSelector:@selector(paintingObjects)
toTarget:self
withObject:nil];
}
- (void)paintingOb...
I am trying to get a UIImage from a texture I loaded into EAGLView using the following way:
//Try to get UIImage from EAGLView and assign to imageDataPhoto1
UIGraphicsBeginImageContext(myEAGLView.bounds.size);
[myEAGLView.layer renderInContext:UIGraphicsGetCurrentContext()];
imageDataPhoto1 = UIGraphicsGetImageFromCurrentImageContext()...
Does anyone know of a way to simply and effectively brighten a UIImage by a specific amount? I am currently fiddling with the Apple Sample Code Example GLImageProcessing with poor results...My app currently does not use OpenGLES or EAGLViews and it is awkward trying to bridge the technology.
...
Hi. In order to cleanly port my game to the iPhone, I'm trying to make a game loop that doesn't use NSTimer.
I noticed in some sample code that, if using NSTimer, you'd set it up at the beginning with something like
self.animationTimer = [NSTimer scheduledTimerWithTimeInterval:animationInterval target:self selector:@selector(drawVi...
I am trying to do an iteration on pixels to change the RGBA values of a UIImage without using OpenGL. I tried testing out iteration performance using the below code but was very displeased. It seemed like I could only get a few thousand iterations per second. And for a UIImage with several hundred thousand pixels, this would take way TOO...
I am trying to get a UIImage from what is displayed in my EAGLView. Any suggestions on how to do this?
...
Hi guys,
I'm quite new to opengl es so I'm wondering if it is possible to use the glDrawElements function to draw two separate squares(I actually want to draw more than two, but for learning I will create only two) ?
the vertex array looks like this:
CGFloat array[] =
{
0.2, 0.4,
0.2, 0.2,
0.4, 0.2,
0.4, 0.4,
0.8, 1.0,
...