opengl

Alpha/texturing issues in an OpenGL wrapper

I'm in the process of writing a wrapper for some OpenGL functions. The goal is to wrap the context used by the game Neverwinter Nights, in order to apply post-processing shader effects. After learning OpenGL (this is my first attempt to use it) and much playing with DLLs and redirection, I have a somewhat working system. However, when ...

C or C++ for OpenGL graphics

Hi, there is any drawback in choose C++ and an object oriented model (classes) to implement a simulation in OpenGL (or DirectX)? It's preferred to use C and a procedural programming paradigm ? ...

[OpenGL] Totally Stuck -- Need Models but none available - What to do?

So I've got this class where I have to make a simple game in OpenGL. I want to make space invanders (basically). So how in the world should I make anything appear on my screen that looks decent at all? :( I found some code, finally, that let me import a 3DS object. It was sweet I thought and went and put it in a class to make it a littl...

When drawing an ellipse or circle with OpenGL, how many vertices should we use?

Should we just blindly use 360 vertices? 720 seems to work better, but where do we stop? ...

Building an FPS in OpenGL: My gun is being clipped agains the frustum

Hi, I'm building a first person shooter using OpenGL, and I'm trying to get a gun model to float in front of the camera. I've ripped a model from Fallout 3 using a resource decompiler (converted to .obj and loaded in). However, this is what it looks like on the screen: Half the gun's triangles are clipped to what appears to be the ...

Error creating an OpenGL control in a wpf window on windows 7

I have created an OpenGL control in C++ and wish to use this in a WPF application. I have successfully accomplished this and it works fine on Vista and XP machines but when I open my project on a windows 7 machine the WPF design window will not display. When I try to run the program I get the exception: "Cannot create instance of 'Win...

Detachable thin client with OpenGL

I would like to make a thin client application with OpenGL display support, where the user is able to detach the view on a computer and attach to it from an other. At first I thought about X Window System which I heard to be capable of transmitting GLX commands to the thin-client (X server.. from now on under "client" I'll mean client ...

Can I make an X11 window OpenGL capable after it has been created?

Specifically, I want to be able to render to an X Window given just its id. In this case I have a window created in python by gtk. I can get the window ID of a gtk.Drawable and pass it into my C python module, but can I then make OpenGL calls render to it? I am aware of gtkglext, but would rather not use it if possible. Thanks in adv...

[OpenGL] UV Coordinates Not Correct

I am using Cheetah3D if it mattters. The UV coordinates I am reading in my object made in Cheetah3D are NOT between 0 and 1 like the example model I was provided with the 3DS model object loading code. Some go above 1 as high as 1.56 or so while others go below 0, as far as -4.56. This is causing extreme abnormalities when trying to ma...

A glut/freeglut program creates visible window when debugging under the visual studio IDE but not when running the exe

I have a C++ console program which I can compile using glut or freeglut and get the same undesirable behavior. Specifically, if I "start with debugging" everything is fine, but if I start without debugging I have to manually switch to the window. Is there any way to force the GLUT window to the foreground on program start? ...

How to start developing with OpenGL and C++, what tools do I need to install on windows

Hi All, I am inspired to start programming some things in OpenGL, using c++. Can anyone list here what tools should be installed to start this process. Ie IDE Compiler OpenGL download etc? Thanks ...

When I load a texture as RGBA4444 in openGL, how much memory is consumed in the device ?

How much memory will consume a texture loaded with this method ? With this method, will a 1024x1024 texture consume 4MB anyway ? ( regardless of loading it as RGBA4444 ) ? -(void)loadTexture:(NSString*)nombre { CGImageRef textureImage =[UIImage imageWithContentsOfFile:[[NSBundle mainBundle] pathForResource:nombre ofType:nil]].CGIm...

Porting OpenGL Application to Mac OS: X11, Cocoa, or Another Alternative?

Apologies if this a newbish question, but I'm new to Mac programming, and thought I'd try porting my app to Mac OS. Basically my question boils down to what are my options and the trade-offs to programming in OpenGL on the Mac? In doing my own research, I seemingly have come to the conclusion that I have the choice of: a) Programming ...

How to apply Image Processing to OpenGL?

Sorry if the question is too general, but what I mean is this; in OpenGL, before you perform a buffer swapping to make the buffer visible on the screen, there should be some function calls to perform some image processing. I mean, like blur the screen, twisting a portion of the screen, etc. or performing some interesting "touch up" like ...

java/opengl: loading textures on 64bit VM

hello, it seems my texture loader doesnt work anymore when run in a 64bit environment. im not sure if the cause is the 64bit VM itself or if the file lying on a 64bit filesystem. the image to load is a RGBA png file, it shows up correctly on 32bit windows systems, but on my 64bit win7 some color channels seem flipped. here is my code: ...

OpenGL: scale then translate? and how?

Hey all, I've got some 2D geometry. I want to take some bounding rect around my geometry, and then render a smaller version of it somewhere else on the plane. Here's more or less the code I have to do scaling and translation: // source and dest are arbitrary rectangles. float scaleX = dest.width / source.width; float scaleY = dest.heigh...

Plotting Library for OpenGL

I need to draw a scientific graph (for example, a line or bar graph) and then render it in my application, which uses OpenGL for all display-related purposes. What is the best way to do this? Does anyone know of a plotting library for OpenGL? I haven't been able to find one, and the best thing I've come up with so far is to use LibGD...

[VSC++][OpenGL] Huge Amount of Linker Issues with Release Build Only

Anyone have idea on this? Linker errors are way out of my wheelhouse, especially ones like this. Thanks for any help provided. ^_^ Is there any more info I should include? 1>Linking... 1>freeglut_static.lib(freeglut_window.obj) : warning LNK4075: ignoring '/EDITANDCONTINUE' due to '/OPT:ICF' specification 1>LIBCMTD.lib(dbgheap.obj) : ...

iPhone OpenGL Texture loader issues

Ok, what I'm trying to achieve is to load an image as a single resource and then save different parts of it as a number of different textures (basically chopping the image into smaller squares and then saving them separately). For my game, simply mapping different sections of the original image to my shapes won't work and being able to ...

How to get gluLookAt parameters out of a 4x4 matrix

Sorry in advance if this is a really basic Matrix/OpenGl question. I have a situation where I have a 4x4 matrix that I would like to translate to, but don't want to use glMultMatrixf. I would rather use a gluLookAt method I've been using for most other translations. Is getting the values needed from the 4x4 matrix as simple as just pulli...