le premier shader, afficher un triangle et le deplacer, version App
More...
#include <fstream>
#include <sstream>
#include <string>
#include "glcore.h"
#include "app.h"
Go to the source code of this file.
|
| std::string | read (const char *filename) |
| int | main (int argc, char **argv) |
le premier shader, afficher un triangle et le deplacer, version App
Definition in file tuto2GL_app.cpp.
◆ read()
| std::string read |
( |
const char * | filename | ) |
|
Definition at line 33 of file tuto2GL_app.cpp.
34{
35 std::stringbuf source;
36 std::ifstream in(filename);
37
38 if(in.good() == false)
39 printf(
"[error] loading program '%s'...\n", filename);
40 else
41 printf(
"loading program '%s'...\n", filename);
42
43
44 in.get(source, 0);
45
46 return source.str();
47}
void printf(Text &text, const int px, const int py, const char *format,...)
affiche un texte a la position x, y. meme utilisation que printf().
◆ main()
| int main |
( |
int | argc, |
|
|
char ** | argv ) |
Definition at line 154 of file tuto2GL_app.cpp.
155{
158
159 return 0;
160}
int run()
execution de l'application.