opengl

Cocoa - Modal Window With Animating NSOpenGLView behind it

I have an NSWindow subclass (GameWindow) containing an NSOpenGLView subclass (GameView). The app is windowed (does not go fullscreen). An OpenGL animation in GameView is fired ~30 times a second by a timer. For presentation reasons, the GameView animation MUST continue regardless of what else is happening in the app. The only time it...

robust and flexible 3d data structure

I'm looking for a concept to store (in 3 dimensional euclidian space) faces, edges and vertex such that information (about relation) isn't duplicated queries for adjecent and neighboring faces/edges/vertex are fast the mesh is not limited to connected faces of the same winding definitions neighbor of a face: the face that shares a...

Disable texturing in OpenSceneGraph

I need to completely disable texturing in OSG. I tried glDisable(GL_TEXTURE_2D) and also using an osg::stateSet, but some nodes that have textures still render their textures. Is there any way to globally turn off texturing? A bit of background : I need to produce an object coverage map for a scene, that is, knowing what object produced...

Multi-touch mouse gestures on EeePC

I have an EeePC 900 running Ubuntu Intrepid Ibex. The touchpad has some simple multi-touch gestures built in - scrolling by dragging with two fingers instead of one for example. How would I detect multi-touch events in an OpenGL/C application? Is the touchpad on the EeePC 900 capable of handling rotational and scaling gestures? Th...

Fonts for Carbon OpenGL app on OS X

Hi, I'm trying to add text rendering to a Carbon OpenGL app I'm developing for OS X. Since the aglUseFont is now deprecated, I'm looking for another way to add text as well as be able to query the glyph properties (i.e. width, height, spacing, etc) So far I've investigated CoreText and ATSUI but both without much luck. Please help me...

OpenGL game with multiple entities on screen at once, what language to use?

Going to create a small game with OpenGL as a side project. Going to be a top down shooter with emphasis on large numbers of enemies (the more the merrier) Thinking about having the resolution max out at 800x600 (for an old school feel) What language would you recommend, is C# capable of handling the number of entities I want on screen...

OpenGL cross platform window

I'm looking for a window... ugh... thing for OpenGL, I've been using SDL but more recently found that its not quite up to my needs in at least any code I've seen. I'd like to find some GUI library that allows me to develop using OpenGL (and SDL if at all possible) with a menu bar, possibly options at the side, and a working-out-of-the-bo...

OpenGL: texture feedback?

I've have a rendering setup in which I write to a Frame Buffer object attached to a texture and the rendering itself also uses the texture I'm rendering to. Is this generally a good idea? Could there be some strange issues involved here I'm perhaps not aware of? ...

Where can I download JOGL?

I'm looking to start using Java Open GL, but I can't find it. ...

"cannot find symbol method getGL()" (and now getGLU() as well)

I'm trying to learn how to use JoGL, and for some reason I'm getting this error despite having all of these imported: import javax.media.opengl.*; import javax.media.opengl.glu.*; import com.sun.opengl.util.*; import com.sun.opengl.util.j2d.*; public void display(javax.media.opengl.GLDrawable gLDrawable) { final GL gl = gL...

Self-Referencing Renderbuffers in OpenGL

I have some OpenGL code that behaves inconsistently across different hardware. I've got some code that: Creates a render buffer and binds a texture to its color buffer (Texture A) Sets this render buffer as active, and adjusts the viewport, etc Activates a pixel shader (gaussian blur, in this instance). Draws a quad to full screen, wi...

openGL glDrawElements with interleaved buffers

Thus far i have only used glDrawArrays and would like to move over to using an index buffer and indexed triangles. I am drawing a somewhat complicated object with texture coords, normals and vertex coords. All this data is gathered into a single interleaved vertex buffer and drawn using calls similar to ( Assuming all the serup is done c...

OpenGL/SDL problem in Ubuntu

I have a C-code which I have not managed to run http://dl.getdropbox.com/u/175564/problem-sdl.png The problem is in OpenGL or SDL. I do not have SDL.h at /usr/local/SDL/SDL.h, so gcc cannot find it. I have SDL.h installed by MacPorts at /opt/local/include/SDL/SDL.h. I tried to copy it to /Masi/local/SDL/SDL.h unsuccessfully at the fol...

When to use OpenGL instead of GTK or QT library?

I understand the purpose of GTK, QT or other graphic toolkits. But I don't understand the role of OpenGL. Is it just another GUI-library or does it refer to something more fundamental? If so, what is it and when should I use it in day-by-day hacking? ...

OpenGL coordinate problem

Hello, I am creating a simple 2D OpenGL application but I seem to be experiencing some camera issues. When I draw a rectangle at (20,20) it is drawn at (25,20) or so. When I draw it at (100, 20) it is drawn at 125 or so. For some reasons everything is being shifted to the right by a few %. I have pasted a trimmed down version here http:...

"cannot find symbol variable BufferUtils"

I'm trying to load an image into Java to create a texture in JoGL. I need to use a call to BufferUtils for this: dest = ByteBuffer.allocateDirect(data.length * BufferUtils.SIZEOF_INT); But it's telling me that it can't find it. This is all I have imported: import javax.media.opengl.*; import javax.media.opengl.glu.*; import com.sun...

Why won't my texture show up?

Okay, I'm using Java and JoGL. I'm trying to load and display a texture, but the texture isn't showing up at all. I'm not getting any errors at all, so I don't know what the problem could be. import javax.media.opengl.*; import javax.media.opengl.glu.*; import com.sun.opengl.util.*; import com.sun.opengl.util.j2d.*; import java.awt.*; ...

OpenGL vertex layout

The problem goes like this: if I have a vertex structure defined with only the position (3 floats), with a total size of 12 bytes, things work perfectly. However, if I try to use unsigned bytes or shorts for the position components (3 or 6 bytes per vertex) it crashes with an access violation at glDrawArrays. Any idea why? ...

whats wrong with this Jar file?

I'm trying to turn my JoGL project into a jar. Can someone tell me what I'm doing wrong? http://www.megaupload.com/?d=MA3LF50J EDIT from schnaader: Stacktrace from my PC: EDIT FROM WILLIAM: It runs on my PC just fine as a normal project inside JCreator, so I know it's not the code. I have JoGL in the /lib/ext/ folder of my jre too. E...

What does glLoadIdentity() do in OpenGL?

I'm new to OpenGL and I'm a little overwhelmed with all of the random functions that I have my in code. They work and I know when to use them, but I don't know why I need them or what they actually do. I know that glLoadIdentity() replaces the current matrix with the identity matrix, but what exactly does that do? If every program requi...