Added Texture

This commit is contained in:
grayson committed 2021-08-27 17:41:45 -05:00
1 parent 4f1ea8327a
commit 933d3f1fe9
13 files changed
+84 -18

No files matched your search

+1 -1
View File
@@ -11,7 +11,7 @@ namespace nf {
public:
Entity();
void create(const void* vertexBufferData, const size_t vertexBufferSize, const void* indexBufferData, size_t indexBufferCount);
void create(const void* vertexBufferData, const size_t vertexBufferSize, const void* indexBufferData, size_t indexBufferCount, const void* textureCoordinatesBufferData = nullptr, size_t textureCoordinatesBufferSize = 0, const char* textureName = nullptr);
//TODO: Do this using loaded assets somehow
void setPosition(float x, float y, float z);
void setRotation(float x, float y, float z);
+3 -2
View File
@@ -5,17 +5,18 @@
#endif
#include "Drawable.h"
#include "Texture.h"
namespace nf {
class Model : public Drawable {
public:
Model();
void create(const void* vertexBufferData, const size_t vertexBufferSize, const void* indexBufferData, size_t indexBufferCount);
void create(const void* vertexBufferData, const size_t vertexBufferSize, const void* indexBufferData, size_t indexBufferCount, const void* textureCoordinates = nullptr, size_t textureCoordinatesBufferSize = 0, const char* textureName = nullptr);
void bind() override;
~Model();
private:
Texture* m_texture;
};
}
+1 -1
View File
@@ -22,7 +22,7 @@ namespace nf {
public:
Entity();
void create(const void* vertexBufferData, const size_t vertexBufferSize, const void* indexBufferData, size_t indexBufferCount);
void create(const void* vertexBufferData, const size_t vertexBufferSize, const void* indexBufferData, size_t indexBufferCount, const void* textureCoordinatesBufferData = nullptr, size_t textureCoordinatesBufferSize = 0, const char* textureName = nullptr);
//TODO: Do this using loaded assets somehow
void setPosition(float x, float y, float z);
void setRotation(float x, float y, float z);
-1
View File
@@ -12,7 +12,6 @@ namespace nf {
void bind();
void setUniform(const char* name, glm::mat4& data);
static unsigned int current;
~Shader();
private:
+15
View File
@@ -0,0 +1,15 @@
#pragma once
namespace nf {
class Texture {
public:
Texture();
void create(const char* textureName);
void bind();
~Texture();
private:
unsigned int m_id;
};
}