opengl

Iphone app PNG sequence animation - How to use OPENgle optimally without crashing

hello everyone. i am making an animation in opegle with pngs and considering to use the highest qaulity compression and not use pvr conversion. Does anyone know the maximum amount of frames you can do before the processor starts getting chuggy? and i have a series of frames i would also note that my png sequence is roughly 75 frames a...

Which is a better option, OpenGL or a game engine for developing a game for the iphone or ipod touch?

I am new to OpenGL ES, and I'm about to begin a 3D game for the iphone in which we are showing some car pursuit or racing. Is it possible just with the OpenGL ES or UIKit only, or do I have to use other tools for it? I am comfortable with UIKit but newer to OpenGL/OpenGL ES; which would be better to start this game? Or should I use a ga...

How to Implement an OpenGL Zoom Extents Function

I have an OpenGL application which implements navigation functions such as Orbit, Walk, Pan, Rotate, etc. for navigating a 3D environment. All this works flawlessly and is fairly straighforward to set up using gluPerspective and gluLookAt. glMatrixMode GL_PROJECTION glLoadIdentity gluPerspective m_ViewAngle, m_AspectRatio, m_Clip...

Spy++-like tool for OpenGL render trees

Hi, is anybody here aware of a Spy++-like tool which lets me visualize the object tree of graphical elements in an OpenGL scene? If possible (Spy++ lets you do this), it would be great if the tool didn't require support being built into the application. I'm not too familiar with OpenGL yet, but maybe what I'm after is a view on the tre...

Depth Buffer in OpenGL

I am trying to draw a series of rectangles using OpenGL but some of the ones that should appear below a rectangle appear above it. To enable the depth function I am using glClearDepth(1.0f); glDepthFunc(GL_LESS); glEnable(GL_DEPTH_TEST); I am using gluLookAt at the begining of each draw. Here is an image of the problem. The blue re...

How can I draw a half torus?

I am teaching myself OpenGL game programming from tutorials on the net. I want to draw a half torus, such that it can look like a gateway. How can I do this, does any one know the math involved? most tutorials online show how to draw a full torus. ...

Z-Depth Testing in OpenGL

Hello, first time here. Sitting down today and teaching myself OpenGL. But I have run into a question I can't seem to find the answer to. I'm wondering why depth testing seems to be incompatible with semi-transparent objects in OpenGL. The documentation seems to suggest that you must turn off depth-testing, then draw objects in revers...

What is a dependent texture read?

I've been reading papers on computer graphics, and every so often I come across the term "dependent texture read" or "dependent texture fetch" used in the context of querying textures in shader code. What is a dependent texture read, and what is the difference between this and a "normal" texture read? ...

glGenTextures speed and memory concerns

I am learning OpenGL and recently discovered about glGenTextures. Although several sites explain what it does, I feel forced to wonder how it behaves in terms of speed and, particularly, memory. Exactly what should I consider when calling glGenTextures? Should I consider unloading and reloading textures for better speed? How many textur...

glUseProgram(0) takes 50ms?

Are there any reasons a call to disable a glsl program should take 50ms? I did a glFlush before, so it can't be the pipeline being flushed before a program change. Enabling the shader takes 0.03ms. ...

true isometric projection with opengl

Hello, I am a newbie in OpenGL programming with C++ and not very good at mathematics. Is there a simple way to have isometric projection? I mean the true isometric projection, not the general orthogonal projection. (Isometric projection happens only when projections of unit X, Y and Z vectors are equally long and angles between them a...

position spheres along a bezier curve

I am trying a couple of tutorials from http://nehe.gamedev.net, in order to learn openGL programming, I would like to position spheres along a Bezier curve such that they appear as a string of pearls. how can I position such spheres along the curve. I am drawing the curve using de Casteljau's algorithm and hence can get the XYZ points on...

OpenGL background dissappears with certain Polygon Modes

I am creating a simple gradient background by drawing a quad as follows: glMatrixMode GL.GL_PROJECTION glLoadIdentity glMatrixMode GL.GL_MODELVIEW glLoadIdentity ***glPolygonMode GL_FRONT_AND_BACK, GL_LINE*** glDisable glcDepthTest glBegin bmQuads glColor4d 1, 0, 0, 1 glVertex2i -1, -1 glVertex2i 1, -1 ...

OpenGL raster text disappears behind background

I am drawing a quad as a background so I can apply a gradient. Details of how I'm doing this are found in a similar question: http://stackoverflow.com/questions/1064840 The 2D raster text (screen text) is drawn as expected without the gradient background. However, when the gradient background is drawn, the text disappears (I'm assumi...

Framebuffers, textures and glColor behavior in OpenGL/OpenGL ES.

I apologize in advance if this question seems confused. The behaviour I am seeing makes no sense to me. I have a Framebuffer rendering to a texture. I render solid rectangles of red, green, blue of varying opacity to this texture. I then render the texture to the screen (Framebuffer 0). The Framebuffer attached to the texture is persist...

What controls the behavior of OpenGL when drawing triangle strips?

So I do know how to draw multiple triangles using glBegin(GL_TRIANGLE_STRIPS). What I want to understand is how OpenGL decides which vertex (out of the first three provided) to use as the starting vertex for all remaining triangles to be drawn? And is there a way to make it select a different starting vertex? ...

How do I separate the colour and alpha blend functions in opengl?

In the process of trying to port my 2D shadow rendering technique from Directx to Opengl, I've run across a problem where I can't seem to get fine enough access to the opengl blender. But first, so that the following makes sense, my algorithm: I sort and render all sprites from back to front without using a depth buffer. Shadow sprit...

Creating the links of a chain in OpenGL

I am working on a project where I have to create a chain with 12 links in it. I want to create the chain out of two curved segments for the top and bottom of the link ad two cylinders for the straight segments, I intend to use a display list to create one link and then display it over and over after applying some rotation transformation...

How to display a raw YUV frame in a Cocoa OpenGL program

Hello everyone, I have been assigned wit the task to write a program that takes a sample raw YUV file and display it in a Cocoa OpenGL program. I am an intern at my job and I have little or no clue how to start. I have been reading wikipedia & articles on YUV, but I couldn't find any good source code on how to open a raw YUV file, ext...

Other's library #define naming conflict

Hard to come up with a proper title for this problem. Anyway... I'm currently working on a GUI for my games in SDL. I've finished the software drawing and was on my way to start on the OpenGL part of it when a weird error came up. I included the "SDL/SDL_opengl.h" header and compile. It throws "error C2039: 'DrawTextW' : is not a member...