View Full Version : Frustum Culling Tutorial Available
If anyone is interested, I've written up a small tutorial on Frustum Culling with OpenGL. It provides code for extracting the current frustum planes and routines to test points, spheres, and cubes against the frustum.
I think it's fairly easy to follow, and it even includes a demo (source and Windows EXE are included as well).
You can access it here (http://www.markmorley.com/opengl/frustumculling.html) .
Feedback would be appreciated, especially if you spot any mistakes.
I played with the demo (in software mode and windowed) and it's pretty cool http://www.opengl.org/discussion_boards/ubb/smile.gif Thanks for making it available.
Incidentally, is there a way to run accelerated but still be windowed? I mean give opengl a small window like 500x500 (low resolution not to run out of video memory) but keep the same 1024x768 desktop resolution. I can do it in DirectX7 but opengl seems to construct its buffers using desktop settings (1024x768) and not the 500x500 settings. Anyone??? http://www.opengl.org/discussion_boards/ubb/smile.gif Thanks.
12-10-2000, 11:44 AM
On most consumer cards, the default is to allocate a buffer that is just the size of the window.
It's mostly professional cards that allocate an entire-desktop-sized window and share it between windows.
The answer to how to turn this on/off depends a lot on what you are using.
Thanks matt for your insights http://www.opengl.org/discussion_boards/ubb/smile.gif
I'm using 4MB 3DLabs Permedia2 video card. Are NVidia cards able to allocate buffers based on window size and not on desktop size? BTW, I love your developer's site.
12-10-2000, 12:30 PM
The default for all our cards is as I said before -- our consumer cards all allocate window-sized buffers, and the Quadro cards allocate shared fullscreen buffers (termed UBB -- unified back/depth buffers). There are a few exceptions to these defaults, but they are mostly in OEM systems.
There are a lot of advantages and disadvantages to doing it each way, and it's probably not appropriate for me to go into detail on this. You can probably figure out some of them on your own.
Some of our products support UBB and others do not. If it's supported, you can easily switch it on and off (it's in the control panel).
12-11-2000, 10:25 AM
I liked that tutorial; it was a lot of help. On a related note, although the solution seems obvious, I can't quite figure out how to determine the camera's position given either the projection matrix and/or the camera's rotation and translation *relative to its rotation*. In other words, I call glRotate before calling glTranslate. This isn't important for view-frustum culling, but I do need it for other things.
Powered by vBulletin® Version 4.2.3 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.