atomes 1.1.15
atomes: an atomic scale modeling tool box
|
Functions to prepare OpenGL rendering for text. More...
Go to the source code of this file.
Macros | |
#define | PANGO_TEXT_SIZE 500 |
#define | OUTLINE_WIDTH 3 |
#define | GL_CLAMP_TO_EDGE 0x812F |
#define | GL_TEXTURE_WRAP_R 0x8072 |
Functions | |
void | update_string_instances (glsl_program *glsl, object_3d *obj) |
Update OpenGL string texture instances. | |
int * | paint_bitmap (vec4_t color, GLfloat a, int cw, int ch, unsigned char *buff) |
paint bitmap data using color | |
object_3d * | create_string_texture (int cwidth, int cheight, int *pixels) |
OpenGL 3D string object rendering. | |
object_3d * | gl_pango_render_layout (PangoLayout *layout, GLenum texture, int id, screen_string *this_string) |
OpenGL 3D pango layout object rendering. | |
ColRGBA * | opposite_color (ColRGBA col) |
compute the opposite color | |
void | render_string (int glsl, int id, screen_string *this_string) |
render a screen string | |
void | debug_string (screen_string *this_string) |
debug screen string data | |
void | render_all_strings (int glsl, int id) |
render all string to be rendered for a label list | |
screen_string * | was_not_rendered_already (char *word, screen_string *list) |
check if a string was not already rendered and the corresponding screen string created | |
void | add_string_instance (screen_string *string, vec3_t pos, atom *at, atom *bt, atom *ct) |
add an instance to a screen string | |
void | add_string (char *text, int id, ColRGBA col, vec3_t pos, float lshift[3], atom *at, atom *bt, atom *ct) |
Add a screen string to the list of screen string to render. | |
void | prepare_string (char *text, int id, ColRGBA col, vec3_t pos, float lshift[3], atom *at, atom *bt, atom *ct) |
prepare a screen string to be rendered | |
Variables | |
int | measures_drawing |
int | type_of_measure |
GLuint | textures_id [2] |
const int | OUTLINE_BRUSH [2 *OUTLINE_WIDTH+1][2 *OUTLINE_WIDTH+1] |
gboolean | render_format |
Functions to prepare OpenGL rendering for text.
Definition in file ogl_text.c.
#define GL_CLAMP_TO_EDGE 0x812F |
Definition at line 59 of file ogl_text.c.
#define GL_TEXTURE_WRAP_R 0x8072 |
Definition at line 63 of file ogl_text.c.
#define OUTLINE_WIDTH 3 |
Definition at line 56 of file ogl_text.c.
#define PANGO_TEXT_SIZE 500 |
Definition at line 55 of file ogl_text.c.
void add_string | ( | char * | text, |
int | id, | ||
ColRGBA | col, | ||
vec3_t | pos, | ||
float | lshift[3], | ||
atom * | at, | ||
atom * | bt, | ||
atom * | ct ) |
Add a screen string to the list of screen string to render.
text | the text to render |
id | the label id |
col | the color |
pos | the position |
lshift | label position shift on x, y and z, if any |
at | the 1st atom, if any (bond or angle measure string) |
bt | the 2nd atom, if any (bond or angle measure string) |
ct | the 3rd atom, if any (angle measure string) |
Definition at line 655 of file ogl_text.c.
void add_string_instance | ( | screen_string * | string, |
vec3_t | pos, | ||
atom * | at, | ||
atom * | bt, | ||
atom * | ct ) |
add an instance to a screen string
string | the screen string to increase |
pos | the position |
at | the 1st atom, if any (bond or angle measure string) |
bt | the 2nd atom, if any (bond or angle measure string) |
ct | the 3rd atom, if any (angle measure string) |
Definition at line 601 of file ogl_text.c.
object_3d * create_string_texture | ( | int | cwidth, |
int | cheight, | ||
int * | pixels ) |
OpenGL 3D string object rendering.
cwidth | width |
cheight | height |
pixels | the data to render |
Definition at line 183 of file ogl_text.c.
void debug_string | ( | screen_string * | this_string | ) |
object_3d * gl_pango_render_layout | ( | PangoLayout * | layout, |
GLenum | texture, | ||
int | id, | ||
screen_string * | this_string ) |
OpenGL 3D pango layout object rendering.
layout | the Pango layout |
texture | the OpenGL texture type |
id | the label id |
this_string | the screen string |
Definition at line 298 of file ogl_text.c.
int * paint_bitmap | ( | vec4_t | color, |
GLfloat | a, | ||
int | cw, | ||
int | ch, | ||
unsigned char * | buff ) |
paint bitmap data using color
color | the color |
a | opacity |
cw | width |
ch | height |
buff | the data to paint |
Definition at line 117 of file ogl_text.c.
void prepare_string | ( | char * | text, |
int | id, | ||
ColRGBA | col, | ||
vec3_t | pos, | ||
float | lshift[3], | ||
atom * | at, | ||
atom * | bt, | ||
atom * | ct ) |
prepare a screen string to be rendered
text | the text to render |
id | the label id |
col | the color |
pos | the position |
lshift | label position shift on x, y and z, if any |
at | the 1st atom, if any (bond or angle measure string) |
bt | the 2nd atom, if any (bond or angle measure string) |
ct | the 3rd atom, if any (angle measure string) |
Definition at line 691 of file ogl_text.c.
void render_all_strings | ( | int | glsl, |
int | id ) |
render all string to be rendered for a label list
glsl | shader id |
id | label id |
Definition at line 549 of file ogl_text.c.
void render_string | ( | int | glsl, |
int | id, | ||
screen_string * | this_string ) |
render a screen string
glsl | the shader id |
id | the label id |
this_string | the screen string to render |
Definition at line 418 of file ogl_text.c.
|
extern |
Update OpenGL string texture instances.
glsl | the target glsl |
obj |
Definition at line 414 of file ogl_shading.c.
screen_string * was_not_rendered_already | ( | char * | word, |
screen_string * | list ) |
check if a string was not already rendered and the corresponding screen string created
word | the string to render |
list | the screen string list |
Definition at line 571 of file ogl_text.c.
|
extern |
Definition at line 67 of file d_measures.c.
const int OUTLINE_BRUSH[2 *OUTLINE_WIDTH+1][2 *OUTLINE_WIDTH+1] |
Definition at line 72 of file ogl_text.c.
gboolean render_format |
Definition at line 172 of file ogl_text.c.
GLuint textures_id[2] |
Definition at line 70 of file ogl_text.c.
|
extern |
Definition at line 66 of file d_measures.c.