![]() | ![]() | ![]() | Gtk OpenGL Toolkit (gtkogltk) Reference Manual | ![]() |
---|
#include <ogltk/view2D.h> struct ogltk_view2D; GtkWidget* ogltk_view2D_new (gboolean direct, OGLTKConfigMode config, OGLTKRenderType render); gboolean ogltk_view2D_set_orth (ogltk_view2D *view2d, gfloat near, gfloat far); gboolean ogltk_view2D_set_ratio (ogltk_view2D *view2d, gfloat ratio);
This modules creates and returns a visible GTK widget which provides an OpenGL orthographic view.
Othrographic projections gives all objects the same size to the viewer. This means that objects father away are the same size as the ones closer.
struct ogltk_view2D { ogltk_view parent_instance; gfloat orth_near; gfloat orth_far; gfloat view_ratio; };
GtkWidget* ogltk_view2D_new (gboolean direct, OGLTKConfigMode config, OGLTKRenderType render);
Creates an OpenGL orthographic 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 |
Returns : | *GtkWidget |
gboolean ogltk_view2D_set_orth (ogltk_view2D *view2d, gfloat near, gfloat far);
Set the near and far clipping planes for the orthographic view.
view2d : | An ogltk 2D 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. |
gboolean ogltk_view2D_set_ratio (ogltk_view2D *view2d, gfloat ratio);
Set the view ratio to be calculated when the window is resized.
view2d : | An ogltk 2D view object. |
ratio : | Specify which sides should follow the current color |
Returns : | TRUE if ratio has been set. |
<<< ogltk-3Dview | ogltk-scene >>> |