|
Gama C Library
Gama C API Documentation
|
Implements the software rasterizer for projecting 3D meshes onto a 2D gm3Image. More...
#include "../color.h"#include "../position.h"#include "image.h"#include "light.h"#include "mesh.h"#include "mtl.h"#include "position.h"#include "scene.h"#include "transform.h"#include <stddef.h>#include <stdlib.h>Go to the source code of this file.
Functions | |
| int | gm3_project (gm3Image *output, const gm3Mesh *mesh, const gm3Transform *transform, const gm3Scene *scene) |
| Projects a 3D mesh onto a 2D image buffer, applying transformations, lighting, and culling. | |
Implements the software rasterizer for projecting 3D meshes onto a 2D gm3Image.
This file contains the core logic for the 3D rendering pipeline, including lighting calculations, vertex transformation, clipping, backface culling, and triangle assembly for the gm3Image output.
| int gm3_project | ( | gm3Image * | output, |
| const gm3Mesh * | mesh, | ||
| const gm3Transform * | transform, | ||
| const gm3Scene * | scene ) |
Projects a 3D mesh onto a 2D image buffer, applying transformations, lighting, and culling.
This function performs the core 3D to 2D rendering pipeline:
| output | A pointer to the gm3Image struct where the projected 2D scene data will be stored. |
| mesh | A pointer to the gm3Mesh to project. |
| transform | A pointer to the gm3Transform to apply to the mesh (can be NULL for identity). |
| scene | A pointer to the gm3Scene containing camera and light settings (can be NULL for defaults). |