opengl-es

OpenGL ES 1.1 image rotation from its center

Hi there! I'm trying to rotate a 2D image using OGL ES. After load it I can move it through the screen but when trying to rotate the image through its center, it has an odd behavior as the rotation center is the lower-left screen corner, not the center of the image itself. Googling around I've read that I could push the current matrix,...

android opengl es texture showing

Hi , I am new to the openGl using in Android, pleas give me the code for Only Showing texture image showing in android.(Only Texture) witch options i need to use for that .pleas tell me. Thanks in Advanced. Raj R ...

Best way to suppress OpenGL ES (iPhone) texture / OpenAL sounds memory footprint?

What should i do? I have some 512x512 png. I compressed them to PVR (which results terrible quality), and I'm preparing to compress the PNGs with pngcrush tool. The PVRs have about 2x-x larger filesize than the PNGs, maybe I can experiment with JPG files. Are the images stored in a compressed state in memory? Or compression counts only ...

Are the texture buffers flushed when an OpenGL ES (iPhone) context gets deallocated?

Or I have to glDeleteTextures, glDeleteTextures one by one them? Or is there some kind of glDeleteAllTextures like function? ...

OpenGL rotating problem

Hi! I'm learning Java and OpenGL ES for Android by reading tutorials and applying what I already know. And I have now hit a brick wall when it comes to rotating an object. Rotating a cube by touching the screen is no problem. But if I rotate the cube 180 degrees up or down, then when I now try to rotate the cube left or right it is i...

Is it possible to get a 16-bit depth buffer on the iPhone?

Hi! We're making a game using cocos2d but are having problems with the depth buffer. I'm trying to setup a 16-bit depth buffer on the iPhone but so far I only get 24-bit depth. The reason I want 16-bit depth buffer is: A: I don't need the precision of 24-bit. B: I'm hoping it will be faster. This is how I set the depth format in...

OpenGL ES Tutorial - "symbol in system libraries that is not present on the iPhone"

Hello kind people, I will be very impressed if we manage to solve this. I'm a beginner programmer following the first chapter tutorial in the O'Reilly book "iphone 3D programming". After trying to run the initial practice program I get the following error: Detected an attempt to call a symbol in system libraries that is not present on...

How do I add Apple's iAds to my OpenGL based iPhone app?

I'd like to generate some revenue for my OpenGL based iPhone app w/ Apple's iAds. Everything in the app is done w/ OpenGL including menus, buttons etc. How do I add iAds to my app? More info: I've looked over sample code from Apple and I'm still stuck. Just fyi I currently don't use any view controllers. All I have is a "Window". I...

Is there a lint tool for OpenGL Shading Language?

I've started working with OpenGL and writing shaders. My app checks for errors after loading and compiling shader programs, and if there is a problem it prints out the info log. This is great for catching errors (and I'm a newbie so I'm making a lot), but what I'd really like is to catch these errors at build time. If I had a lint tool ...

iPhone - dragging on UITableView halts rendering of OpenGL in background

I have an OpenGL-based iPad project. In one view I have objects being rendered and floating on the screen. When I add a transparent UIView on top of this view with a transparent table view with custom cells, I can see the table view and the objects still being rendered. Now - when I go to drag on the table view to scroll through elemen...

OpenGL ES (IPhone) alpha blending looks weird.

I'm writing a game for IPhone in Opengl ES, and I'm experiencing a problem with alpha blending: I'm using glBlendFunc(Gl.GL_SRC_ALPHA, Gl.GL_ONE_MINUS_SRC_ALPHA) to achieve alpha blending and trying to compose a scene with several "layers" so I can move them separately instead of having a static image. I created a preview in photoshop a...

How to render a grayscaled texture on Android?

I have a colored texture work as a menu button. Sometimes I want to gray it out when it's disabled. How to do it without creating a new grayscaled texture? Can glBlendFunc do this for me? Thanks in advance. ...

Android JNI OpenGL crashing while used with WebViewClient.

Hello, I'm porting an application from iPhone to Android. This application uses a webpage as a menu, and then switch to an opengl surface for rendering. All is working fine on the iPhone, but on android, it randomly crashes. The OpenGL surface uses JNI for rendering. What I'm doing is I'm adding the WebClientView on top of the Ope...

Android OpenGL - ES alpha transparency different for triangles in triangle strip?

I have a very odd problem, hopefully easily solved. I am drawing a quad as a triangle strip. It simply has 2 triangles in the strip and I apply a texture containing an alpha channel to it. For one of the triangles it seems the alpha is fine and exactly as I want it however for the first triangle it looks as though the alpha is either ...

OpenGL ES 2.0 multiple meshes? (just Real World Examples)

Hi guys! I`m a little confused about this point. Everything that I found in books, blogs, forums and even in OpenGl specs just talk about a very abstract techniques. Nothing about real world examples. And I`m going crazy with this: How to put and manage multiple objects (meshes) with OpenGL ES 2.x? In theory seems simple. You have a ...

How to draw a texture using indices

Hi! I'm drawing a simple cube using 8 vertices and 36 indices. No problem as long as I don't try to texture it. However I want to texture it. Can I do that with only 8 vertices? It seems like I get some strange texture behaviour. Do I need to set up the cube with 24 vertices and 36 indices to be able to texture the cube correctly? ...

How to insert an image inside another image in Open GL ES programming?

Hi, i am learning to program in Open GL ES 1.1 for iphone to make 2D game. In my game I need to put panels in the screen and inside the panels i will put the elements. But to be able to do this, I need to know how to put an image inside another in Open GL ES 1.1. I just know how to put directly in the screen according this tutorial h...

Drawing outside the viewport in OpenGL ES 2.0

Hi there, I was building a 2D project in OpenGL ES 1.1 but decided to switch to 2.0 since I was only going to be developing for the iPad. In 1.1, when a viewport is set up, the notion seems to be that you are viewing only a part of the full 3D space e.g. CGRect rect = view.bounds; glOrthof(-1.0, ...

Multisampling on iPad

Hi, all ! Is it possible to use multisampling on iPad ? Apple's documentation say: "iOS4.0 and later devices", but all tutorials in inet says: "iPhone XX, IPAD" I can't run my app under 3.2 sdk with multisampling (base sdk 4.1, deployment 3.2) Is it possible ? Thanks, ...

rendering a photoshop style brush in openGL

I have lines that are programmatically defined by my program. what I want to do is render a brush stroke along them. the way I think the type of brush I want works is, it simply has a texture, mostly transparent, and what you do is, render this texture centered on EVERY PIXEL in the path, and they blend together to create the stroke. ...