opengl

OpenGL: projecting mouse click onto geometry

I have this view set: glMatrixMode(GL_MODELVIEW); //Switch to the drawing perspective glLoadIdentity(); //Reset the drawing perspective and I get a screen position (sx, sy) from a mouse click. Given a value of z, how can I calculate x and y in 3d-space from sx and sy? ...

Best OpenGL wrapper for Mono and .Net?

This is a follow up to another question. What is the best OpenGL wrapper usable both under Linux and Windows, with Mono (or .Net)? I have already evaluated Tao Framework, but I am unimpressed by how the APIs are put together. Any other better options? ...

How do I get the current size of a matrix stack in OpenGL?

How do I get the current size of a matrix stack (GL_MODELVIEW, GL_PROJECTION, GL_TEXTURE) in OpenGL? I want this so that I can do some error checking to ensure that in certain parts of the code I can check that the matrix stacks have been left in the original condition. ...

OpenGL still better than Direct3D for non-games ?

The standard model has been that OpenGL is for professional apps (CAD) and Direct3D is for games. With the debacle of openGL 3.0, is openGl still the natural choice for technical 3D apps (cad/GIS)? Are there scenegraph libraries for Direct3D? (Of course Direct3D is windows only.) ...

How to write an installer that checks for openGL support?

We have a 3D viewer that uses OpenGL, but our clients sometimes complain about it "not working". We suspect that most of these issues stem from them trying to use, what is in effect a modern 3d realtime game, on a businiss laptop computer. How can we, in the windows msi installer we use, check for support for openGL? And as a side note...

How do you render primitives as wireframes in OpenGL?

How do you render primitives as wireframes in OpenGL? ...

Tweak the brightness/gamma of the whole scene in OpenGL

Does anyone know how I can achieve the following effect in OpenGL: Change the brightness of the rendered scene Or implementing a Gamma setting in OpenGL I have tried by changing the ambient parameter of the light and the type of light (directional and omnidirectional) but the result was not uniform. TIA. Thanks for your help, some a...

OpenGL: How to do RGBA->RGBA blitting without changing destination alpha

I have an OpenGL RGBA texture and I blit another RGBA texture onto it using a framebuffer object. The problem is that if I use the usual blend functions with glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA), the resulting blit causes the destination texture alpha to change, making it slightly transparent for places where alpha previou...

where can i download opengl for windows vista

I've been searching and can't find the download files on opengl.org. can someone please point me to the right direction? ...

Capturing video out of an OpenGL window in Windows

I am supposed to provide my users a really simple way of capturing video clips out of my OpenGL application's main window. I am thinking of adding buttons and/or keyboard shortcuts for starting and stopping the capture; when starting, I could ask for a filename and other options, if any. It has to run in Windows (XP/Vista), but I also wo...

Starting Graphics & Games Programming (Java and maybe C++)

I've always had an interest in creating my own games, and now at university I have the opportunity to create some 2D and 3D games using Java and C++ for those who are that way inclined. I've never really programmed a game before, let alone graphics, so I'm completely new to the area. After a quick trip to the library today I came across...

CoreImage for Win32

For those not familiar with Core Image, here's a good description of it: http://developer.apple.com/macosx/coreimage.html Is there something equivalent to Apple's CoreImage/CoreVideo for Windows? I looked around and found the DirectX/Direct3D stuff, which has all the underlying pieces, but there doesn't appear to be any high level API t...

Best way to render hand-drawn figures

I guess I'll illustrate with an example: In this game you are able to draw 2D shapes using the mouse and what you draw is rendered to the screen in real-time. I want to know what the best ways are to render this type of drawing using hardware acceleration (OpenGL). I had two ideas: Create a screen-size texture when drawing is started, ...

What's the best way to create a "magnifying glass" on a 2D scene?

I'm working on a game where I need to let the player look at a plane (e.g., a wall) through a lens (e.g., a magnifying glass). The game is to run on the iPhone, so my choices are Core Animation or OpenGL ES. My first idea (that I have not yet tried) is to do this using Core Animation. Create the wall and objects on it using CALayers....

What are some best practices for OpenGL coding (esp. w.r.t. object orientation)?

This semester, I took a course in computer graphics at my University. At the moment, we're starting to get into some of the more advanced stuff like heightmaps, averaging normals, tesselation etc. I come from an object-oriented background, so I'm trying to put everything we do into reusable classes. I've had good success creating a came...

Where can I find sample uses of LWJGL?

I have seen the official demos on lwjgl.org but I would like to see some more tutorial level examples. ...

What ways are there of drawing 3D trees using Java and OpenGL?

I know how to draw basic objects using JOGL or LWJGL to connect to OpenGL. What I would like is something that can generate some kind of geometry for trees, similar to what SpeedTree is famous for. Obviously I don't expect the same quality as SpeedTree. I want the trees to not look repetitive. Speed is not a concern, I do not expect to ...

Learning game programming

Quick question: I've been in the web-dev world for several years now, I've wrapped my head around Java, Python, PHP, C# and Ruby- and currently make my living as a C#.NET programmer and I want to learn game development for real, no "build your own 2d sprite game over 14 days"-bs, the real deal. Where do I start? learning C? learning C++?...

Texture Sampling in Open GL

i need to get the color at a particular coordinate from a texture. There are 2 ways i can do this, by getting and looking at the raw png data, or by sampling my generated opengl texture. Is it possible to sample an opengl texture to get the color (RGBA) at a given UV or XY coord? If so, how? ...

GLUT: any way to add a "file readable" hook to the event loop?

I'd like to open a socket and hang a readable event on the GLUT event loop... any ideas on how to do this? Portable standard GLUT code is best, but I'm open to platform-specific hacks as well. Thanks! ...