managed old tutorial implementation with classes.
Bugs: nothing is displayed
This commit is contained in:
47
MshViewer/Header/Object.h
Normal file
47
MshViewer/Header/Object.h
Normal file
@@ -0,0 +1,47 @@
|
||||
#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);
|
||||
};
|
Reference in New Issue
Block a user