opengl

OpenGL extension documentation?

Where can I find the official documentation of OpenGL extensions? The base API is pretty well documented and a Google search for a function name returns multiple pages with the documentation text. Yet Googling an extension function usually doesn't return anything useful. What am I missing? ...

Mix opengl and directdraw in different windows of the same application?

Hi, I'm developing an application with two windows: Window 1: Renders direct draw surfaces Window 2: I'd like to have it do pure OpenGL calls I don't want to mix OpenGL and DirectDraw in the same window. I see from the Open GL FAQ (http://www.opengl.org/resources/faq/technical/mswindows.htm) that you can't mix the API calls inside ...

What's the best 3d model format for loading and displaying inanimate textured objects in an OpenGL program?

I just want to know what file formats are the most OpenGL friendly in terms of loading and displaying inanimate textured 3d objects. ...

OpenGL: Multiple user vector by modelview matrix?

Is there a way to make OpenGL transform a general vector I give it with the current modelview matrix and get the result back? The obvious way is to query the modelview matrix and do the multiplication myself but I am almost sure there should be a way to make OpenGL do this for me. ...

OpenGL rotating a camera around a point

In OpenGL I'm trying to rotate a camera around a point, with camera being distance r from the point and facing the point when it rotates. In other words, I want the camera to move along the circumference of a circle at a radius r from the center, with the camera facing the center at any point along the circumference. Lets say that in ...

Setup OpenGL ES for desktop Java

Anyone know if/how to setup OpenGL ES for plain old regular Java on Linux without running it through a cell phone emulator? My goal is to develop tools for building Android games (ex. a map builder). Ideally these would run outside the emulator to take benefit of greater screen real estate, native OS conveniences, fast start time, etc. ...

Newbie OpenGL question

I am trying to cobble together a scene that basically consists of: A 2D image of the earth (think NASA satellite photography) that has been rotated into a view similar to this and, Cylindrical tubes that I want place at specific lat/lon coordinates. I have managed to setup the 2d image as depicted in the link above, but I am struggli...

Display arbitrary size 2d image in opengl

I need to display 2d images in opengl using textures. The image dimensions are not necessarily powers of 2. I thought of creating a larger texture and restricting the display to the part I was using but the image data will be shared with openCV so I don't want to copy data a pixel at a time into a larger texture. EDIT - it turns out tha...

Simultaneous updates across two display contexts in openGL

Sorry, I'll be more detailed. I have a c# .NET application with which I've created a custom image display control. Each image display represents its own display context and draws the image using glDrawPixels (Yes I know it would be better to use textures, I plan to in the futures but this app is already too far along and my time is lim...

OpenGL 3d stereo viewing for aerial stereo image (left, right images)

Hi all! Please help me! My purpose: - display overlapping area with whole left right satellite or aerial image - rotate image using roll, pitch yaw angles -image format is Tiff image Now i'm doing OpengGL 3d stereo viewing for aerial stereo image (left, right stereo pair). I displayed my left right image using followi...

How to apply texture to glutSolidCube

Hi, I can find tutorials about mapping textures to polygons specifying vertices etc. but nothing regarding how to apply a texture to a cube (or other stuff) drawn with glut (glutSolidCube). I am doing something like: glTexEnvfv(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, decal); glTexParameterfv(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, repeat); glT...

OpenGL and monochrome texture

Is it possible to pump monochrome (graphical data with 1 bit image depth) texture into OpenGL? I'm currently using this: glTexImage2D( GL_TEXTURE_2D, 0, 1, game->width, game->height, 0, GL_LUMINANCE, GL_UNSIGNED_BYTE, game->culture[game->phase] ); I'm pumping it with square array of 8 bit unsigned integers in GL_LUMINANCE mode (one 8...

How to load bmp into GLubyte array?

All, I am trying to load up a bmp file into a GLubyte array (without using aux). It is unbelievable how what I thought would have been a trivial task is sucking up hours of my time. Can't seem to find anything on Google! This is what I hacked together but it's not quite working: // load texture GLubyte *customTexture; string fileN...

Proper way to scale an SDL Surface without clipping?

what is the proper way to scale an SDL Surface? I found one explanation online but it required redrawing the Surface pixel by pixel. It seems like there should be some way of doing this natively through SDL rather than redrawing the image like that. I haven't been able to find anything in the SDL documentation that covers this. I am able...

Events in cpp/opengl

Hello I would like to create infrastructure to handle events for my opengl project. It should be similar to what wpf has - 3 types of events - direct, tunneling, bubbling. I then want to handle events such as mouse up, down, move etc. How should i approach this problem? Is there any library to handle this. thanks ...

[OpenGl] Loading new texture into already defined texture name

I have an OpenGl program in which I am displaying an image using textures. I want to be able to load a new image to be displayed. In my Init function I call: Gl.glGenTextures(1, mTextures); Since only one image will be displayed at time, I am using the same texture name for each image. Each time a new image is loaded I call the fo...

What is the most efficient way to manage a large set of lines in OpenGL?

I am working on a simple CAD program which uses OpenGL to handle on-screen rendering. Every shape drawn on the screen is constructed entirely out of simple line segments, so even a simple drawing ends up processing thousands of individual lines. What is the best way to communicate changes in this collection of lines between my applicati...

glProgramStringARB causing GL_INVALID_OPERATION....or Help with fragment programs

I am trying to write a fragment program that will take a texture and clamp the texels between two values. That is, if the min value is say 0.2 and the max value is 0.6, any texel less than 0.2 will become 0, any texel greater than 0.6 will become 1.0, and all values in between will be mapped from 0 to 1.0. My call to glProgramStringARB ...

using GDAL/OGR api to read vector data (shapefile)--How?

Hi, I am working on an application that involves some gis stuff. There would be some .shp files to be read and plotted onto an opengl screen. The current opengl screen is using the orthographic projection as set from glOrtho()..and is already displaying a map using coordinates from a simple text file.. now the map to be plotted is to b...

How does JOGL search for OpenGL libraries?

I'm writing a desktop app using JOGL, and deploying on Win/Mac/Linux. On Linux we find that the OpenGL libraries installed are not always up to the job, and we need to have the capability of switching our own software emulation OpenGL in. Naturally we expected that we could place out libraries after /usr/lib or before /usr/lib to favour ...