2017-10-21 21:00:33 +00:00
|
|
|
#include "util.h"
|
|
|
|
#include "graphics/texture.h"
|
2017-12-10 20:36:22 +00:00
|
|
|
#include "data/material.h"
|
2017-10-31 08:14:09 +00:00
|
|
|
#include <stdbool.h>
|
2017-10-21 21:00:33 +00:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
Ref ref;
|
|
|
|
MaterialData* materialData;
|
|
|
|
Texture* textures[MAX_MATERIAL_TEXTURES];
|
2017-10-31 08:14:09 +00:00
|
|
|
bool isDefault;
|
2017-10-21 21:00:33 +00:00
|
|
|
} Material;
|
|
|
|
|
2017-10-31 08:14:09 +00:00
|
|
|
Material* lovrMaterialCreate(MaterialData* materialData, bool isDefault);
|
2017-10-21 21:00:33 +00:00
|
|
|
void lovrMaterialDestroy(const Ref* ref);
|
|
|
|
Color lovrMaterialGetColor(Material* material, MaterialColor colorType);
|
|
|
|
void lovrMaterialSetColor(Material* material, MaterialColor colorType, Color color);
|
|
|
|
Texture* lovrMaterialGetTexture(Material* material, MaterialTexture textureType);
|
|
|
|
void lovrMaterialSetTexture(Material* material, MaterialTexture textureType, Texture* texture);
|