12345678910111213141516171819202122232425262728293031323334353637383940 |
- /*
- * 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 <stdint.h>
- #include <upng.h>
- #include <colour.h>
- /***********************************************************************************************************************
- * Data types
- **********************************************************************************************************************/
- typedef struct tex2_t
- {
- double u, v;
- } tex2_t;
- typedef struct texture_t
- {
- upng_t *png;
- colour_t *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 */
|