I'm currently running into a problem regarding animation in OpenGL. I have between 200 and 10000 gears on the screen at a time all rotating. When the window is not in maximized view, my CPU runs at about 10-20 % consistently. No spikes, no stuttering in the animation, it runs perfectly smooth regardless of the number of gears on screen. ...
Hello!
At university we have introduction to OpenGL and it's first time I'm working with it. So far I have implemented simple thing like Sierpinski carpet and I noticed that most of (both fixed and floating point) calculations are performed on CPU. Does OpenGL provide some API, which can "forward" these calculations to GPU?
I know, tha...
so how? my app is running at 60FPS, but i want 30.
...
Hi All,
I am working on a Opengl based 2D CAD software which requires heavy use of hardware OpenGL acceleator (pushing 250 million vertex per second at times). Here is my problem.... whenever the viewport is stagnant for more than 10 seconds, the Opengl accelerator (Geforce 9800 GT in this case) goes to a inactive mode. When the viewpor...
I am trying to render a two-dimensional half-plane in OpenGL with the following code:
void renderHalfplane(double *x, double *n)
{
glPushMatrix();
double theta = -360.0 * atan2(n[0], n[1])/(2.0*PI);
glTranslated(x[0], x[1], 0);
glRotated(theta, 0, 0, 1.0);
glBegin(GL_TRIANGLES);
glVertex4d(0.0, 0.0, 0.0, 1.0);
glVertex4d...
Hi,
I am programming in OpenGL and C++. I know 2 points on 1 line ( a diagonal line) and wish to rotate an object around that diagonal line. How can I go about doing this? I know how to use glrotatef to rotate it around the x, y or z axis but am not sure about this
Thanks
Jessica
...
Hi my program is supposed to display a solid red colored sphere in the center of the screen, all i am getting is the boundary of the sphere :
int main(int argc, char **argv) {
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_DOUBLE|GLUT_RGBA);
glutInitWindowSize(800,600);
glutInitWindowPosition(0,0);
glutCreateWindow("Sphere")...
(perhaps this is better for a math Stack Exchange?)
I have a chain composed of bones. Each bone has a with a tip and tail. The following code computes where its tip will be, given a rotation, and sets the next link in the chain's position appropriately:
// Quaternion is a hand-rolled class that works correctly (as far as I can tell...
This seems insane, but I've been able to reproduce an issue where my JOGL app crashes if I'm not using an external monitor. All I do is start the app, and it immediately becomes unresponsive. If I plug in an external monitor, the problem disappears.
If I let the app run, then randomly pause it in a debugger, I get the following stack tr...
I'm trying to write a graphical effect where a circle moves around an image smudging the image as it goes (like the way the smudge tool in Gimp or Photoshop would work). The basic algorithm I'm using is:
the circle moves from position A to position B on the bitmap
copy a circle of pixels from position A into a temporary bitmap
draw thi...
I would like to see an example of rendering with nVidia Cg to an offscreen frame buffer object.
The computers I have access to have graphic cards but no monitors (or X server). So I want to render my stuff and output them as images on the disk. The graphic cards are GTX285.
...
I am attempting to use 3D textures to texture my randomly generated terrain. I want to be able to have many different terrain textures that blend between different areas. I can't seem to figure out what part of the texture the R coordinate will pick up. If I set it to 0.0 then it gives a blend of the texture from before 1.0 and after 0.0...
Hello All,
So I am trying to learn how to use glViewport(), "MULTIPLE TIMES". Below is my code, I have tried to follow others examples, but they are either so convoluted with other things not relevant to what I am doing or, I do not understand what they are doing. By the way I am using glut to manage my windowing system. So the best way...
Soya is a 3D game framework for python.
How can I change the cursor image to/from a different image?
...
I have this Java GUI application which uses OpenGL and Eclipse RCP + SWT running on a Linux (Fedora 7) machine equipped with Pentium P or Core 2 Duo CPU. It supposed to run and accept user input for months.
After a few weeks of running the whole interface freezes without reason. Mouse is very slow and keyboard stops responding shortly....
Is there a way to set the blending parameters so the whole scene renders in grayscale? (without using GLSL, only pipeline functions)
Thanks
...
I have a project that I have been coding on OS X that I am now trying to get building on Windows. I have set up MinGW, created a makefile, and after a good deal of finagling everything compiles, however when it gets to the linker step a great number of errors occur along the lines of:
SourceFile.cpp:(.text+0x1809): undefined reference t...
I'm trying to compile a OpenGL program on my MacBook and can't figure out how to convert this makefile.
CFLAGS= -I/usr/X11R6/include -I/usr/local/include
LDFLAGS= -L/usr/X11R6/lib -L/usr/local/lib -lGL -lGLU -lm -lglut
BINARIES=q2
all: $(BINARIES)
clean:
-rm *.o $(BINARIES)
q2 : q2.o
g++ $(LDFLAGS) $^ -o q2
q2.o: q2.cpp
g+...
Hello!
Is it ok to use both OpenGL an OpenCL in one program? Both operate on GPU and I'm afraid how switching between OpenCL and OpenGL is handled in "background" (e.g. registers are overwritten).
I'm using Linux working on computer with some nVidia graphic 8k, so i can use OpenCL implemented on top of the CUDA.
...
NOTE: Please read the whole thing before posting, you'll see why.
So I have an OpenGL/WinAPI application. I'm doing what you would expect, by doing cycles of handling messages, then rendering a frame, handling messages, rendering frame...
The trouble is, when I resize or move a window, the screen freezes, and it can look quite ugly. I ...