frustum

Optimize Frustum Culling

i am writing a game in C++ and have a level consisting of many seperate meshes, each with their own vertex buffer. i am using vmmlib ( brilliant free gl compat. vector/matrix library ) to create my frustum culler and testing it against the bounding sphere of every mesh in the level. sadly my level can consist of up to 800 meshes and iter...

opengl frustum culling without glGet* calls

Various examples of view frustum calculations are using glGetFloatv() to get the current projection and modelview matrices (GL_PROJECTION_MATRIX, GL_MODELVIEW_MATRIX), and based of that do some view frustum culling. I have read that glGet* is something you do not want in your main render loop; "Using "Get" or "Is" functions slows ...

Determining visible area from globe frustum

I'm working with a mapping application (worldwind) and trying to determine the minimum and maximum latitudes and longitudes that are currently displayed. I have access to the frustum, but I'm not sure how to account for the fact that the globe can have its heading and/or pitch changed. Any help on this problem would be appreciated. than...

How do you use glFrustrum in OpenGL ES1 on iPhone

So I am using Xcode 3.2.1 and am trying to make an iPhone OpenGL ES1 project. The default template for an opengl project is ok, but I have been trying to split the code up so not everything is done per frame on the drawView() call. I have a seperate setupRC method that sets the lighting, turns on depth test, turns on culling and sets t...

Determining intersection with frustum in GLScene

Hello, using GLScene in delphi I need to find the intersection between an object (a line or plane is enough) and the visible space, to determine what part of this object is currently showing. I tried getting the view frustum but I couldn't find how. I was thinking of using camera's position, direction and field of view, but I suspect the...

What values to use in my 3D-space

Hello, This is not really a functional problem I'm having but more a strategic question. I am new to 3D-programming and when looking at tutorials and examples I recon that the coordinates are usually between -1 and 1. It feels more natural using integers as coordinates, I think. Is there any particula reason(s) why small float-values...

Finding a minimum bounding sphere for a frustum

I have a frustum (truncated pyramid) and I need to compute a bounding sphere for this frustum that's as small as possible. I can choose the centre to be right in the centre of the frustum and the radius be the distance to one of the "far" corners, but that usually leaves quite a lot of slack around the narrow end of the frustum This see...

width of a frustum at a given distance from the near plane

I'm using CML to manage the 3D math in an OpenGL-based interface project I'm making for work. I need to know the width of the viewing frustum at a given distance from the eye point, which is kept as a part of a 4x4 matrix that represents the camera. My goal is to position gui objects along the apparent edge of the viewport, but at some d...

How to set the viewing volume in OpenGL ES for an iPhone AR app?

I'd like to add an OpenGL ES view as an overlay to my camera view. From this question and its anser I came to know the two field angles of the iPhone 4 rear camera. How can I properly set the volume view and its perspective in the OpenGL ES view? Shall I use glFrustum or glOrthof? (I've seen that gluPerspective takes just one angle as...