opengl

OpenGL: distorted textures when not divisible by 2

I have a game engine that uses OpenGL for display. I coded a small menu for it, and then I noticed something odd after rendering the text. http://img43.imageshack.us/i/garbagen.png/ As you see, the font is somewhat unreadable, but the lower parts (like "Tests") look as intended. Seems the position on the screen affects readability, as t...

How To Produce A 2D Plane Cut from a 3D Image

Hi, I would like to write a C# program that generates a 2D image from a rendered 3D object(s) by "slicing" the 3D object or through a cut-plane. The desired output of the 2D image should be data that can be displayed using a CAD. For example: A 3D image is defined by its vertices, these vertices is contained within Point3DList(). A meth...

iPhone OpenGL ES: Applying a Depth Test on Textures that have transparent pixels for 2D game.

Currently, I have blending and depth testing turn on for a 2D game. When I draw my textures, the "upper" texture remove some portion of the lower textures if they intersect. Clearly, transparent pixels of the textures are taken into account of the depth test, and it clear out all the colors of the drawn lower textures if they intersect. ...

Is it smart building an OpenGL C# application to replace GDI

Hello, I have developed a quite large application using MFC. Naturaly, I used GDI for drawing, CCmdTarget for event routing, and the document-view architecture. It was a convenient development path. Now, the client is interested in converting this application to .Net. I would prefer (and they too) writing the new product in C#. The ...

Memory usage VS. CPU usage in the iphone

I'm writting a small game in OpenGL, where I represent Items, enemies, characters, ect with a class. Each class saves references to one or more objects from an Animation class. An animation class contains references to one or more frames, which are textures I already loaded using openGL. Whenever I rotate, scale, ect any element in the g...

Altering brigthness on OpenGL texture.

I would like to increase the brightness on a texture used in OpenGL rendering. Such as making it bright red or white. This is a 2D rendering environment, where every sprite is mapped as a texture to an OpenGL polygon. I know little to nothing on manipulating data, and my engine works with a texture cache, so altering the whole surface wo...

Is it possible to run C++ binded with SDL+OpenGL code on a web browser?

My client wants her website to have an application that renders 3D (light 3D stuff, we are drawing only flat squares in 3D world) but web programming is not my thing. So I am looking for something that can run a C++ program from a web browser. But I think, if this is the case, then the client side must download the program first, and tha...

How to rotate an object in Java 3D?

I have a Cone I drew in Java 3D with the following code: Cone cone = new Cone(2f, 3f); Transform3D t3d = new Transform3D(); TransformGroup coneTransform = new TransformGroup(t3d); coneTransform.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE); t3d.setTranslation(new Vector3f(0f,0f,0f); coneTransform.setTransform(t3d); coneTransform...

Functional GLUT?

I'm learning a bit of functional programming in Gambit-C Scheme by restricting myself to not using set!. I thought it might be fun to write a little OpenGL game using this environment, which seems to lend itself well to game development. However, it seems to be difficult to stick to a functional style and avoid global state when using ...

It's possible to draw multiple and different textures in openGL for iPhone with a single draw call ?

I have this game with some variety of textures. Whenever I draw a texture I bind It and draw It. It's possible to draw all the elements of my game in just one draw call ? , with Interleaved Arrays ...how can I do It ? The performance of my game will increase by doing this ? ...

Qt MDI app with OpenGL: how to grab a valid screenshot?

I have an MDI app written in Qt. Some of the subwindows include QGLWidgets, i.e., OpenGL contexts. The most salient of these use OpenGL vertex and fragment shaders to visualize their data. I need to programmatically capture a screenshot of the application's main window, including of course all the subwindows that happen to be visible. S...

How would one implement an FPS camera?

So I'm currently working on some FPS game programming in OpenGL (JOGL, more specifically) just for fun and I wanted to know what would be the recommended way to create an FPS-like camera? At the moment I basically have a vector for the direction the player is facing, which will be added to the current player position upon pressing the "...

How to save a screenshot of what's on the OpenGL viewer?

How to save a screenshot of what's on the OpenGL viewer like printscreen and save it as a bitmap object or picture using c#? ...

How can I draw 3D model outlines on the iPhone? (OpenGL ES)

I've got a pretty simple situation that calls for something I don't know how to do without a stencil buffer (which is not supported on the iPhone). Basically, I've got a 3D model that gets drawn behind an image. I want an outline of that model to be drawn on top of it at all times. So when it's behind the image, you can see its outline,...

Calculating 3D tangent space

In order to use normal mapping in GLSL shaders, you need to know the normal, tangent and bitangent vectors of each vertex. RenderMonkey makes this easy by providing it's own predefined variables (rm_tangent and rm_binormal) for this. I am trying to add this functionality to my own 3d engine. Apparently it is possible to calculate the tan...

Setting fullscreen in Tao Opengl

Using the SimpleOpenGlControl from Tao.Platform.Windows, how can I set it to fullscreen mode, or will I have to use glut? My Solution FormBorderStyle = FormBorderStyle.None; WindowState = FormWindowState.Maximized; ...

How hard Is to add Iphone OS 3.0 features to an openGL game.

I'm programming this game in openGL, mostly working inside an single EAGLView ( I'm not that familiar with Views and other Cocoa concepts, my work to this point only involved using opengl to draw my game and calculating the logic myself). I'm being told for adding a ton of features: Send mails to Your friends when You achieve certain ...

Java OpenGL Text Rendering

I have a GLCanvas on which I want to render some text. I'm actually using a 3rd party library that extends GLCanvas and it is doing most of the GL rendering. The 3rd party tool allows you to display images on it, so I've been creating images of the text and displaying it on the GLCanvas. That works, except the text doesn't really look t...

Game engine development question

I am thinking of making a simple game engine for my course final year project. I want it to be modular and expandable so that I can add new parts if I have time. For example I would make a graphics engine that would be completely independent of the other systems, once that was finished I could add a physics engine etc. I would also want ...

Looking for C++ implementation of OpenGL gears example

I have often seen the spinning gears OpenGL example ( I think originally done by SGI) but I today I have only been able to find C and Ruby implementations, can anyone point me to a c++ implementation? ...