You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

55 lines
931 B

#pragma once
#include "Geometry.hpp"
#include <cstdint>
const int WINDOW_WIDTH = 1920;
const int WINDOW_HEIGHT = 1080;
const int WINDOW_FPS = 30;
const float CAMERA_FOV = 90.0f;
const float CAMERA_NEAR_CLIP = 5.0f;
const float CAMERA_FAR_CLIP = 600.0f;
enum EngineInput
{
TRANSLATE_X_POS,
TRANSLATE_X_NEG,
TRANSLATE_Y_POS,
TRANSLATE_Y_NEG,
TRANSLATE_Z_POS,
TRANSLATE_Z_NEG,
ROTATE_X_POS,
ROTATE_X_NEG,
ROTATE_Y_POS,
ROTATE_Y_NEG,
ROTATE_Z_POS,
ROTATE_Z_NEG,
SCALE_UP,
SCALE_DOWN
};
struct EngineBuffer
{
uint32_t* buffer;
int width;
int height;
};
struct EngineMemory
{
float zbuffer[WINDOW_HEIGHT][WINDOW_WIDTH];
VertexList localVerts;
VertexList transVerts;
FaceList localFaces;
FaceList transFaces;
UVList uvs;
MaterialList materials;
TextureList textures;
};
int EngineInit(char* objFilename, char* mtlFilename);
void EngineRender(EngineBuffer& buffer, uint32_t input);
void EngineShutdown();