now you can set optional ogl version through the first 2 parameters

This commit is contained in:
Anakin
2016-11-01 14:16:18 +01:00
parent 9d35634c0c
commit bc518f58ee
4 changed files with 45 additions and 65 deletions

View File

@@ -10,7 +10,7 @@
#define VERTEX_INDEX_UV 1
#define VERTEX_COMPONENTS_XYZ 3
#define VERTEX_COMPONENTS_UV 4
#define VERTEX_COMPONENTS_UV 2
#define VERTEX_SIZE_XYZ (sizeof(float) * VERTEX_COMPONENTS_XYZ)
#define VERTEX_SIZE_UV (sizeof(float) * VERTEX_COMPONENTS_UV)
@@ -39,49 +39,49 @@ private:
// member
private:
// window
GLFWwindow* pWindow;
std::string sWindowName;
int iWidth;
int iHeight;
GLFWwindow* pWindow = NULL;
std::string sWindowName = "MeshViewer 2.0 pre-alpha";
int iWidth = 640;
int iHeight = 480;
// init glfw
int iOglMajorVersion;
int iOglMinorVersion;
int iAntiAliasingLevel;
int iOglMajorVersion = 4;
int iOglMinorVersion = 5;
int iAntiAliasingLevel = 4;
// IDs ==========================
// IDs ====================================
//object data
GLuint gluiVertexArrayID;
GLuint gluiInstanceBufferID;
GLuint gluiVertexBufferID;
GLuint gluiVertexArrayID = 0;
GLuint gluiVertexBufferID = 0;
GLuint gluiInstanceBufferID = 0;
//obj color
GLuint gluiTextureID;
GLuint gluiShaderPrgmID;
GLuint gluiSamplerID;
GLuint gluiTextureID = 0;
GLuint gluiShaderPrgmID = 0;
GLuint gluiSamplerID = 0;
//obj transformation
GLuint gluiMatrixID;
// ==============================
GLuint gluiMatrixID = 0;
// ========================================
// data
std::vector<Modl*> vModels;
// transformation ===============
// transformation =========================
//values
float fRotationX;
float fRotationY;
float fRotationZ;
double dTranslationX;
double dTranslationY;
double dTranslationZ;
float fRotationX = 0;
float fRotationY = 0;
float fRotationZ = 0;
double dTranslationX = 0;
double dTranslationY = 0;
double dTranslationZ = 5;
// ==============================
// ========================================
// camera
float fFOV;
float fMinView;
float fMaxView;
float fFOV = 45.0f;
float fMinView = 0.1f;
float fMaxView = 100.0f;
////////////////////////////////////////////////////////////////////////////////////////////
@@ -89,7 +89,6 @@ private:
private:
void processInit();
void initDefault();
void startGLFW();
void createWindow();
void startGLEW();