14 lines
793 B
C++
14 lines
793 B
C++
#ifndef DELTA_RENDERCALLS
|
|
#define DELTA_RENDERCALLS
|
|
|
|
#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 rasterizeTriangleFast(SDL_Surface* surface, const DeltaVector2& v0, const DeltaVector2& v1, const DeltaVector2& v2, uint32_t color);
|
|
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 |