opengl-es

Image is not load Texture value is -1

hi i Want to know what is the reason image is not load but a white view is open.When i debug the texture vale and summary value is -1. My Code is: _textures[kTexture_Background] = [[Texture2D alloc] initWithImage: [UIImage imageNamed:@"backgroundimage.png"]]; Thanks ...

How do I free these resources in my iPhone application?

Okay, I have an app that tells me what color of pixel I touched by reading the screen (like a screenshot) after each touch. To retrieve the pixels, I use a method similar to that appearing here. But it seems that after each touch, the image data is still being held on to (and not to mention saving hundreds of unwanted screenshots in my p...

What are some good iPhone 3D / 2D OpenGL ES game tutorials?

So, we just bought the Iphone Development license, but we are looking for some good 3d/2d opengl es game tutorials. Does anyone know any good tutorials for this? Thank You -Techy ...

What are the major differences between making cool stuff with OpenGL ES VS making it with Flash?

I am digging into OpenGL ES on the iPhone, and I have still no big idea about OpenGL ES and Flash. About Flash I only know it is capable of making really nice animations and transitions. For best example, lets look at the Ocarina flute for the iPhone. This application makes some simple but powerful animations. It expands little circles ...

Can I forget all my UIKit and Core Animation knowledge when I decide to do everything in OpenGL ES?

I was reading that OpenGL ES can work together with Core Animation. So I wonder if I can re-use some of my hard-worked knowledge on Core Animation when I start doing OpenGL ES stuff... ...

Cocoa Touch Programming. KVO/KVC in the inner loop is super slow. How do I speed things up?

Hello, I've become a huge fan of KVO/KVC. I love the way it keeps my MVC architecture clean. However I am not in love with the huge performance hit I incur when I use KVO within the inner rendering loop of the 3D rendering app I'm designing where messages will fire at 60 times per second for each object under observation - potentially h...

Can I work with M3G on iPhone OS?

I've been reading that M3G is something based on OpenGL ES...so can I work with this on iPhone OS? Did anyone do that already? ...

Can I still do object oriented programming when using OpenGL ES on iPhone OS?

When I program with OpenGL ES on iPhone OS, I have to use a lot of OpenGL functions. This looks very procedural to me. I wonder if I could make a class called "cube", which will draw an cube if called. Or must all the application code be in one huge scope? ...

What's the preferred vertex data format for OpenGL ES on iPhone OS?

In the book "Mobile 3D Graphics with OpenGL ES and M3G" the authors say that choosing the correct vertex data format will have huge impact on performance. They recommend GL_SHORT for most vertex data. Does this also apply for iPhone OS? ...

Is there an API for drawing statistics in OpenGL ES on iPhone OS?

If I wanted to draw pie charts and other nice stuff, are there libraries or API's for doing this? ...

Is it possible / performant to switch between an OpenGL ES view and UIView in one application?

Imagine an iPhone app, which starts with an standard UIView showing some buttons and stuff. Then there is a stats button, you tap it, and the UIView slides away. Instead an OpenGL ES view comes in, and shows a nice statistics curve. I know you can mix OpenGL ES with UIView somehow but people say it's a bad idea. Does this also apply if...

glTexCoordPointer problems using OpenGL ES

I have some problems mapping a texture to a triangle strip. I think I still don't fully understand the texture coordinates. I have a 512x512 texture, and I'm trying to map the 320x64 part of it on a triangle strip. Here is my code: static const Vertex3D bg_vertex [] = { { 0, 0, 0}, { 0, 64, 0}, { 64, 0, 0},...

Problem using PVRTC textures

I am trying to use PVRTC images instead of PNG's. The problem is, that I am not able to map see them. Here is my code: glGenTextures(1, &bg1Texture); glBindTexture(GL_TEXTURE_2D, bg1Texture); glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR); glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR); NSString *path...

OpenGL vs OpenGL ES 2.0 - Can an OpenGL Application Be Easily Ported?

I am working on a gaming framework of sorts, and am a newcomer to OpenGL. Most books seem to not give a terribly clear answer to this question, and I want to develop on my desktop using OpenGL, but execute the code in an OpenGL ES 2.0 environment. My question is twofold then: If I target my framework for OpenGL on the desktop, will i...

PVR compression on iPhone - any tips for 2D sprites?

Hi, I'm making a 2d game and am using 64x64 textures to draw my characters. It basically looks like super mario brothers, each character has about 10 frames that make up their entire animation sequence. The pvr tool sounded promising, it crushed my images down to 4kb each which was great. However the quality is very poor. I don't think...

OpenGL ES depth buffer

Hi! I was wondering if I can deallocate the depth buffer in iPhone OpenGL ES to conserve memory? Or it stays until the application finishes? I only need the depth testing in the beginning of the application. ...

OpenGL Layer on top of Video on iPhone?

Hi there. I am trying to display a fullscreen video on the iPhone and overlay it with an OpenGL ES view. So basically, I want a video playing in the background, while there are OpenGL graphics being drawn on top of it. How do I achieve this and is it even possible? Thanks for your help! Florian ...

OpenGL Beginner Tutorials

I would like to being OpenGL programming for mobile phones such as iPhone, Java ME and Android. Are there any good beginner tutorials to start with? ...

How do I use compressed textures on iPhone?

Are there any tutorials that can teach me how to use mipmapping in my program? I already know how to generate mipmaps, but i want to find out how to read, load and use the pvr file in my program. ...

OpenGLES texture disappears

Hi, I have a little trouble switching OpenGLES views(EAGLViews). When i add an subview to EAGLView, texture that is shown in the view dissapear. I don't know why. I'm using code from tutorials for loading textures. I have a view, there I'm displaying texture, then I add subview to this view by calling addSubview method. And then, when ...