now you can set optional ogl version through the first 2 parameters
This commit is contained in:
@@ -50,8 +50,7 @@ OpenGLController::~OpenGLController()
|
||||
|
||||
OpenGLController::OpenGLController(int oglMajor, int oglMinor)
|
||||
{
|
||||
// init variables
|
||||
initDefault();
|
||||
// adjust ogl version optional
|
||||
iOglMajorVersion = oglMajor;
|
||||
iOglMinorVersion = oglMinor;
|
||||
|
||||
@@ -62,34 +61,6 @@ OpenGLController::OpenGLController(int oglMajor, int oglMinor)
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// private functions
|
||||
|
||||
void OpenGLController::initDefault()
|
||||
{
|
||||
pWindow = NULL;
|
||||
sWindowName = "MeshViewer 2.0 pre-alpha";
|
||||
iWidth = 640;
|
||||
iHeight = 480;
|
||||
|
||||
iAntiAliasingLevel = 4;
|
||||
|
||||
gluiInstanceBufferID = 0;
|
||||
gluiTextureID = 0;
|
||||
gluiShaderPrgmID = 0;
|
||||
gluiSamplerID = 0;
|
||||
|
||||
gluiMatrixID = 0;
|
||||
|
||||
fRotationX = 0;
|
||||
fRotationY = 0;
|
||||
fRotationZ = 0;
|
||||
dTranslationX = 0;
|
||||
dTranslationY = 0;
|
||||
dTranslationZ = 5;
|
||||
|
||||
fFOV = 45.0f;
|
||||
fMinView = 0.1f;
|
||||
fMaxView = 100.0f;
|
||||
}
|
||||
|
||||
void OpenGLController::processInit()
|
||||
{
|
||||
startGLFW();
|
||||
@@ -159,10 +130,10 @@ void OpenGLController::createWindow()
|
||||
if (pWindow == NULL)
|
||||
{
|
||||
std::string message = "Your GPU does not support OpenGL ";
|
||||
message += iOglMajorVersion;
|
||||
message += std::to_string(iOglMajorVersion);
|
||||
message += ".";
|
||||
message += iOglMinorVersion;
|
||||
message += "\nTry to use older version";
|
||||
message += std::to_string(iOglMinorVersion);
|
||||
message += "\nTry to use an other version";
|
||||
|
||||
MessageBox(NULL, message.c_str(), "MeshViewer 2.0 Error", MB_OK | MB_ICONERROR);
|
||||
|
||||
|
Reference in New Issue
Block a user