gKit2 light
Toggle main menu visibility
Loading...
Searching...
No Matches
src
gKit
text.h
Go to the documentation of this file.
1
2
#ifndef _TEXT_H
3
#define _TEXT_H
4
5
#include "glcore.h"
6
7
#include "
color.h
"
8
9
12
52
61
struct
Text
62
{
63
Text( ) :
color
(
White
() ),
font
(0),
program
(0),
vao
(0),
ubo
(0) {}
64
65
int
buffer[24][128];
66
Color
color
;
67
GLuint
font
;
68
GLuint
program
;
69
GLuint
vao
;
70
GLuint
ubo
;
71
};
72
74
Text
create_text
( );
76
void
release_text
(
Text
& text );
77
78
79
81
void
clear
(
Text
& text );
83
void
print_background
(
Text
& text,
const
int
x,
const
int
y,
const
int
background,
const
char
c );
85
void
print_background
(
Text
& text,
const
int
x,
const
int
y,
const
char
*message );
87
void
print
(
Text
& text,
const
int
x,
const
int
y,
const
char
*message );
89
void
printf_background
(
Text
& text,
const
int
x,
const
int
y,
const
char
*format, ... );
91
void
printf
(
Text
& text,
const
int
x,
const
int
y,
const
char
*format, ... );
92
94
void
default_color
(
Text
& text,
const
Color
& color );
95
97
void
draw
(
const
Text
& text,
const
int
width,
const
int
height );
98
100
#endif
color.h
clear
void clear(Text &text)
efface le contenu de la console.
Definition
text.cpp:72
printf
void printf(Text &text, const int x, const int y, const char *format,...)
affiche un texte a la position x, y. meme utilisation que printf().
Definition
text.cpp:140
create_text
Text create_text()
cree une console. a detruire avec release_text( ).
Definition
text.cpp:14
draw
void draw(const Text &text, const int width, const int height)
dessine la console.
Definition
text.cpp:158
print
void print(Text &text, const int x, const int y, const char *message)
affiche un texte a la position x, y.
Definition
text.cpp:122
default_color
void default_color(Text &text, const Color &color)
choisit une couleur par defaut pour le texte.
Definition
text.cpp:153
release_text
void release_text(Text &text)
detruit une console.
Definition
text.cpp:64
print_background
void print_background(Text &text, const int x, const int y, const int background, const char c)
affiche un caractere c sur un fond background.
Definition
text.cpp:106
printf_background
void printf_background(Text &text, const int x, const int y, const char *format,...)
affiche un texte a la position x, y sur un fond par defaut.
Definition
text.cpp:127
White
Color White()
utilitaire. renvoie une couleur blanche.
Definition
color.cpp:23
Color
representation d'une couleur (rgba) transparente ou opaque.
Definition
color.h:14
Text
Definition
text.h:62
Text::font
GLuint font
texture contenant les caracteres.
Definition
text.h:67
Text::vao
GLuint vao
vertex array object.
Definition
text.h:69
Text::ubo
GLuint ubo
uniform buffer object, pour transferrer le texte a afficher
Definition
text.h:70
Text::program
GLuint program
shader pour afficher le texte.
Definition
text.h:68
Text::color
Color color
couleur du texte.
Definition
text.h:66
Generated on
for gKit2 light by
1.17.0