opengl

How to generate Winamp-Style visualization effects with openGL? (Milkdrop, etc)

I'm trying to create an animated ambient abstract background for my game. I'm picturing something very similar to what Winamp has when you turn on it's visualization plug-in. Here's a link to some screenshots. I can handle tweaking the idea once I get something up and running that is acting generally how I want it, but I just have n...

Yellow Triangle that should be 3 colours OpenGL

This is probably a silly mistake but I cant see it?! I have classes defining geometry and classes that render that geometry. Right now it is basic triangles and colours for each vertex. Here is the code defining said geometry objects data: CGeometry* g = new CGeometry(); g->vertexes = new double[3*3]; g->vertexes[0] = 0; g->vertexes[...

What's the difference between these matrix modes?

GL_PROJECTION and GL_MODELVIEW. I know there are others, but I, conceptually, can't figure out what the difference between any of them are. When you load the identity matrix after setting the mode, how is the identity matrix any different based on the mode? ...

OpenGL rendering in Windows XP with multiple video cards

I'm developing an OpenGL application for Windows XP. The target machine has 2 NVIDIA GeForce 9800GT video cards, which are needed because the application needs to have output 2 streams of analog video. The application itself has two OpenGL windows, one for each video card. Each video card is connected to one monitor. As for the code, it...

How to bind a PImage to a texture in Processing using jogl (straight OpenGL)

If you've loaded an image into a PImage in Processing, what's the best way to bind it to a texture using OpenGL calls? I'm not using any of the Processing rendering stuff. ...

writing arabic text in opengl

I want to write arabic text in my opengl program using freetype 2 how I can do it any one can send me asource code or show me the way or even any modification on nehe lesson 43 to write arabic in opengl which explain using freetype to display the arabic text ...

OpenGL in C++ - Crashes at runtime

Hi, I'm working on some OpenGL in C++ in Visual Studio 2005. // SetUpOpenGL sets the pixel format and a rendering // context then returns the RC HGLRC COpenGLBaseWnd::SetUpOpenGL(HWND hwnd) { static PIXELFORMATDESCRIPTOR pfd = { sizeof (PIXELFORMATDESCRIPTOR), // strcut size 1, /...

Some faces are transparent, other are opaque

I have created a regular dodecahedron with OpenGL. I wanted to make the faces transparent (as in the image on Wikipedia) but this doesn't always work. After some digging in the OpenGL documentation, is appears that I "need to sort the transparent faces from back to front". Hm. How do I do that? I mean I call glRotatef() to rotate the co...

How to properly setup OpenGL scene for visualizing single objects

I need to write a simple visualizer for my mesh toolkit. The objects I'm working with is always located inside [-1,1]^3 box (inclusive), so I need to ensure that object will be entirely visible by user. I also want to have a possiblity to rotate a camera around object like user is "flying" around object. That's how I'm doing this: stat...

Can you create OpenGL context without opening a window?

Occassionally I hit places where I'd want to get an OpenGL framebuffer object, but where I'm not interested about opening a window of any kind. Is it possible to create an opengl context without attaching it to a window of any kind? ...

DDS texture loading

How would I load a dds texture file into an OpenGL 2dtexture or cube map texture? ...

Rotating a glViewport ?

In a "multitouch" environement, any application showed on a surface can be rotated/scaled to the direction of an user. Actual solution is to drawing the application on a FBO, and draw a rotated/scaled rectangle with the texture on it. I don't think it's good for performance, and all graphics cards don't provide FBO. The idea is to clip ...

XNA, direct X , OpenGL

Hi, I have been wanting to give game programming ago for a long while and never got round to it, and i have finally decided to give it ago. I have decided to try and create a simple to 2D platform game. I have had a quick play with XNA and I do like it. What i am looking for tho is a comparison between XNA,directx,OpenGL. mainly the stre...

How does zooming, panning and rotating work?

Using OpenGL I'm attempting to draw a primitive map of my campus. Can anyone explain to me how panning, zooming and rotating is usually implemented? For example, with panning and zooming, is that simply me adjusting my viewport? So I plot and draw all my lines that compose my map, and then as the user clicks and drags it adjusts my vi...

How to index a texture as a discrete lookup table from a shader?

I'm writing a shader in GLSL and I need to pass it a certain amount of information. The only practical way to pass this information is using a 1-D texture. I'm creating the texture and setting GL_TEXTURE_MIN_FILTER and GL_TEXTURE_MAG_FILTER to GL_NEAREST Now from the shader I need to access the texture so I'll be able to exactly index ea...

how to enable vertical sync in opengl?

How do you enable vertical sync? Is it something simple like glEnable(GL_VSYNC)? (though there's no such thing as GL_VSYNC or anything like it in the options that glEnable accepts). or is there no standard way to do this in opengl? ...

Problem regarding OpenGL and the process of converting C to C++

Alright. So I wanted to use a file written in c in c++. I ran the code in c and had absolutely no problems. Since I don't know c, I worked with some conversion software for a while, but it wasn't effective (guessing the coding format wasn't in the style it needed). I decided to try it out myself and it looked like all I had to do was ch...

Multiple view frustum clipping

The function gluPerspective() can be used to set near Z and far Z clipping planes. I want to draw a scene clipped at a certain far Z plane, and draw another scene beyond this Z plane. Is it possible to do this clipping twice per frame? ...

graphics: best performance with floating point accumulation images

Hello stackoverflow, I need to speed up some particle system eye candy I'm working on. The eye candy involves additive blending, accumulation, and trails and glow on the particles. At the moment I'm rendering by hand into a floating point image buffer, converting to unsigned chars at the last minute then uploading to an OpenGL texture. ...

reverse perspective projection

I'm using worldview_inverse * (projection_inverse * vector) to transform screen space coordinates into world space coordinates. I assumed that (x,y,1,1) would transform to a point on the far plane, while (x,y,-1,1) transforms to a point on the near plane, and connecting the line I can query all objects in the view frustum that ...