A small OpenGL 3+ renderer and game engine
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.
 
 
 

32 lines
576 B

#pragma once
#include "asset.h"
#include "shader.h"
#include "types.h"
#include "util.h"
struct Entity
{
u32 num_meshes;
GLMesh* meshes;
GLTexture* diffuse_texture; // NOTE: pointer into gl_ctx->textures array
mat4* model_xform;
char* name;
};
bool initEntity(Entity* e,
GLContext* gl_ctx,
MemoryArena* arena,
Model* mdl,
u32 num_attrib_mappings,
GLBufferToAttribMapping* attrib_mappings,
const char* name = "");
void setEntityPosition(Entity* e, vec3 pos);
void rotateEntity(Entity* e, vec3 axis, float radians);
void scaleEntity(Entity* e, float scale);