opengl

OpenGl with Python

I am currently in a course that is using OpenGL and I have been using C for all the programs so far. I have Python installed on Fedora as well as OpenGL however the minute I call an OpenGL command in my Python code I get a segmentation fault. I have no idea why this is. Just to avoid the "just use C" comments heres why I want to use Pyt...

opengl set texture color with vertex color

Because I need to display a huge number of labels that move independently, I need to render a label in pyglet to a texture (otherwise updating the vertex list for each glyph is too slow). I have a solution to do this, but my problem is that the texture that contains the glyphs is black, but I'd like it to be red. See the example below: ...

JOGL -Does it work? Questions + Comments and experiences

The story: I been googling for some way of displaying computer graphics over the web using acceleration from video cards (no software renders). I know it is possible to write and activeX module for IE but that is not a complete solution as that would alinate a good amount of users (firefox + macOS fans). Here is an example of more less ...

glDrawPixels causes AccessViolationException

I am using glDrawPixels to display an image. I know, I should probably be using textures but there are reasons I'm not. Well at least not for now. Anyways, image being displayed is frequently being updated as if it is being scanned in. This works fine as long as I let it sit and finish the "scanning", however, if I click on the screen wh...

OpenGL glDrawPixels on dynamic 3D arrays

How do you draw the following dynamic 3D array with OpenGL glDrawPixels()? You can find the documentation here: http://opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/drawpixels.html float ***array3d; void InitScreenArray() { int i, j; int screenX = scene.camera.vres; int screenY = scene.camera.hres; arra...

What Ubuntu/Debian packages do I need to build with Java+OpenGL?

I want to use JOGL (for Clojure, not Java). There seems to be quite a combination of alternatives for JDKs and OpenGL bindings, and I don't want to use a scatter gun approach and clog up my machine installing too much cruft. Please help me get started! What Ubuntu/Debian packages do I need to install? (starting with sun-java6-jdk, for ...

glDrawPixels/glCopyPixels to get a magnified view producing severely clamped image

Hi all, Despite an earlier question (asked here), our project is constrained to using glDrawPixels, so we have to do some hackery. One of the feature requirements is to be able to have a magnified view show up on a clicked region of an image; so, looking at an image, I want to click the mouse, and have a 200% image window show up wher...

C# Combine GDI+ and OpenGL/DirectX

Background: I am currently using custom controls within my C# project (basic controls just drawing a custom look and feel (using gdi+?)). The majoritiy of these controls have transparent segments for irregular shapes etc. Problem: I am looking to overlay a semi-transparent (irregularly shaped) panel over a group of controls. Currently ...

Setting mouse position

Is there a function in glut which moves the mouse to a specific position? There is a similar function in SDL (SDL_WarpMouse) but I want to stick to glut. ...

Lighting issues in OpenGL

I have a triangle mesh that has no texture, but a set color ( sort of blue ) and alpha ( 0.7f ). This mesh is run time generated and the normals are correct. I find that with lighting on, the color of my object changes as it moves around the level. Also, the lighting doesn't look right. When i draw this object, this is the code: glEnabl...

Is it feasible to make iPhone apps using just OpenGL and not Cocoa Touch?

I'd much rather code an app using pure C api such as OpenGL, rather that Cocoa Touch. So I'm wondering: is it feasible? Will I be able to maintain the same user experience that you get with Interface Builder? ...

What's "in" and "out" of OpenGL-ES? (Porting from OpenGL)

It seems that all of the documentation I can find about OpenGL-ES says something to the effect of "OpenGL-ES is just like OpenGL, but without a lot of stuff. For example, there's no glBegin or glEnd." Ok, that's great. So, what ELSE isn't there any of? Or is there a list of what's in? Or maybe a porting guide? (Specifically, I'm tr...

BlendFunc for textured fonts with changing background

I am attempting to use Textured fonts as so that I can display text in my openGL scene. However I am having trouble finding glBlendFunc values that will work. The background that the text will be placed on is a grayscale image but will change throughout the execution. Because the background changes the text could possibly be on top of ...

OpenGL background transparency?

I'm using QT's QGLFramebufferObject for off-screen rendering. After rendering to the buffer I read the result using glReadPixels() The problem is that sometimes the background color I read is just 0 (transparent black) and sometimes it is 0xFF000000 (opaque black) This seem to be related to the time the buffer is initialized. If the buff...

Finding Rotation Angles between 3d points

I am writing a program that will draw a solid along the curve of a spline. I am using visual studio 2005, and writing in C++ for OpenGL. I'm using FLTK to open my windows (fast and light toolkit). I currently have an algorithm that will draw a Cardinal Cubic Spline, given a set of control points, by breaking the intervals between the po...

Convert Bitmap to Polygon - (Reverse-Rasterizing)

Given a bitmap image with some blots of solid color on it, what algorithm would you employ to construct polygons in the same shape as the blots? This can be done in multiple steps: a high-resolution polygon could be later cut down by a best fit algorithm. Bonus points if you can tell me how to cut the resulting polygons into convex com...

OpenGL include directives on OS X

I am a bit confused why this code compiles. I leave out the "necessary" #include <OpenGL/gl.h> and still the program can compile. How is this possible when my program is calling functions from the GL library, without including them. int main(int argc, char** argv) { glClearColor(1.0,1.0,1.0,1.0); return 0; } I use this comp...

Invalid lock sequence error in an OpenSceneGraph application

I have an application that is built against OpenSceneGraph (2.6.1) and therefore indirectly OpenGL. The application initializes and begins to run, but then I get the following exception "attempt was made to execute an invalid lock sequence" in OpenGL32.dll. When I re-run it, I sometimes get this exception, and sometimes an exception abou...

Where can I find a good tutorial on OpenGL using Java?

Where can I find good tutorials for OpenGL programming using Java? ...

Where can I find sample code on mouse movements and polygon spins in OpenGL?

Where can I find sample code on mouse movements and polygon spins in OpenGL? I am using Java, so sample code in Java is preferred. ...