Claude Chappe' Curse - A C Game
Logo Institut d'Informatique Claude Chappe Logo Université de Le Mans Logo Raeptor Production
 
Loading...
Searching...
No Matches
Render Functions

Functions for configuring shaders, rendering scenes, and drawing shadow maps. More...

Classes

struct  WorldShaders
 A structure to hold various shaders used in the rendering process. More...
 

Functions

void render_scene (struct Window *window, struct Node *node, struct Camera *c, mat4 modelMatrix, Shader activeShader, struct WorldShaders *shaders, int viewportWidth, int viewportHeight)
 Renders the scene using the specified shader.
 
void draw_shadow_map (struct Window *window, struct Node *root, struct Camera *c, struct WorldShaders *shaders, struct DepthMap *depthMap)
 Draws the shadow map for the scene.
 
void draw_scene (struct Window *window, struct Node *root, struct Camera *c, struct WorldShaders *shaders, struct DepthMap *depthMap)
 Draws the entire scene.
 
void draw_screen (struct Window *window, struct Node *scene, struct Camera *c, WorldShaders *shaders, struct DepthMap *depthMap, struct Mesh *screenPlane)
 Draws the final screen output.
 

Detailed Description

Functions for configuring shaders, rendering scenes, and drawing shadow maps.

Function Documentation

◆ render_scene()

void render_scene ( struct Window window,
struct Node node,
struct Camera c,
mat4  modelMatrix,
Shader  activeShader,
struct WorldShaders shaders,
int  viewportWidth,
int  viewportHeight 
)

Renders the scene using the specified shader.

This function renders the scene graph starting from the given node using the active shader. It applies the model matrix transformations and uses the provided camera and world shaders to render the scene.

Parameters
windowPointer to the Window structure.
nodePointer to the current Node in the scene graph.
cPointer to the Camera structure.
modelMatrixThe model matrix for transforming the node.
activeShaderThe shader program to use for rendering.
shadersPointer to the WorldShaders structure containing shader programs.
viewportWidthThe width of the viewport.
viewportHeightThe height of the viewport.

◆ draw_shadow_map()

void draw_shadow_map ( struct Window window,
struct Node root,
struct Camera c,
struct WorldShaders shaders,
struct DepthMap depthMap 
)

Draws the shadow map for the scene.

This function generates the shadow map by rendering the scene from the light's perspective. It uses the provided window, scene graph root node, camera, world shaders, and depth map to create the shadow map.

Parameters
windowPointer to the Window structure.
rootPointer to the root Node of the scene graph.
cPointer to the Camera structure.
shadersPointer to the WorldShaders structure containing shader programs.
depthMapPointer to the DepthMap structure for storing the shadow map.

◆ draw_scene()

void draw_scene ( struct Window window,
struct Node root,
struct Camera c,
struct WorldShaders shaders,
struct DepthMap depthMap 
)

Draws the entire scene.

This function renders the entire scene graph starting from the root node. It uses the provided window, camera, world shaders, and depth map to render the scene with shadows and other effects.

Parameters
windowPointer to the Window structure.
rootPointer to the root Node of the scene graph.
cPointer to the Camera structure.
shadersPointer to the WorldShaders structure containing shader programs.
depthMapPointer to the DepthMap structure for shadow mapping.

◆ draw_screen()

void draw_screen ( struct Window window,
struct Node scene,
struct Camera c,
WorldShaders shaders,
struct DepthMap depthMap,
struct Mesh screenPlane 
)

Draws the final screen output.

This function renders the final output to the screen. It uses the provided window, scene graph, camera, world shaders, depth map, and screen plane mesh to render the final image. on the screen.

Parameters
windowPointer to the Window structure.
scenePointer to the root Node of the scene graph.
cPointer to the Camera structure.
shadersPointer to the WorldShaders structure containing shader programs.
depthMapPointer to the DepthMap structure for shadow mapping.
screenPlanePointer to the Mesh structure representing the screen plane.