pctm + foundation for obj models

This commit is contained in:
2026-02-22 14:32:52 +01:00
parent 7ca48a5080
commit c051008287
16 changed files with 279 additions and 185 deletions
+4 -2
View File
@@ -4,9 +4,11 @@
#include <SDL3/SDL.h>
#include "math.hpp"
#include "assetloader.hpp"
void rasterizeTriangle(SDL_Renderer *renderer, const DeltaVector2 &a, const DeltaVector2 &b, const DeltaVector2 &c);
// void rasterizeTriangle(SDL_Renderer *renderer, const DeltaVector2 &a, const DeltaVector2 &b, const DeltaVector2 &c);
void rasterizeTriangleFast(SDL_Surface* surface, const DeltaVector2& v0, const DeltaVector2& v1, const DeltaVector2& v2, uint32_t color);
void rasterizeTriangleSurface(SDL_Surface* surface, const DeltaVector2& v0, const DeltaVector2& v1, const DeltaVector2& v2, uint32_t color, float u0, float v0_uv, float u1, float v1_uv, float u2, float v2_uv);
void rasterizeTriangleSurface(DeltaAssetLoader& assets, std::vector<float>& depthbuffer, SDL_Surface* surface, const DeltaVector3& v0, const DeltaVector3& v1, const DeltaVector3& v2, const std::string& textureID, float u0, float v0_uv, float u1, float v1_uv, float u2, float v2_uv);
void setPixel(SDL_Surface* surface, int x, int y, uint32_t color);
uint32_t getPixel(SDL_Surface* surface, int x, int y);
#endif