mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-22 16:19:19 +02:00
minimum 1.4 gl
This commit is contained in:
20
World.cpp
20
World.cpp
@@ -188,15 +188,12 @@ bool TWorld::Init(GLFWwindow *w)
|
|||||||
std::string glver = ((char *)glGetString(GL_VERSION));
|
std::string glver = ((char *)glGetString(GL_VERSION));
|
||||||
WriteLog("OpenGL Version:");
|
WriteLog("OpenGL Version:");
|
||||||
WriteLog(glver);
|
WriteLog(glver);
|
||||||
if ((glver == "1.5.1") || (glver == "1.5.2"))
|
if (!GLEW_VERSION_1_4)
|
||||||
{
|
{
|
||||||
Error("Niekompatybilna wersja openGL - dwuwymiarowy tekst nie bedzie wyswietlany!");
|
std::cout << "required opengl >=1.4" << std::endl;
|
||||||
WriteLog("WARNING! This OpenGL version is not fully compatible with simulator!");
|
return false;
|
||||||
WriteLog("UWAGA! Ta wersja OpenGL nie jest w pelni kompatybilna z symulatorem!");
|
|
||||||
Global::detonatoryOK = false;
|
|
||||||
}
|
}
|
||||||
else
|
|
||||||
Global::detonatoryOK = true;
|
|
||||||
// Ra: umieszczone w EU07.cpp jakoś nie chce działać
|
// Ra: umieszczone w EU07.cpp jakoś nie chce działać
|
||||||
while( glver.rfind( '.' ) > glver.find( '.' ) ) {
|
while( glver.rfind( '.' ) > glver.find( '.' ) ) {
|
||||||
glver = glver.substr( 0, glver.rfind( '.' ) - 1 ); // obcięcie od drugiej kropki
|
glver = glver.substr( 0, glver.rfind( '.' ) - 1 ); // obcięcie od drugiej kropki
|
||||||
@@ -225,15 +222,6 @@ bool TWorld::Init(GLFWwindow *w)
|
|||||||
WriteLog((char *)glGetString(GL_EXTENSIONS));
|
WriteLog((char *)glGetString(GL_EXTENSIONS));
|
||||||
if (GLEW_ARB_vertex_buffer_object) // czy jest VBO w karcie graficznej
|
if (GLEW_ARB_vertex_buffer_object) // czy jest VBO w karcie graficznej
|
||||||
{
|
{
|
||||||
if( std::string( (char *)glGetString(GL_VENDOR) ).find("Intel") != std::string::npos ) // wymuszenie tylko dla kart Intel
|
|
||||||
{ // karty Intel nie nadają się do grafiki 3D, ale robimy wyjątek, bo to w końcu symulator
|
|
||||||
Global::iMultisampling =
|
|
||||||
0; // to robi problemy na "Intel(R) HD Graphics Family" - czarny ekran
|
|
||||||
if (Global::fOpenGL >=
|
|
||||||
1.4) // 1.4 miało obsługę VBO, ale bez opcji modyfikacji fragmentu bufora
|
|
||||||
Global::bUseVBO = true; // VBO włączane tylko, jeśli jest obsługa oraz nie ustawiono
|
|
||||||
// niższego numeru
|
|
||||||
}
|
|
||||||
if (Global::bUseVBO)
|
if (Global::bUseVBO)
|
||||||
WriteLog("Ra: The VBO is found and will be used.");
|
WriteLog("Ra: The VBO is found and will be used.");
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user