48 lines
788 B
C++
48 lines
788 B
C++
#pragma once
|
|
#include <gl\glew.h>
|
|
#include <gl\glfw3.h>
|
|
#include <glm\glm.hpp>
|
|
#include <vector>
|
|
|
|
class Object
|
|
{
|
|
public:
|
|
Object(const char* path);
|
|
~Object();
|
|
|
|
private:
|
|
GLuint gluiVertexArrayID;
|
|
GLuint gluiVertexBufferID;
|
|
GLuint gluiUVBufferID;
|
|
|
|
GLuint gluiShaderPrgmID;
|
|
GLuint gluiTextureID;
|
|
|
|
std::vector<GLfloat> vfVertices;
|
|
std::vector<GLfloat> vfUV;
|
|
|
|
float fRotationX;
|
|
float fRotationY;
|
|
float fRotationZ;
|
|
|
|
glm::mat4 m4x4Model;
|
|
|
|
private:
|
|
void processTexture();
|
|
void calcMatrix();
|
|
void loadMesh2OGL();
|
|
|
|
|
|
public:
|
|
glm::mat4 getMatrix();
|
|
GLuint getShader() const;
|
|
GLuint getTextureID() const;
|
|
GLuint getVertexBufferID() const;
|
|
GLuint getUVBufferID() const;
|
|
int getVertexNumber() const;
|
|
|
|
void add2x(float value);
|
|
void add2y(float value);
|
|
void add2z(float value);
|
|
};
|