summaryrefslogtreecommitdiff
path: root/scene.c
Commit message (Collapse)AuthorAgeFilesLines
* scene: add a method to get an entity from a scene.rodri2024-08-251-0/+12
|
* methods to add primitives and materials to a Model.rodri2024-08-231-0/+20
|
* offset fb during drawing based on viewport config. move OBJ-related ↵rodri2024-08-071-294/+0
| | | | procedures to its own unit.
* fix stack overflow, skybox fov sensibility and scene duplication.rodri2024-07-151-2/+2
| | | | | | | | | putting the duplicate camera in a local variable turned out to be a bad idea. bring the dynamic version back. the skybox rendering was affected by the camera fov, which made it look like it was not really at infinity, so set it always to 90°.
* fix the geometry glitches when moving things around.rodri2024-07-131-33/+92
| | | | | | | | | | it's possible for interactive programs to keep updating the geometry of the scene during rendering, which caused primitives to look deformed or shattered in the final image. to avoid this we take a snapshot of the current state of things (scene and camera), and render based on that copy.
* small improvements.rodri2024-07-121-1/+3
|
* create a new texture interface.rodri2024-07-051-9/+11
|
* add spotlight params and a light color shading routine. other things.rodri2024-06-101-13/+3
| | | | | | among these other things are clamping the color channels to [0,1] internally, and adding a modulation function for mixing colors/points.
* add cubemaps.rodri2024-06-061-0/+4
|
* add a tangent parameter for normal mapping, and a world2model xform.rodri2024-06-041-3/+21
|
* add a normal map property to Material.rodri2024-05-281-0/+7
|
* add a name property to Material.rodri2024-05-121-1/+9
|
* scene: free model materials during cleanup.rodri2024-05-101-0/+2
|
* add a general primitive with support for points, lines and triangles.rodri2024-05-031-46/+227
| | | | | | | | also got rid of the dependency on OBJ for the entire renderer, instead letting the user load a Model from any given OBJ. this modularity will allow for other formats to be used in the same way, relying on a single, internal representation for the entire pipeline.
* scene: correct blatant use-after-free.rodri2024-04-031-2/+3
|
* scene: add a way to remove entities and fix the clearscene routine.rodri2024-04-031-1/+11
|
* add trivial nil checks to some of the cleanup procedures.rodri2024-04-031-1/+8
|
* scene: implement full cleanup procedures.rodri2024-04-031-2/+21
|
* scene: fix uninitialized nents field.rodri2024-04-031-0/+1
|
* add initial support for OBJMaterial properties.rodri2024-02-211-0/+1
|
* implement general polygon fan triangulation.rodri2024-02-151-61/+48
|
* lay out the grounds for a scene renderer.rodri2024-02-131-0/+185
also fixed an issue with cliptriangle() where an entire tri would get discarded if all its vertices were outside the frustum.