opengl

glTexImage2D

What is the border value of glTexImage2D? It's either 0 or 1. It referencies that if this texture will just have border or not? Where is the borders values set? ...

Problem in displaying sequence of DICOM images using QT

Hello, i'm working in Linux [GCC Compiler] , i'm using Eclipse with CDT + QT to compile I need to display sequence of DICOM images using QT window and OpenGL functions pls let me know which is the function to display sequence of images i'm using 3 functions 1) initiallizeGL() to initallize OpenGL functions. 2) resizeGL() instead of g...

Is there a good 3d software renderer for Java?

I have a PC with a good CPU but slow GPU (integrated graphics card). I have noticed that some commercial games work much better using their software renderers instead of OpenGL or DirectX. I am making a Java app that will use JOGL/LWJGL to access OpenGL. To enable a software rendering option, should I look at a pure-Java software rendere...

Mapping Wavefront .obj's vt to OpenGL texture coordinates

Hi, an artist friend has sent me an .obj file exported by 3DS Max 2009 which contains three texture coordinates as parameters to the vt command. And that's correct according to .obj specification. However, I'm not sure how to map U-V-W coordinates that are provided for a regular 2D .jpg texture. This is relatively important for me, sin...

Is there any opengl example so that I can run on MacOS?

Is there any opengl example so that I can run on MacOS 10.5.5? And if there is a XCode project with the opengl examples? Thank you. ...

Fastest way to draw bitmasked images in OpenGL

With modern hardware, what is the fastest way to draw an image with a "bitmask", i.e., a mask that specifies whether a given pixel will be drawn or not (this could be extracted from "magic pink" pixels, for example) using OpenGL? Should I just use alpha blending and set invisible pixels to a=0? Should I use the old "AND black/white mask...

Qt conflicting with GLee

I'm adding OpenGL support to a game that is based on Qt 3 (office politics). The basics (QGLWidget, etc) work fine. To get to OpenGL extensions, I arbitrarily chose GLee (it compiled out of the box, GLew didn't). GLee.h and qgl.h don't play nicely together. AFAICT, each must be included before the other. I yanked the preprocessing ch...

CLOD Planet wide texturing in OpenGL

I'm finishing up on a 3D planet with ROAM (continuous level of detail). My goal now is to have good quality render using textures. I'm trying to find a way I can use a tiling system (small good textures combined), but in a way I can take advantage of my CLOD mesh. Current algorithms (from what I've found) using this tiling systems pro...

Modifying alpha state when using glCallList in OpenGL.

A OpenGL App I've written acts as a viewer for large data files in a propriety format. It's pretty simple, it loops through each data set one at a time, drawing each one using a glCallList: for (all objects in our in our data set) { if (first time drawing this object) { glNewList(...); for (all pixels in object_...

Macro use depending on integer

I have to use a macro multiple times inside a function and the macro that needs to be used depends on a number I pass into the function. e.g. function(int number) { switch(number) { case 0: doStuff(MACRO0); break; case 1: doStuff(MACRO1); break; } } The problem is: I have a lot stuff to do per switch s...

'infinite' canvas within opengl

I am using opengl in a tilemap editor. Storing the tilemap in GL_LUMINANCE32F format, then modifying it with opengl commands. Now, I'm realising canvas size limitations are a burden for people drawing tilemaps. So how could I implement an infinite canvas? (such that expands and shrinks without user needing to explicitly trigger it to ex...

How do I load an image using SDL and Xcode on OS X 10.5?

Edit: After using a bmp at toastie's suggestion, I'm still having problems loading the image: I'm using SDL and OpenGL with Xcode and I'm trying to load an image to use as a texture on a cube. The image is a 256x256 RBG jpeg. The image is in the same directory as all of my source code, and it's under the Resources folder in the Xcode pr...

avoid printscreen function rendering texts

I´m looking to implement a way to avoid the user taking a screenshot from one desktop application. Yes, this seems to be weird asking for that, but we need it. I tried to use OpenGL (SDL_tff) to render the text, but it seems that doesn't stop the user from taking the screenshot. Please, does anybody have some clever idea about how to do...

Rendering splash screen on the iPhone using Open GL ES

Hi, I want to render a splash screen on the iPhone whilst using an Open GL view. The iPhone screen as we know is 320x480, which is not a power of 2. Before I enter into the world of chopping the texture up and rendering sub parts, or embedding the screen on another texture page I was wondering if there was another way? Is it possible ...

OpenGL or Flash for 3d visualization in the browser

Hello, I am planning create a site that lets users in finance visualize the price of a foreign exchange option in 3d. x = price of underlying, y = price of option, z = days left to maturity. In other words, rather than a simple option payout diagram, this would allow you, on the Z axis, to view what the P&L scenarios would be if you sol...

What is the normal way of dealing with non-standard library locations in an autoconf script?

I'm trying to use the GNU autoconf/automake toolchain for the first time, so the answer to my question might be trivial. The program needs OpenGL/GLUT where the headers and libraries are installed in a non standard location. I found these macros that should do all the checking for me. I'm simply calling it with *AX_CHECK_GLUT*. How do ...

Designing a Qt + OpenGL application in Eclipse

I'm starting a C++ project using OpenGL and Qt for the UI in eclipse. I would like to create a UI where a portion of the window contains a frame for OpenGL rendering and the rest would contain other Qt widgets such as buttons and so on. I haven't used Qt or the GUI editor in eclipse before and I'm wondering what the best approach would...

Why can't I know the state of OpenGL lights in GLSL?

Is there a way to find out if a light is enabled in GLSL that doesn't involve passing attributes or creating a ton of different shaders? What about using NVidia's C for Graphics (Cg)? Can I do it with Cg? I am now convinced that you can't do it. But now I ask: why not? ...

How can glDrawElements() cause a EXC_BAD_ACCESS while drawing with texture?

I am getting a EXC_BAD_ACCESS on the the glDrawElements() in this code, but only when the bottom block of code is present. I am thinking it must be something conceptual that I am missing because I am not finding any nil pointers or other things that can typically cause this error. glScalef(6, 6, 6); glEnableClientState(GL_VERTEX_ARRAY);...

Techniques to smooth face edges in OpenGL

When I light my human model in OpenGL using face normals it is very apparent where each face is on the model. The lighting becomes considerably smoother using vertex normals but still noticeable. Is there any technique available to smooth organic models without adding additional vertices (ex. subdivisions)? ...