blob: 24dcf5ed0c4c3bd2f8810d45dff636bd897b9f07 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
/*
* ============================================================
* FILE: render.h
*
* PURPOSE: Public interface for drawing a frame. Rendering only READS game
* state; it never changes the player, the camera or the world.
*
* FITS IN: main.c calls render_init() after window_init(), render_frame()
* once per display frame, and render_shutdown() before
* window_shutdown().
*
* INTERFACE: Use these exact signatures:
*
* bool render_init(void); compiles shaders, builds meshes. Returns
* false (after printing why) on failure.
* void render_frame(const Camera *cam, const Player *player, float aspect);
* void render_shutdown(void); frees GL objects
*
* Include <stdbool.h>, "camera.h", "player.h".
*
* CONVENTIONS: Include guard: RENDER_H.
*
* NOT IN SCOPE: A general renderer / scene graph, materials, textures, text.
*
* DONE WHEN: main.c can draw everything with these three calls.
* ============================================================
*/
#ifndef RENDER_H
#define RENDER_H
#include <stdbool.h>
#include "camera.h"
#include "player.h"
bool render_init(void);
void render_frame(const Camera *cam, const Player *player, float aspect);
void render_shutdown(void);
#endif /* RENDER_H */
|