opengl-es

Can't draw OpenGL ES textures to non-round locations

When drawing OpenGL ES textures, they seem to "snap" to round pixel locations, as though the draw location was being rounded. ie. drawing at (x:1.1, y:5.4) actually draws at (x:1, y:5). This causes the textures to appear to "jump" when scrolling, rather than move smoothly. Yes, I'm using floating point types for my vertices, etc. D...

Speeding up full screen image drawing on iPhone 3G

Hello all. I am developing an app which plays interactive real time streaming video. I use FFMPEG (don't worry, I'll be releasing my source code) to decode a MPEG2/H264 RTP stream. I simply cannot get the iPhone 3G to draw a screen full of pixels faster than 5 times per second. I've tried a OpenGL texture which was just a slow. I've...

How do you represent a normal or texture coordinate using GLshorts?

A lot of suggestions on improving the performance in iPhone games revolve around sending less data to the GPU. The obvious suggestion is to use GLshorts instead of GLfloat wherever possible, such as for vertices, normals, or texture coordinates. What are the specifics when using a GLshort for a normal or a texture coordinate? Is it poss...

iPod/iPhone OpenGL ES UIView flashes when updating

I have a simple iPhone application which uses OpenGL ES (v1) to draw a line based on the touches of the user. In the XCode Simulator, the code works perfectly. However, when I install the app onto an iPod or iPhone, the OpenGL ES view "flashes" when drawing the line. If I disable the line drawing, the flash disappears. By "flash", I ...

Debugging a basic OpenGL texture fail? (iphone)

Hey all, I have a very basic texture map problem in GL on iPhone, and I'm wondering what strategies there are for debugging this kind of thing. (Frankly, just staring at state machine calls and wondering if any of them is wrong or misordered is no way to live-- are there tools for this?) I have a 512x512 PNG file that I'm loading up f...

Background problem of opengl 3d object over iphone camera view

Hi, I'm loading opengl 3d objects over the iphone camera view. When opengl view is loaded it's loading with a opengl 3d object with black background. The black background color will block the camera view.I just want to clear background color of opengl view so that I could load only the 3d object to the camera view. I had tried glclearco...

draw an uiimage with in the user specified coordinates

i am new to this core graphics or cv . I need a little help here. Can you plz guide me how to draw an image using openGL ES with my own cordinates or any other idea... consider my points are topleft (40,160) topRight(80,160) bottomLeft(0,40) bottomRight(160,40) i want my image to be drawn with in these points..... Plz help me... i w...

When do I synchronize methods or use synchronized blocks in my methods in an Android game?

I'm looking into writing simple graphics code in Android and I've noticed some synchronized() blocks. What is the reasoning behind this and how do I know when I should be "synchronizing" my code? ...

OpenGL ES 1.1 vs 2.0 for 2D Graphics, with rotated sprites?

I am having trouble finding information related to which i should choose, OpenGL ES 1.1 or 2.0 for 2D graphics. OpenGL ES 1.1 on Android is a bit limited to my knowledge, and based purely on sprite count the only useful renderer is draw_texture() (as far as i know). However, that does not have rotation and rotation is very important to ...

Recording custom overlay on iPhone

Hi all, I'm interested in recording a video with a custom overlay which would end up in the video itself. They could be UIImage or even better, an OpenGL viewport, is there even such possibility right now on any iPhone devices/SDK ? Thanks ...

Better way to generate tiles

Hi ! I'll start by saying that i'm REALLY new to OpenGL ES (I started yesterday =), but I do have some Java and other languages experience. I've looked a lot of tutorials, of course Nehe's ones and my work is mainly based on that. As a test, I started creating a "tile generator" in order to create a small Zelda-like game (just moving...

Bitmapfontatlas cocos2d performance issue

This question was also asked in the cocos2d forums but they are a little slower than here. Hi, Im trying to resolve a performance issue in my game. I have all of my game images on the one spritesheet. I now have a score label for which i have generated a font file with the Hiero tool. Ideally I'd like to update my score label with th...

Transform OpenGL ES coordinates to lower UIView coordinates

Hi, I am new to OpenGL over iPhone. I am developing an iPhone app similar to a barcode reader but with an extra OpenGL layer. The bottommost layer is UIImagePickerController, then I use UIView on top and draw a rectangle at certain co-ordinates on the iphone screen. So far everything is OK. Then I am trying to draw an OpenGL 3-D model i...

problem while displayin the texture image on view that works fine on iphone simulator but not on device

hello i am trying to display an image on iphone by converting it into texture and then displaying it on the UIView. here is the code to load an image from an UIImage object - (void)loadImage:(UIImage *)image mipmap:(BOOL)mipmap texture:(uint32_t)texture { int width, height; CGImageRef cgImage; GLubyte *data; CGContextRef cgContex...

iPhone - OpenGL using C++ tutorial/snippet

Is there any good tutorial or code snippet out there on how to use OpenGL via C/C++ on the iPhone? ...

Simple 2D tile not rendering on Android...

I'm putting together a simple test made up of two tutorials available online for OpenGL ES on Android. This is really just so that I can learn about the basics of OpenGL ES to better understand how I have to design my program. Right now, when it tries to render, the mouse movement effect works, but I get no square drawn on the screen. ...

What are some techniques to create scrollable areas?

I'm getting started with OpenGL ES on Android and I'd looking to learn some techniques to have a game map larger than the visible area. I'm assuming I've somehow got to ensure that the system isn't rendering the entire scene, including what's outside of the visible area. I'm just not sure how I'd go about designing this! This is for s...

Mysterious Flickering Visual Artifact

A flashing bar of red appears at the top of the EAGLView that I have added as a subview in my iPhone app. It flickers on and off (i.e., one frame it's there, the next frame it's not, the next frame it's there again). I have removed a lot of code from my app until I'm essentially left with the stock OpenGL-ES project and a few changes: ...

Any GUI libaray for iPhone & Android based on OpenGL ES?

Since both iPhone and Android support OpenGL ES, is there any open source or commercial GUI library we can use for these two platforms? Or is it doable (or how difficult) to port an application from one to another platform? As I know, for iPhone only, libNUI (http://www.libnui.net) is a good choice (dynamic layout & mature), but it only...

OpenGL|ES on a desktop PC.

I'm working on a OpenGL project that I would like to port to embedded systems that support OpenGL|ES. Since OpenGL|ES is a subset of OpenGL how hard would it be to compile my OpenGL application on an embedded system? (Assuming that my OpenGL code is in the limits of OpenGL|ES) I guess what I'm wondering is: is it possible to dircetly w...