/* * Voxel-a-tord * texture.h: * Copyright (c) 2021-2022 986-Studio. All rights reserved. * * Created by Manoƫl Trapier on 07/03/2021. */ #ifndef VOXELATOR_SOURCE_INCLUDE_TEXTURE_H #define VOXELATOR_SOURCE_INCLUDE_TEXTURE_H #include #include #include #include /*********************************************************************************************************************** * Data types **********************************************************************************************************************/ typedef struct tex2_t { fp_num_t u, v; } tex2_t; typedef struct texture_t { upng_t *png; void *data; int width; int height; } texture_t; /*********************************************************************************************************************** * Prototypes **********************************************************************************************************************/ void loadTextureDateFromPng(texture_t *texture, const char *filepath); void textureCleanup(texture_t *texture); colour_t getTextureColour(texture_t *texture, tex2_t *position); #endif /* VOXELATOR_SOURCE_INCLUDE_TEXTURE_H */