opengl

Off screen rendering when laptop shuts screen down?

I have a lengthy number-crunching process which takes advantage of quite abit of OpenGL off-screen rendering. It all works well but when I leave it to work on its own while I go make a sandwich I would usually find that it crashed while I was away. I was able to determine that the crash occurs very close to the moment The laptop I'm usin...

Best modules to develop a simple windowed 3D modeling application?

I want to create a very basic 3D modeling tool. The application is supposed to be windowed and will need to respond to mouse click and drag events in the 3D viewport. I've decided on wxPython for the actual window since I'm fairly familiar with it already. However, I need to produce an OpenGL viewport that can respond to the various m...

Mixing OpenGL and GDI on Windows.

I'm trying to work out a way to mix OpenGL rendering and GDI in Windows. Previously I've been rendering my OpenGL contents into a framebuffer object, extracting it and then blitting it into the windows GDI graphics context and then drawing my GDI stuff over the top. This is really crippling the framerate. I'd like to do the opposite to ...

JMenus caused JOGL GLCanvas canvas to flicker

Clicking through JMenu options is causing my JOGL GLCanvas to flicker. The JMenu has the setDefaultLightWeightPopupEnabled set to false. I don't want to use JGLPanel because it runs slower (the application needs to run in full screen mode). Interesting, the flicker stops if I set sun.java2d.opengl=true on the command line. However,...

opengl slow on texture blit

I called this function once per frame and it took my FPS from >400 to 33. Why? sw blt(const PtRect *dstRect, Texture *src, const PtRect *srcRect, RenderDevice::bltFlags flags=RenderDevice::bltDefault) { assert(src); GL_Texture *glsrc = dynamic_cast<GL_Texture*>(src); if (glsrc == 0) return -1; PtRect srcRect2(0, 0, src->width, sr...

C makefile to compile OpenGL project directly on iphone

Please direct me if this question has already been asked; I did a search on the topic unable to find yet. I am having trouble putting together a makefile that will take one or more .c OpenGL project files, uses apple-arm-darwin9 and OpenGL framework to compile into object directly on the iphone (using bash). For some reason whatever com...

3ds max object to opengl.

I am trying to assemble a scene in opengl, using already made objects. The problem is that the object are in .max format and have no external textures. How could I import my objects in opengl, without retexturing them. I am thinking about exporting them to 3ds and using a 3ds file loader. Could you recommend one, and of course it has to ...

Texture Image processing on the GPU?

I'm rendering a certain scene into a texture and then I need to process that image in some simple way. How I'm doing this now is to read the texture using glReadPixels() and then process it on the CPU. This is however too slow so I was thinking about moving the processing to the GPU. The simplest setup to do this I could think of is t...

What is the preferred way to show large images in OpenGL

I've had this problem a couple of times. Let's say I want to display a splash-screen or something in an OpenGL context (or DirectX for that matter, it's more of a conceptual thing), now, I could either just load a 2048x2048 texture and hope that the graphics card will cope with it (most will nowadays I suppose), but growing with old-scho...

Recommended OpenGL debuggers for Windows?

If you have ever used an OpenGL debugger on Windows, which one(s) would you recommend and why? ...

Jogl Shader programming

I just started Shader programming(GLSL) and created a few with RenderMonkey. Now I want to use this Shaders in my java code. Are there any simple examples of how I do that? ...

VC++ compile errors when including gl.h

Compiling a file that uses OpenGL with Visual C++, when I try to include the gl.h header file I get about 150 unhelpful compile errors: error C2144: syntax error : 'void' should be preceded by ';' error C4430: missing type specifier - int assumed. Note: C++ does not support default-int error C2146: syntax error : missing ';' before id...

When are VBOs faster than "simple" OpenGL primitives (glBegin())?

After many years of hearing about Vertex Buffer Objects (VBOs), I finally decided to experiment with them (my stuff isn't normally performance critical, obviously...) I'll describe my experiment below, but to make a long story short, I'm seeing indistinguishable performance between "simple" direct mode (glBegin()/glEnd()), vertex array ...

How to achieve full-scene antialiasing on the iPhone

I would like to achieve FSAA on my OpenGL ES app on the iPhone. Currently I do this by rendering the scene to a texture that is twice the width and height of the screen. I then use the nice function: void glDrawTexiOES(GLint x, GLint y, GLint z, GLint width, GLint height); to draw the image resized to the screen resolution. Is there...

In OpenGL is there a way to get a list of all uniforms & attribs used by a shader program?

I'd like to get a list of all the uniforms & attribs used by a shader program object. glGetAttribLocation() & glGetUniformLocation() can be used to map a string to a location, but what I would really like is the list of strings without having to parse the glsl code. Thanks NeARAZ! Note: In OpenGL 2.0 glGetObjectParameteriv() is replac...

Most Common 3D Model Format?

It's been about two years since I last developed games, and I am interested in starting a new project. What is the most common open-source 3D model format? I am looking for a format that would preferably have a lot of either public domain or open-licensed models existing. Last I checked, MD5 was the most common animated model format, a...

opengl topdown<->bottomup textures?

When i load an image via FreeImage, the bits are bottom to top. My GL code expects all images to be topdown. Whats the best way to flip the image when i copy the bits to the texture? ...

GLWidget in QT only updating on mousemove

I am currently playing with QT trying to set up a small particle system. Therein I've subclassed the GLWidget and hacked away at it. Everything was going well until I made some unknown change and now the widget only repaints when I move the mouse (it should be doing it all the time due to the QTimer I have firing). Relevant code: Ope...

Why is this OpenGL ES code slow on iPhone?

I've slightly modified the iPhone SDK's GLSprite example while learning OpenGL ES and it turns out to be quite slow. Even in the simulator (on the hw worst) so I must be doing something wrong since it's only 400 textured triangles. const GLfloat spriteVertices[] = { 0.0f, 0.0f, 100.0f, 0.0f, 0.0f, 100.0f, 100.0f, 100.0f }; ...

Can two processes render to one OpenGL canvas ?

Hi, I have three different processes running on the same machine. One of them owns an OpenGL window. I would like the other two to be able to render (quickly) to different rectangular portions of the OpenGL window. If I can guarantee that they will nicely take turns executing OpenGL commands, is this possible? Many thanks Hugo Elias...