opengl

why compiling GLUT project in NetBeans with MinGW doesnt work.

Hello, I have this situation, I use Netbeans 6.8 with recommended MinGW+msys configuration, and compiling works. Now I have a project which is using glut, so I linked the libraries opengl32, glut32, glu32, gdi32, winmm, mingw32 in "project properties->build->linker->libraries", i manually selected all .lib files and the compilation works...

Force 4:3 in fullscreen mode

Does anybody know how to force 4:3 when enabling fullscreen mode using OpenGL and AGL? ...

The most efficient method of drawing multiple quads in OpenGL

I'm not very keen with OpenGL and I was wondering if someone could give me some insight on this. I'm a 'seasoned' programmer, I've read the redbook about VBOs and the like, but I was wondering from a more experienced person about the best/most efficient way of achieving this. I've been producing this 2d tile-based game engine to be used...

Handling inverse kinematics: animation blending or math?

I've been working for the past four days on inverse kinematics for my game engine. I'm working on a game with a shoestring budget so when the idea of inverse kinematics came up I knew I had to make it such that the 3D models bones would be mathematically changed to appear to be stepping on objects. This is causing some serious problems ...

I'm having an issue to use GLshort for representing Vertex, and Normal.

As my project gets close to optimization stage, I notice that reducing Vertex Metadata could vastly improve the performance of 3D rendering. Eventually, I've dearly searched around and have found following advices from stackoverflow. Using GL_SHORT instead of GL_FLOAT in an OpenGL ES vertex array How do you represent a normal or textu...

QGLWidget::makecurrent(): GetDC() failed. Invalid Window handle

Hello, I have a requirement to get pictures saved off screen. I have used QGLwidget::grabframebuffer to get this done. While it works fine on MAC, it fails with an error "QGLWidget::makecurrent(): GetDC() failed. Invalid Window handle " on Windows 7. Only one opengl context gets created in the process. But i have observed that if I add ...

Opengl: Problem with masking

Hey all, I'm working on creating a hole in a wall using masking in opengl, my code is quit simple like this, //Draw the mask glEnable(GL_BLEND); glBlendFunc(GL_DST_COLOR,GL_ZERO); glBindTexture(GL_TEXTURE_2D, texture[3]); glBegin(GL_QUADS); glTexCoord2d(0,0); glVertex3f(-20,40,-20); glTexCoord2d(0,1);glVertex...

OpenGL/Carbon/Cocoa Memory Management Autorelease issue

Hoooboy, I've got another doozy of a memory problem. I'm creating a Carbon (AGL) Window, in C++ and it's telling me that I'm autorelease-ing it without a pool in place. uh... what? I thought Carbon existed outside of the NSAutoreleasePool... When I call glEnable(GL_TEXTURE_2D) to do some stuff, it gives me a EXC_BAD_ACCESS warning -...

Eclipse + PyDev becomes extremely slow with large import

I'm trying to use Eclipse + PyDev for studying OpenGL programming but when I type from OpenGL.GL import * from OpenGL.GLUT import * IDE becomes extremely slow! Ok. It isn't a smart idea import to much useless things but it's so useful for learning a new library! Any help? PS: I use Ubuntu with Eclipse Galileo. ...

Does computer graphics have a practic use besides games/movies/pictures ?

Hello, I am learning Computer Graphics at the university and I'm trying to figure out the use of it ... and I fail. Only games and movies stick in to my mind, I'm sure there are other uses for, let's say, graphic algorithms, openGL, 2D and 3D, 3ds Max ... Is it useful later on ? Where do I need it ? Thank you ...

C# 2D Vector Graphics Game using DirectX or OpenGL?

Hey Guys, So it has been a while since I have done any game programming in C#, but I have had a recent bug to get back into it, and I wanted some opinions on what configuration I should use. I wanted to use C# as that is what I use for work, and have become vary familiar with. I have worked with both DirectX and OpenGL in the past, bu...

Is the binormal of a vertex the cross between its normal and tangent?

I'm trying to find out what a binormal is in the context of graphics programming but coming up short, I saw on a site that the binormal was being calculated as the corss between the normal and tangent (i.e. cross(normal, tangent)), is this the correct way to calculate a binormal? ...

How can I make 3ds files' size smaller??

Hey all, Is there any way I can use to make the size of a 3ds file smaller?? I tried to change their length and width using 3dmax but the file size still the same?? I'm using the 3ds files in creating an OpenGl scene so I need to shrink their size as small as I can, any suggestions?? ...

SwapBuffers causes redraw

I'm making a Win32 application with OpenGL in the main window (not using GLUT). I have my drawing code in WM_PAINT right now when I call swapBuffers it must be invalidating itself because it is constantly rerendering and using lots of cpu resources. How can I make it only render when it honestly receives WM_PAINT like when using GDI? Th...

"Single NSMutableArray" vs. "Multiple C-arrays" --Which is more Efficient/Practical?

Situation: I have a DAY structure. The DAY structure has three variables or attributes: a Date (NSString*), a Temperature (float), and a Rainfall (float). Problem: I will be iterating through an array of about 5000 DAY structures and graphing a portion of these onto the screen of the iPhone device using OpenGL. Question: As far as dra...

OpenGL: Easiest way to make shadow and light Volumes?

Hello! I want to ask what is the easiest way to make shadow and light volume ? How can I bring to scene more realism? Do you know any nice tricks ? I hear that to make shadow i must use stencil buffer, but I don't know how:/ I can't find any super simple example how to make it. ...

Build OpenGL model in parallel?

I have a program which draws some terrain and simulates water flowing over it (in a cheap and easy way). Updating the water was easy to parallelize using OpenMP, so I can do ~50 updates per second. The problem is that even with a small amounts of water, my draws per second are very very low (starts at 5 and drops to around 2 once there'...

SDL+OpenGL app: blank screen

I spent the last three days trying to create a small app using SDL + OpenGL. The app itself runs fine -- except it never outputs any graphics; just a black screen. I've condensed it down to a minimal C file, and I'm hoping someone can give me some guidance. I'm running out of ideas. I'm using Windows Vista, MinGW & MSYS. Thanks in adva...

GetDeviceGammaRamp to adjust colors

Hi, I overlay an OpenGL application (c++), this openGL application uses SetDeviceGammaRamp to set the brightness of the desktop to very high (dont know why). This application is fullscreen and looks good, but my overlay is very bright. Instead of the orange color with normal brightness, I get yellow because of the high gamma. What I wa...

problems with openGl on eclipse

I'm working on Windows XP I have portable version of Eclipse Galileo, but I didn't find there glut so I decided to add it using this link I made all steps and and now I'm trying to compile this code #include "GL/glut.h" #include "GL/gl.h" #include "GL/glu.h" /////////////////////////////////////////////////////////// // Called to draw ...