![]() | ![]() | ![]() | Gtk OpenGL Toolkit (gtkogltk) Reference Manual | ![]() |
---|
#include <ogltk/glt_color.h> struct glt_color; gltColor* glt_color_new (void); gltColor* glt_color_new_color (gfloat red, gfloat green, gfloat blue, gfloat alpha); gboolean glt_color_destroy (gltColor *color); gboolean glt_color_set_gl (gltColor *color, gfloat red, gfloat green, gfloat blue, gfloat alpha); gboolean glt_color_draw (gltColor *color); #define glt_color_get_red (c) #define glt_color_get_green (c) #define glt_color_get_blue (c) #define glt_color_get_alpha (c) #define glt_color_set_red_gl (c,v) #define glt_color_set_green_gl (c,v) #define glt_color_set_blue_gl (c,v) #define glt_color_set_alpha_gl (c,v)
gltColor* glt_color_new (void);
Create a new instance of an OpenGL color object with default colors.
Returns : | new gltColor instance. |
gltColor* glt_color_new_color (gfloat red, gfloat green, gfloat blue, gfloat alpha);
Create a new instance of an OpenGL color object.
red : | Red value for this color. |
green : | Green value for this color. |
blue : | Blue value for this color. |
alpha : | Alpha (intensity) value for this color. |
Returns : | new gltColor instance. |
gboolean glt_color_destroy (gltColor *color);
Destroy/Unallocate the instance of the gltColor object.
color : | gltColor object |
Returns : | True if destroyed. |
gboolean glt_color_set_gl (gltColor *color, gfloat red, gfloat green, gfloat blue, gfloat alpha);
Set all color components in the gltColor object.
color : | gltColor object |
red : | Red value for this color. |
green : | Green value for this color. |
blue : | Blue value for this color. |
alpha : | Alpha (intensity) value for this color. |
Returns : | True if set. |
gboolean glt_color_draw (gltColor *color);
Draw the gltColor to the OpenGL state machine.
color : | gltColor object |
Returns : | True if successful. |
#define glt_color_get_red(c) (gfloat)(c->red)
Get the red component in the gltColor object.
c : | gltColor object |
#define glt_color_get_green(c) (gfloat)(c->green)
Get the green component in the gltColor object.
c : | gltColor object |
#define glt_color_get_blue(c) (gfloat)(c->blue)
Get the blue component in the gltColor object.
c : | gltColor object |
#define glt_color_get_alpha(c) (gfloat)(c->alpha)
Get the alpha (intensity) component in the gltColor object.
c : | gltColor object |
#define glt_color_set_red_gl(c,v) c->red = v
Set the red component in the gltColor object.
c : | gltColor object |
v : | Color Value |
#define glt_color_set_green_gl(c,v) c->green = v
Set the green component in the gltColor object.
c : | gltColor object |
v : | Color Value |
#define glt_color_set_blue_gl(c,v) c->blue = v
Set the blue component in the gltColor object.
c : | gltColor object |
v : | Color Value |
<<< Ogltk Type Reference | glt-matrix >>> |