22 # define SCREEN_WIDTH 800
23 # define SCREEN_HEIGHT 400
25 # define K_ESCAPE 0xff1b
27 # define DESTROYNOTIFY 17
28 # define NOEVENTMASK 0L
t_bool put_on_window(t_canvas *canvas, char *title)
The function tries to create a new window on screen with the established Xserver connection,...
Definition: canvas.c:41
int quit(t_canvas *canvas)
quit() frees every data regarding graphic initialization and window rendering. It destroys the create...
Definition: controls.c:15
int handle_keypress(int keysym, t_canvas *canvas)
This function is to be used as the second parameter of the MLX library function mlx_key_hook(),...
Definition: controls.c:24
struct s_canvas t_canvas
The struct of type t_canvas contains the necessary fields for graphic initialization and window rende...
void init_mlx_connection(t_canvas *canvas)
This function attempts to start a connection with Xserver using MLX library.
Definition: canvas.c:15
int show_window(t_canvas *canvas)
This function inserts an image to window. To do that, it needs from the parameter canvas a pointer to...
Definition: canvas.c:53
struct s_scene t_scene
The structure t_scene is how the user sees the ray tracing rendering. There is a camera from which th...
t_bool new_canvas(t_canvas *canvas, int width, int height)
This function attempts to start a connection with Xserver using MLX library. After that,...
Definition: canvas.c:24
t_bool render(t_scene *scene, t_canvas *canvas)
This functions renders a scene of ray casting objects. It attempts to initialize a connection to the ...
Definition: render.c:18
void write_pixel(const t_canvas *canvas, int x, int y, int color)
The function write_pixel() writes a pixel at (x, y) coordinates of the image, if a given coordinate i...
Definition: render.c:64
The structure of type t_camera contains the necessary information for camera configuration,...
Definition: camera.h:45
The struct of type t_canvas contains the necessary fields for graphic initialization and window rende...
Definition: canvas.h:53
The structure t_scene is how the user sees the ray tracing rendering. There is a camera from which th...
Definition: canvas.h:75
This struct contains everything related to the building of a ray tracing's world. The world has objec...
Definition: world.h:37