Claude Chappe' Curse - A C Game
Logo Institut d'Informatique Claude Chappe Logo Université de Le Mans Logo Raeptor Production
 
Loading...
Searching...
No Matches
window.h
Go to the documentation of this file.
1#define SCREEN_WIDTH 800
2#define SCREEN_HEIGHT 600
3
4
5#ifndef WINDOW_H
6#define WINDOW_H
7
36
51typedef struct Window {
52 SDL_Window *sdl_window;
53 SDL_Surface *surface;
54 SDL_Surface *ui_surface;
56 SDL_GLContext opengl_ctx;
57 float startTime;
58 float time;
59 float lastTime;
60 vec4 fadeColor;
62} Window;
63
64struct WorldShaders;
65struct Node;
66struct Camera;
67struct DepthMap;
68
87s8 create_window(char *title, s32 x, s32 y, s32 width, s32 height, u32 flags, Window *window);
88
93
115void update_window(Window *window, struct Node *scene, struct Camera *c, struct WorldShaders *shaders, struct DepthMap *depthMap, struct Mesh *screenPlane);
116
126
137
// end of WindowManagement group
139
140#endif
#define u32
Alias for uint32_t (unsigned 32-bit integer).
Definition aliases.h:19
#define s8
Alias for int8_t (signed 8-bit integer).
Definition aliases.h:31
#define s32
Alias for int32_t (signed 32-bit integer).
Definition aliases.h:43
#define u8
Alias for uint8_t (unsigned 8-bit integer).
Definition aliases.h:7
A structure to represent a camera with position and rotation in 3D space.
Definition camera.class.c:29
Structure representing a mesh.
Definition mesh.class.c:25
Represents a node in the tree structure.
Definition node.class.c:26
u32 TextureMap
Alias for u32 representing a texture map.
Definition memory.h:25
void update_window(Window *window, struct Node *scene, struct Camera *c, struct WorldShaders *shaders, struct DepthMap *depthMap, struct Mesh *screenPlane)
Updates the window by rendering the scene and swapping the buffers.
Definition window.c:197
void refresh_resolution()
Refreshes the window resolution.
Definition window.c:214
WindowFlags
Enumeration for window flags.
Definition window.h:31
void free_window(Window *window)
Frees the resources associated with the window.
Definition window.c:228
void refresh_ui(Window *window)
Refreshes the UI of the window.
Definition window.c:183
s8 create_window(char *title, s32 x, s32 y, s32 width, s32 height, u32 flags, Window *window)
Creates a new SDL window with an OpenGL context.
Definition window.c:80
@ WINDOW_PRERENDER_PASS
Definition window.h:33
@ WINDOW_NO_FLAGS
Definition window.h:32
@ WINDOW_RESIZED
Definition window.h:34
DepthMap depthMap
Definition raptiquax.c:56
Window window
Definition raptiquax.c:53
Represents a depth map used in rendering.
Definition depth_map.h:26
Structure representing the SDL window and its associated OpenGL context.
Definition window.h:51
TextureMap ui_texture
Definition window.h:55
SDL_Surface * surface
Definition window.h:53
vec4 fadeColor
Definition window.h:60
float time
Definition window.h:58
SDL_Window * sdl_window
Definition window.h:52
u8 flags
Definition window.h:61
float lastTime
Definition window.h:59
SDL_GLContext opengl_ctx
Definition window.h:56
SDL_Surface * ui_surface
Definition window.h:54
float startTime
Definition window.h:57
A structure to hold various shaders used in the rendering process.
Definition render.h:25