[About] [News] [Documentation] [Screenshots]


bugle-camera — allow the camera to be manipulated


filterset camera [key inactive]
    speed "1.0"
    mouse_dga "no"


This filter-set allows you to take over the camera in an OpenGL application and move it about. This is particularly useful for testing visibility culling and level-of-detail (LOD), as these will not change as the camera is moved.

To use it, make sure it is activated, then move to the mouse to control the camera angle and the Up, Down, Left and Right keys to move the viewpoint. The camera model is a free camera, so it will not maintain a defined up direction. There are a few other useful keys, described in the section called “Options”.

This filter-set supports activation and deactivation; the recommended use is to have it initially inactive and use a key to take over control when desired (see bugle(3)).

Since this filter-set is based on modifying OpenGL state without telling the application, there are significant limitations:

  • The projection matrix, and in particular, the near and far clip planes, are not altered. Thus, trying to move in too close or out too far could cause objects to be clipped away.

  • Various fancy rendering techniques involve rendering a quad that is carefully aligned to the screen; altering the camera will break such techniques. There is ultimately no general fix as it is impossible to know when an application is dealing with the real world. If you are writing such an application and wish it to work with this filter-set, you should use a vertex program that ignores the model-view matrix in situations where you do not want this filter-set to interfere.

  • Applications that rely on the feedback buffer are likely to break.



This is a boolean option which should be enabled when debugging an application that uses XDGA(3) to get relative motion data from the mouse. If the camera goes all over the place as soon as you move the mouse, try enabling this option (SDL-based applications are the main culprits).


This sets the speed at which the camera moves. Since each application has a different scale, you will need to adjust the value for each application (but dynamic control is also possible; see below).

key_forward, key_back, key_left, key_right

These are the keys for moving the camera. They default to the arrow keys.

key_faster, key_slower

These keys control the speed of the camera, doubling or halving it respectively. They default to PageUp and PageDown.


This key cancels any alterations made, restoring the camera to where the application thinks it is. There is no default.


This key alternately releases and recaptures the mouse. It can be useful if you need to use the mouse in another window without completely disabling the filter-set (which would also restore the camera position). There is no default.

This toggles display of the original view frustum. If this driver supports GL_NV_depth_clamp, depth clamping is used to prevent the frustum from being clipped to the near and far clip planes. There is no default.


bugle is written and maintained by Bruce Merry.

See also


Get BuGLe at SourceForge.net. Fast, secure and Free Open Source software downloads