This repository has been archived on 2023-05-27. You can view files and clone it, but cannot push or open issues or pull requests.
api8/includes/utils.h

36 lines
670 B
C
Raw Normal View History

2023-05-08 13:10:39 +02:00
#ifndef DEMO_UTILS_H
#define DEMO_UTILS_H 1
2023-05-08 14:35:36 +02:00
#include <GL4D/gl4duw_SDL2.h>
2023-05-21 08:16:16 +02:00
#include <SDL_image.h>
2023-05-12 16:00:17 +02:00
#include <string.h>
2023-05-08 13:10:39 +02:00
// Récupère un delta-temps
2023-05-08 13:41:32 +02:00
double get_dt(double *, GLboolean);
2023-05-08 13:10:39 +02:00
2023-05-08 14:35:36 +02:00
// Bind and load a matrix
void bindAndLoadf(const char *name);
2023-05-12 13:49:33 +02:00
/* Move something in space
*
2023-05-12 17:46:25 +02:00
* `+x` => movement to right
2023-05-12 13:49:33 +02:00
*
2023-05-12 17:46:25 +02:00
* `-x` => movement to left
2023-05-12 13:49:33 +02:00
*
2023-05-12 17:46:25 +02:00
* `+y` => movement to top (fly)
2023-05-12 13:49:33 +02:00
*
2023-05-12 17:46:25 +02:00
* `-y` => movement to bottom (sink)
2023-05-12 13:49:33 +02:00
*
2023-05-12 17:46:25 +02:00
* `+z` => move closer
2023-05-12 13:49:33 +02:00
*
2023-05-12 17:46:25 +02:00
* `-z` => move away */
2023-05-12 16:42:51 +02:00
void move(GLfloat x, GLfloat y, GLfloat z);
2023-05-12 13:49:33 +02:00
2023-05-21 08:16:16 +02:00
// Rotate a vector XYZ
2023-05-19 11:13:37 +02:00
void rotate_vec(GLfloat *, GLfloat);
2023-05-21 08:16:16 +02:00
// Load an image into a GL texture
void load_img(const char *filename, GLuint texture);
2023-05-08 13:10:39 +02:00
#endif