SWBF2-Classic-Msh-Viewer/MshViewer/Header/OpenGLController.h

71 lines
1.0 KiB
C
Raw Normal View History

#pragma once
#include <string>
#include <glm\glm.hpp>
#include <vector>
#include "Camera.h"
#include "Object.h"
class OpenGLController
{
public:
OpenGLController();
OpenGLController(int oglMajor, int oglMinor);
~OpenGLController();
private:
int iOglMajorVersion;
int iOglMinorVersion;
int iAntiAliasingLevel;
std::string sWindowName;
GLFWwindow* pWindow;
int iWidth;
int iHeight;
GLuint gluiMatrixID;
GLuint gluiSamplerID;
glm::mat4 m4x4Model;
glm::mat4 m4x4MVP;
Camera camera;
Object* object;
struct {
double posX;
double posY;
bool leftHold;
bool middleHold;
bool rightHold;
double speed;
} stcMouse;
private:
void initDefault();
void processInit();
void startGLFW();
void startGLEW();
void createWindow();
void setCallbackFunctions();
public:
glm::mat4 getMVPMatrix();
GLFWwindow* getWindow() const;
void resize(int width, int height);
void addRotX(float value);
void addRotY(float value);
void addTransX(double value);
void addTransY(double value);
void addTransZ(double value);
void updateScene();
};