![]() | ![]() | ![]() | Gtk OpenGL Toolkit (gtkogltk) Reference Manual | ![]() |
---|
#include <ogltk/view3D.h> struct ogltk_view3D; GtkWidget* ogltk_view3D_new (gboolean direct, OGLTKConfigMode config, OGLTKRenderType render, gfloat near, gfloat far); gboolean ogltk_view3D_set_perspective (ogltk_view3D *view3d, gfloat near, gfloat far);
This modules creates and returns a visible GTK widget which provides an OpenGL perspective view.
Perspective projections give the viewer the sense of depth with objects. This means that objects father away are smaller then the ones closer and objects with the same logical dimensions appear larger at the front then the back.
struct ogltk_view3D { ogltk_view parent_instance; gfloat per_near; gfloat per_far; };
GtkWidget* ogltk_view3D_new (gboolean direct, OGLTKConfigMode config, OGLTKRenderType render, gfloat near, gfloat far);
Creates an OpenGL perspective window to which it's to be placed in a GTK Application.
direct : | Enable direct drawing |
config : | A Bitmask of fields for window characteristics |
render : | Color Rendering type |
near : | Near clipping plane |
far : | Far clipping plane |
Returns : | *GtkWidget |
gboolean ogltk_view3D_set_perspective (ogltk_view3D *view3d, gfloat near, gfloat far);
Set the near and far clipping planes for the perspective view.
view3d : | An ogltk 3D view object. |
near : | Specify which material property should follow the current color. |
far : | Specify which sides should follow the current color |
Returns : | TRUE if clipping planes have been set. |
<<< View and Scene Reference | ogltk-2Dview >>> |