opengl

OpenGL text position under Windows

Hello all, I am developing an OpenGL application that has two working modes: windowed mode and full screen. The app displays several graphic objects using OpenGL and writes some text strings using that same API. The program displays the texts strings in its intended positions when running as a windowed application, but when running full...

OpenGL versions and gpus - what kind of compatibility is there?

I'm trying to understand how graphics card versions, OpenGL versions and the API headers work together. I've read up on the OpenGL 2.0/3.0/3.1 debacle on the OpenGL forums and elsewhere but it's still not clear how this will work out for me as a developer (new to OpenGL). (btw I'm using nVidia in this question as an example because I'm b...

OpenGL GL_DEPTH_TEST not working

Hi there. I just ported a .obj loader to objective-C and so far, it works, I can get my vertices and normals and stuff. Every normal is good, pointing in the right direction, all my faces are in CCW winding, but I have some issues with the depth test. float rotX = 0; float rotY = 0; objModel* o = [[objModel alloc] initWithPath:@"/model...

Is glCallLists more efficient than calling the display lists one at a time?

glCallLists() is a convenient function for rendering a series of display lists, especially for things like text rendering. I'm curious -- is it actually more efficient to call glCallLists(), or is it merely a convenience function? For example, which of these two snippets is likely to be faster? const char *str = "this is a test"; // s...

A problem in the field of blend of openGL

I draw an image as a back on the screen first, then draw a mask for a picture like this: it is a circle with a white color in the middle, and all of the left is black. I use glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); to make it display only the white circle on the back image. Then i need to draw another image on the same position...

online openGl tutorials

Whenever I do a search for openGl tutorials I always land on the Nehe tutorials. However those cover the immediate mode stuff and are outdated. Does anyone know of opengl tutorials covering the latest 3.1 enhancements? ...

Capturing EAGLview content WITH alpha channel on iPhone

Hello, have been struggling with this issue for quite some time now and couldn't find an answer so far. Basically, what I want to do, is capturing the content of my EAGLview and then use it to merge it with other images. Anyway, the mainproblem is, that everything transparent in my EAGLview renders opaque when saving it to the photoalbu...

Ocaml OpenGL example from wikipedia fails to compile

I am trying to get started with some basic Ocaml programming. To start I wanted to get the OpenGL example from wikipedia running. http://en.wikipedia.org/wiki/Ocaml let _ = ignore( Glut.init Sys.argv ); Glut.initDisplayMode ~double_buffer:true (); ignore (Glut.createWindow ~title:"OpenGL Demo"); let angle t = 10. *. t...

C#: Creating a graphical screensaver

I am thinking about creating a screen saver. I have the whole thing, its graphics and the back-end kind of ready in my head. But I am not quite sure how to get the graphics out in code. What I would like is a slide show of images with a bit of movement (kind of like the slide show in media center) and some floating text and shapes on to...

Easy-to-use GUI that is zoomable and pannable?

Hello: I am looking for a GUI toolkit that is easy to use and cross-platform. Another major requirement of the GUI is that it should support zoom and pan. For example, I should be able to zoom in on a picture and enlarge buttons. Something like this: http://eaglemode.sourceforge.net/video.html But it should have Windows support also...

Calculate forces on a box

Story: I am developing a construction tool for wooden boxes. A box consists of a set of boards, each board is represented as 3 3D-vectors, and one placement vector. Each box is visualized using OpenGL. Now, these boxes will be moved around with forklifts, which will apply some forces on them. I would like to calculate the forces on each...

OpenGL and Direct3D

What is the difference between OpenGL and Direct3D? Are they truly different implementations to accomplish the same things (like Java and Mirosoft's CLR [.NET])? ...

OpenGL: Combining glBlendFunc with glAccum

Hi, I've been working on a graphics project doing Depth of Field. The method is doing several passes, each rendering the scene with different near and far clipping-parameters, such that it renders different depth ranges at each pass. The idea is to apply a blur kernel on each individual layer by rendering to a texture and doing the blu...

OpenGL Rotation Matrices And ArcBall

I have been tasked with creating a OpenGL scene implementing ideas such as simple movement, and an Arcball interface. The problem I am having is dealing with the rotation matrix which NeHe's Arcball class (http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=48) computes. What I have so far is a very simple solar system (just the ear...

OpenGL: Fastest way to draw a mixture of triangles and quads?

I have a mesh data structure with polygons that can be either triangles and quads. What is the fastest way to draw this using OpenGL? The slow way is to iterate over the structure and for each polygon to make the appropriate glBegin() .. glEnd() with either GL_QUADS or GL_TRIANGLES. I would like to avoid having to do glBegin() .. glEn...

Lighting issue in OpenGL

Hello, I have trouble developing an OpenGL application. The weird thing is that me and a friend of mine are developing a 3d scene with OpenGL under Linux, and there is some code on the repository, but if we both checkout the same latest version, that means, the SAME code this happens: On his computer after he compiles he can see the ful...

How to use opengl to create cylinder effect

Hi, i am new to opengl, I would like to know how to create 'cylinder effect', like the top site feature in safari 4, here is a picture http://www.macworld.com/article/139022/2009/02/safari4firstlook.html Can you please tell me what should i learn , how to get started? ...

Touch Events and OpenGL Drawing. Do they occur on separate threads?

It appears that touch events are happening on a different thread then OpenGL rendering. Is this the case? The context for this question is a particle system I am building that uses touch events to trigger OpenGL drawing. Since OpenGL drawing is rather heavyweight I am concerned about threading implications. Any insight would be much app...

using wxWidgets in a GLUT/other application

I'm basicly looking to get a native-like window GUI system into my OpenGL/Game. I need to display a single window to the user. I'm looking into wxWidgets. Because it works by "stealing" the WinMain/MainLoop, I'm trying to hack it so I can run its main loop on a separate thread. Because I couldn't get its wxThread working well, I've do...

About open GL coordinates...

OK guys, I have a question about openGL ES 1.1 on iPhone. I have a game I'm making and I'm used to the origin being at the upper left hand corner. This is a 2d game, so i'm using glOrtho(). How would I translate openGL so that I can use the upper left hand corner as the origin. Would I use glViewport()? ...