opengl

Tuning OpenGL performance for geometry throughput

This has probably been asked over and over but I couldn't find anything useful so here it goes again... In my application I need to render a fairly large mesh (a couple of million triangles or more) and I'm having some problems getting decent frame rates out of it. The CPU is pretty much idling so I'm definitely GPU-bound. Changing the ...

Any Games Engine for Delphi?

I want to create a game in Delphi Is there any good game engine for Delphi? based on directx 10 or OpenGL? I need it for 3D games, or only I can do that with C++? ...

OpenGL: GL_TEXTURE_1D trouble

I'm trying to add a simple repeating shaded gradient (think laminated layers) along the Z axis of arbitrary, highly tessellated objects (STL imports). It's mostly working, but I get some really weird faces where the texture is not parallel to Z, but rotated and scaled differently. These faces are usually (possibly always) oriented vert...

(student) interview questions - programming for a robotics lab

Hi all, my robotics lab is looking for programmers to work on some projects we have at the moment. We nailed down the requirements (mainly, c++ and experience with openGL and 3D), but due to obvious money constraints we can't afford to hire Great Developers. Instead we're going to settle for Talented Students, offering them projects ...

3DS file loader for opengl.

Hello, this is my 1st question in the site. I need a 3DS model loader for opengl applications. Loader should also be able to load .jpg textures. I tried to use OpenSceneGraph for this purpose but this time I have to also use the whole OpenSceneGraph data structure to render the scene. Is it possible to use OpenSceneGraph only for model l...

How to Set text color in OpenGl

Hi there, I am new to openGL and wanted to set the text color tried the glColor3f function but it changes the drawing color as i only want to change the text color what should i do? ...

Z Value after Perspective Divide is always less than -1.

Hi All, So I'm writing my own custom 3D transformation pipeline in order to gain a better understanding of how it all works. I can get everything rendering to the screen properly and I'm now about to go back and look at clipping. From my understanding, I should be clipping a vertex point if the x or y value after the perspective divid...

OpenGL texture mapping

I have two objects drawn on screen in openGL, one is a sphere using the GLU object and one is a texture mapped star. Regardless of the z coordinates, the texture mapped star always seems to draw in front. Is this normal openGL behavior? Is there a way to prevent this? Note: I am working within the worldwind framework, so maybe something...

How is this 3D rendering on the desktop done

I read a topic on OpenGL.org where a guy made this: http://coreytabaka.com/programming/cube-demo/ He said to release the source code but he never did, does anyone how I could get the same idea? Has to do with clearing the window with alpha but drawing on it as well.. just don't get how to get OpenGL setup like that. From there I can do...

Executing GPGPU program through WAMP

Hi, I have a program that uses the GPU for performing certain computations. I can get the program to run correctly using the command line. But when i try to execute the same statement through PHP, i run into trouble. I'm using wamp 2.0, and I've tried the exec and proc_open functions to try to get the program to run, but even though th...

glDrawElements with indices applied to vertices and normals

Is it possible to use the glDrawElements method when you have lets say 2 arrays (one for Normals and one for Vertices) and use the Index-buffer interleaved between vertices and normals). EXAMPLE: rendering a Cube // 8 of vertex coords GLfloat vertices[] = {...}; // 6 of normal vectors GLfloat normals[] = {...}; // 48 of indices (even a...

Render widgets in OpenGL canvas in Java

Is it possible with Java (and any widget toolkit: AWT/Swing/SWT/...) to render widget within an OpenGL canvas, applying transformations to them while retaining their functionalities and event reactions? ...

Dynamic VBO in OpenGL

What is the best way to store dynamic data for use in VBO (or vertex arrays). Only examples I saw were 2D static arrays and the pointer to that array was used with next parameters as stride, bytes used for one element etc. I can use "dynamic" arrays so I can specify it's size on-air, but just once. My point is that if you, for example, a...

In OpenGL, how can I adjust for the window being resized?

I am drawing several shapes (such as circles) that are keyed off of the window height & width. Since the window always starts at a given size, they are drawn correctly, but when the window is resized, it messes the aspect ratio up. How can I draw the shapes properly, regardless of window size? ...

draw 3d faces as 2d

I have 3d mesh and I would like to draw each face a 2d shape. What I have in mind is this: for each face 1. access the face normal 2. get a rotation matrix from the normal vector 3. multiply each vertex to the rotation matrix to get the vertices in a '2d like ' plane 4. get 2 coordinates from the transformed vertices I don't know if th...

Blur with OpenGL?

I'm using OpenGL and drawing polygons in a 2D view. How could I blur a polygon, without using glsl, and only things like stencil buffer and stuff. Thanks ...

OpenGL: Texturing a cube.

Hi, Recently I have been looking into OpenGL, and I've got up to the stage were I want to texture things. I thought I would start with texturing a simple cube. I currently have this code, and understand fully how it works: #include <glut.h> #define WINDOW_WIDTH 400 #define WINDOW_HEIGHT 400 float angle = 30.0f; void Draw() { glLoa...

Multitexturing issue

Hi, I would like to blend up to 4 textures by using multitexturing feature in fixed pipe line. I can successful use 2 texture units but when I use more then two texture units there strange artifact occurred (some texture are missing or wrong texture coords). I don't know what I am doing wrong. The code is very simple: glGetIntegerv(G...

OpenGL SDK on Windows

I'm trying to write an OpenGL application so I installed the Windows 7 SDK. However, it appears that it is OpenGL 1.1... #define GL_VERSION_1_1 1 How can I find which version of OpenGL I have installed(*.dll) and where can I find the newer *.lib/*.h files? ...

Fisheye projection matrix in Xna/OpenGL - 3D

Hi, I'm looking for a projection matrix I can use in 3D that will give me the effect of a fisheye. I'm not looking for a pixelshader or anything like that, that will manipulate pixels - but the actual projection matrix used in projecting from 3D space onto 2D. Thanks. ...