opengl

Big loading times in iphone app

I'm making an openGL game for iPod/iPhone. At start I load at once all the textures I need. At first loading times where small, but as I kept developing and adding new textures the loading times have been increasing, to the point of taking many seconds before the game start. Recently a new problem appeared, when I build the game in the...

Can Flex wrap Java applets?

I'm just learning about Flex and I'm loving it. Unfortunatly I still have to make the decision on which RIA technology to use and its dependent on, among other things, from the following case: How can we wrap a java applet around a Flex application? More specifically, I would like to wrap/integrate NASA's World Wind applet in a Flex pan...

OpenGL linestrip boundaries

Hi, I have a network of polylines, and I'd like to display all parts of the lines that are inside a certain X-Y box. I'm currently rendering the lines in OpenGL using a GL_LINE_STRIP and it works well. However, if the boundary of the X-Y box crosses through one of the lines (between vertices), is there a good way to just display the part...

Sharing a texture between direct3d and opengl?

I know mixing OpenGL and DirectX is not recommended but I'm trying to build a bridge between two different applications that use separate graphics API:s and I'm hoping there is a technique for sharing data, specifically textures. I have a texture that is created in Direct3D like this: d3_device-> CreateTexture(width, height, 1, D3DUS...

Help loading textures in PVRTC format for the iphone.

I'm programming a small app with opengl for the iphone, and now I want to load textures in the PVRTC format. Is this complicated ?. Right now all my textures are in .png format, and I'm using this method for loading them: - (void)loadTexture:(NSString*)nombre { CGImageRef textureImage = [UIImage imageNamed:nombre].CGImage; if (...

c++ OpenGL coordinate transformation

Hi I just don't seem to be able to figure this out in my head. I'm trying to move an object in 3D space. If I have a point at 5,15,5 and use opengl functions to change the model view.... glTranslatef( 10.0f, 4.0f, 4.0f ); glRotatef( 33.0f, 1.0f, 0.0f, 0.0f ); glTranslatef( 10.0f, 4.0f, 4.0f ); Is there a way I can find out where tha...

GLFW window fails to open (Ubuntu)

When compiling and running my GLFW-based C program under Ubuntu (9.04), it fails when trying to open the window (it compiles fine, having installed the latest GLFW). I've tried varying resolutions, going as low as 300x300, and left the bit depths to zeros, hoping a default will catch on. The relevant piece of code reads (directly snippe...

Does anyone know if there is a performance benefit to fullscreen opengl vs windowed opengl in OSX?

The client for the MMO I work on uses two contexts, one for a window view and one fullscreen. I'm wondering if I just use a window sized to the display I can simply resize it if the user wants a smaller window so they can access their desktop. Is their a performance penalty for running opengl in a window vs fullscreen assuming the same ...

OpenGL Font Lib

I find a simple (and portable) lib for integrate in a my OpenGL based game. more simple and little of FreeType? thanks ...

SDL GL program terminates immediately

I'm using Dev-C++ 4.9.9.2 (don't ask why) and SDL 1.2.8. Next I've created new project: SDL&GL. This project contains already some code: #include <SDL/SDL.h> #include <gl/gl.h> int main(int argc, char *argv[]){ SDL_Event event; float theta = 0.0f; SDL_Init(SDL_INIT_VIDEO); SDL_SetVideoMode(600, 300, 0, SDL_OPENGL | SD...

OpenGL ES on Iphone: simple 2D animation (interpolation/tween)

Hi everyone, I'm working on an app that basically revolves around 2D shapes (mostly simple polygons) being dynamically drawn and animated. I'm looking for a way to easily time my animations. It's basically just moving a vertex to a specified point in a specified time, so just interpolating floats, with all the usual easing parameters. ...

Cross-platform, open-source development framework that needs 3d graphics

I'm thinking of developing a game-like piece of software. It will probably require a bit of OpenGL, MIDI input, and math. I'd like to eventually sell the software, so it needs to be installable on PCs with different OSes. And I don't want to have to spend a lot of time on memory management and other low-level details. My question is ...

How to get OpenGL to display NV12 texture in Cocoa

I have a YUV:420 (aka NV12) frame data, how can I get OpenGL to recognize its format for glTexImage2D() rendering. I realize that I might have to perform colorspace transformation, but is there a way that I can tell openGl to command the graphic hardware to perform the colorspace transformation? ...

Can I use a vertex shader to display a models normals?

I'm currently using a VBO for the texture coordinates, normals and the vertices of a (3DS) model I'm drawing with "glDrawArrays(GL_TRIANGLES, ...);". For debugging I want to (temporarily) show the normals when drawing my model. Do I have to use immediate mode to draw each line from vert to vert+normal -OR- stuff another VBO with vert and...

How do I give GLUT cubes different colors?

Just what it says: I have some code that's drawing GLUT cubes, but they're all grey. How do I make them different colors? Everything I've tried so far has failed. I think my problem is that I'm trying to use OpenGL functions to change their colors, but GLUT is maintaining it's own internal color or material data and I don't know how ...

How can I get an OpenGl texture of a polygon shape from an image?

I have an image and a convex polygon defined by an array of x,y coordinates. How would I go about getting a Texture2D representation of the part of the image encompassed by the polygon? Basically I just need a texture from the image with the part outside the polygon made transparent. If the resultant texture were also clipped to the...

OpenGL alpha transparency

Hey everyone, I am starting to use opengl and I wanted to try alpha transparency. Here's my code: void display(void); int main(int argc, char** argv) { glutInit(&argc, argv); glutInitDisplayMode(GLUT_SINGLE|GLUT_RGBA); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glEnable( GL_BLEND ); glutInitWindowSize(600,...

Writing a portable Java application using JOGL and Android OpenGL

I plan on writing a Java 3D game that will work both on PC and Android. Unfortunately it looks like there is no common OpenGL API for both platforms. Do the APIs differ significantly? Is there a way I could use the same 3D code in both versions? Is it a good idea? ...

inverse FFT in shader language?

Hi, does anyone know an implementation of the inverse FFT in HLSL/GLSL/cg ... ? It would save me much work. Best, heinrich ...

Project a grid in screenspace on the world xz plane.

Hi, I want to project a grid on the xz-plane like shown here: http://habibs.files.wordpress.com/2009/07/2-1.jpg To do that, I created a vertex grid with x and z range [-1|1]. In the shader I multiply the xz screen coordinate of a vertex with the inverse of the View-Projection matrix. Then I want to adjust the height, depending on the n...