opengl

Can I interpolate rotation from two Quaternions created from Yaw/Pitch/roll?

Quaternions are good for interpolate rotations between them. so far so good. If I have a networking game, will it suffice to transfer the rotation as vector3f or should I use a quaternion? To make the game smoother I may have to interpolate between the last sent rotation and the current one. But can I interpolate rotations between two ...

What 3D graphics framework should I use for a real world game engine?

Hello, I'm a C++ programmer with very extensive server programming experience. I'm however fairly bored at the moment and I decided to tackle a new area: 3D game programming, for learning purposes. Additionally I think this learning project may turn out to be good resume material in the future should I decide to work in this area. Inste...

OpenGL / C++ / Qt - Advice needed

I am writing a program in OpenGL and I need some sort of interfacing toolbar. My initial reactions were to use a GUI, then further investigation into C++ I realized that GUI's are dependent on the OS you are using (I am on Windows). Therefore, I decided to use QT to help me. My Question is if I am taking the best/appropriate approach to...

Howto draw a rect on screen. NSOpenGLContext vs transparent NSWindow + custom NSView

I'm reading pixels from an area of the main screen via NSOpenGLContext. Now I would like to draw a rect around that area to indicate where it actually is. How would I do this? My first thought was the "Cocoa way": create a transparent fullscreen NSWindow and a custom NSView to draw the rectangle path. But that feels a bit too complicated...

DDS DXT1 loading in OpenGL, crashes

Any idea whats wrong with my code? when i execute glCompressedTexImage2D() the program just crashes (comes the Windows XP crash message thing...) Im trying to load DDS image without mipmaps, the image format is DDS DXT1 Am i missing some include file, or what did i do wrong? I downloaded the included files from: http://sourceforge.net/...

Android OpenGLES Render-to-Texture

Hey! I write graphics apps for the iPhone and I'm looking to port my most recent app, 'Layers,' to the Android platform. Layers is painting app that allows users to draw on the screen and create multi-layered paintings with different brushes, colors, etc... and export to PSD. It's got desktop sync, a smudge tool, lots of good stuff... ht...

Opengl irregular shape color filling

I am drawing a 5 corner star with GL_LINES. When I use the GL_POLYGON, it distorts the shape of star and connects the first and last vertex. Help please :( ? ...

FLTK in Cygwin using Eclipse (Linking errors)

I have this assignment due that requires the usage of FLTK. The code is given to us and it should compile straight off of the bat, but I am having linking errors and do not know which other libraries I need to include. I currently have "opengl32", "fltk_gl", "glu32", and "fltk" included (-l), each of which seem to reduce the number of e...

Comprehensive & Modern OpenGL reference

I'm looking for a comprehensive and up-to-date reference (preferably in book form) on OpenGL. I'd like to find something that covers OpenGL 3.0 but also need information on OpenGL 2.1 for older hardware (my understanding is that DirectX 10 level hardware is necessary for OpenGL 3 functionality). I'm strongly considering the OpenGL Super...

[Qt/Opengl] Accelerate 2d Drawing

I'm triying to make a 2D real-time plot. I've tried with modifying the osciloscope example of qwt, tried to use QGraphicsView, and QPainter to reach high framerate drawing. I'm using 8 channels to plot data wich is arriving from a rs232 port. I take a sample every 10 ms. Maybe i've used the QPainter in a wrong way, but i couldn't draw ve...

SDL_image/C++ OpenGL Program: IMG_Load() produces fuzzy images

I'm trying to load an image file and use it as a texture for a cube. I'm using SDL_image to do that. I used this image because I've found it in various file formats (tga, tif, jpg, png, bmp) The code : SDL_Surface * texture; //load an image to an SDL surface (i.e. a buffer) texture = IMG_Load("/Users/Foo/Code/xcode/test/lena.bmp")...

How do I use OpenGL 3.x VBOs to render a dynamic world?

Although there seem to be very few up to date references for OpenGL 3.x itself, the actual low level manipulation of OpenGL is relatively straight forward. However I am having serious trouble trying to even conceptualise how one would manipulate VBOs in order to render a dynamic world. Obviously the immediate mode ways of old are non ap...

opengl newbie !

hi, I'm trying to run an opengl application in vs 2008 but the compiler keeps throwing me the error: Error 1 fatal error LNK1104: cannot open file 'C:\Documents.obj' ,and everything I've tryed doesn't do the trick , so any indication would be very appreciated ! ...

Using opengl, how do I combine a background image and a smaller distorted texture?

I am attempting to make an image stretch effect on the iphone. I make a vertex array and shift the texture data for each indice within an arbitrary radius of a background image. Then make the following calls to display: int n = gridSize_.x * gridSize_.y; glEnableClientState( GL_VERTEX_ARRAY); glEnableClientState( GL_TEXTURE_COORD_ARRAY...

Java - Zoom / 3D Data Visualization Libraries

What are the best libraries/frameworks for doing 3D and/or Zoom interfaces in Java? I'd like to be able to do some prototyping of creating new types of interfaces for navigating within data and representing object graphs/relationships. Low and no cost options are better. Open Source is also a plus. UPDATE: The higher level the api the ...

JOGL - glu.gluUnProject always returning 0.0

Hi everyone, I'm currently trying to work out how to get world coordinates from JOGL - at the moment it only returns x = 0.0, y= 0.0 and z = 0.0 no matter where I click. What am I doing wrong? public double[] getMousePosition(int x, int y){ int viewport[] = new int[4]; double modelview[] = new double[16]; double projection[] = new...

Terrain minimap in OpenGL?

Hello, So I have what is essentially a game... There is terrain in this game. I'd like to be able to create a top-down view minimap so that the "player" can see where they are going. I'm doing some shading etc on the terrain so I'd like that to show up in the minimap as well. It seems like I just need to create a second camera and s...

Fragment shaders: output variables

Reading the GLSL 1.40 specification: Fragment outputs can only be float, floating-point vectors, signed or unsigned integers or integer vectors, or arrays of any these. Matrices and structures cannot be output. Fragment outputs are declared as in the following examples: out vec4 FragmentColor; out uint Luminosity; ...

Calculate fps (frames per second) for iphone app

I am using an opengl es iphone application. What is the most accurate way to calculate the frames per second of my application for performance tuning? ...

OpenGL Keyboard Camera Controls

I have been following this tutorial series for OpenGL: GLUT: http://www.lighthouse3d.com/opengl/glut/ I have reached the stage of implementing camera controls using the keyboard: http://www.lighthouse3d.com/opengl/glut/index.php?8 When doing the advanced tutorial it stops working. I've pretty much just copied and pasted it. When I ...