opengl

Ogre3d restoreConfig causes app to hang on Ubuntu

Building an app for Ubuntu using Ogre3D, CEGUI, OIS which is now all compiling and running as expected. Having got the basic app running I decided to now build a custom config file which I can store both graphics settings (ie. resolution, fullscreen, etc) as well as other configurable settings I will need in the app down the track. As a...

Why does OpenGL use degrees instead of radians?

The OpenGL designers were never afraid of mathematics, and knowledge of linear algebra is essential for all but the simplest OpenGL applications. I think it can safely be assumed that OpenGL programmers are familiar with angles in radians. Mathematically, radians are more elegant than degrees in every respect. They also have practical a...

Java OpenGL line drawing with vertex buffers

Hi, I'm trying to draw many lines on the screen at the same time using OpenGL line strips and performance is slow, and it was suggested I use a vertex buffer. I'm new to vertex buffers - do I need a new one for each line I want to draw, or do I use a single buffer for all of the lines (they are not necessarily connected to each other)? A...

GL rendering thread on the iphone, is it worth it?

I am new to iphone and haven't done any threading on it at all. It seems that calls to drawElements are taking a big chunk of my processing time, so it makes me think that a large amount of rendering is being done before the code is allowed to continue past the call. does anyone know how the parallelism of openGL works? or how it works ...

Is it correct to load openGL textures like this ?

Hi guys, I started some months ago an OpenGL project which became larger and larger... I began with the crashLanding sample and i use Texture2D. I also use a singleton class to load my textures, and here is what the texture load looks like : //Load the background texture and configure it _textures[kTexture_Background] = [[Texture2D a...

How should I organize OpenGL ES 1.x 2D layer tree?

I'm developing a cute puzzle app - http://gotoandplay.freeblog.hu/categories/compactTangram/ - , and for performance reasons I decided to render the view with OpenGL. I started to learning it, I'm ok with buffers, vertices, textures in a really basic way. The situation: In the game user manipulates 7 puzzlePiece, each has 5 sublayers to...

Are there any easy ways to generate OpenGL code for drawing shapes from a GUI?

I have enjoyed learning to use OpenGL under the context of games programming, and I have experimented with creating small shapes. I'm wondering if there are any resources or apps that will generate code similar to the following with a simple paint-like interface. glColor3f(1.0, 0.0, 0.0); glBegin(GL_LINE_STRIP); glVertex2f(1, 0); glVert...

How to collapse five OpenGL textures into one?

I want to merge 5 "sublayers" to one single texture (you know, somethin' like Flatten Image in Photoshop) in OpenGL ES 1.x iPhone. I'm new to OpenGL, and just haven't find the answer yet. ...

Any undersandable description of glTexEnvi (OpenGL ES 1.x)?

I've seen as many different parameters as many source codes I saw. Is there a description can be found somewhere that refers all about those parameters in details? ...

Creating UIImage with per-pixel alpha from GL buffer

Hi, I'm trying to take my gl buffer and turn it into a UIImage while retaining the per-pixel alpha within that gl buffer. It doesn't seem to work, as the result I'm getting is the buffer w/o alpha. Can anyone help? I feel like I must be missing a few key steps somewhere. I would really love any advice on this. Basically I do: //Rea...

FPS how calculate this?

In my OpenGL book, it says this: "What often happens on such a system is that the frame is too complicated to draw in 1/60 second, so each frame is displayed more than once. If, for example, it takes 1/45 second to draw a frame, you get 30 fps, and the graphics are idle for 1/30 1/45 = 1/90 second per frame, or one-third of t...

Best way to display diagnostic text in Windows OpenGL

I have an artsy opengl app that I am working on. The final product will have no need to display text. But during developement I want to display odd bits of data for diagnostic purposes, like framerate, object count. I would like the rendering of the text not to dramatically decrease the performance of the code. I realize this is a mi...

How to capture accurate framerate in OpenGL

What is a good way to get an accurate framerate (frames per second) in native windows opengl c++? ...

OpenGL suppresses exceptions in MFC dialog-based application

Hello. I have an MFC-driven dialog-based application created with MSVS2005. Here is my problem step by step. I have button on my dialog and corresponding click-handler with code like this: int* i = 0; *i = 3; I'm running debug version of program and when I click on the button, Visual Studio catches focus and alerts "Access violation ...

Tao OpenGL Framework SimpleOpenGLControl - When will it redraw, when won't it?

I think my last question may have been to specific, so ignoring that one all together, I have a new question that is more general: I am using C# with Visual Studio Express 2008. I am also using the Tao Framework OpenGL dlls. What actually causes the SimpleOpenGLControl to redraw when I need it to redraw? When the SimpleOpenGLControl r...

How to use GLUT not in main thread on OS X ?

I once tried to open a GLUT window from a sub-thread and got lots of nasty problems. I remember this post on lists.apple.com: GLUT functions may only be called from the application's main thread Has anything changed in this regard with GLUT on Mac OS X ? Is there a thread-safe GLUT that let's you open windows from any thread ? If GLU...

MacOSX Glut MainLoopEvent ?

On lnux, using freeglut, I have MainLoopEvent(); Now, I'm programming on the Mac, and I don't see it. Is there anyway to get MainLoopEvent() on the Mac with Glut? Thanks! ...

Why does OpenGL have global functions?

Hi there , Why isn't openGL object-orientied? Everybody teaches Object Orientated Programming + Design Patterns, but OpenGL has many global functions. Isn't this bad style? ...

Cocoa OpenGL window in pure C?

I want to open an OpenGL window ( to display and grab keystrokes / mouse events ) in MacOSX. I don't want to use Glut (since it demandds it be the root thread). I don't want to learn Objective C. Is there anyway to access the OpenGL api in pure C? Thanks! ...

OpenGL frame buffer slow and spontaneously stalls. Can even cause a system crash when used extensively.

Apparently frame buffers are fast and the best way to render offscreen to textures or to simply pre-create things. My game however is not liking them at all. In the current code frame buffers are used often, sometimes each frame, several times. When used the game begins to slow down but not instantly. It seems to take time (Perhaps a bu...