mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-22 18:39:18 +02:00
disable sun/moon rendering on ATI cards in legacy renderer, prone to crashes
This commit is contained in:
@@ -1572,6 +1572,7 @@ opengl_renderer::Render( world_environment *Environment ) {
|
|||||||
glm::vec3( 235.0f / 255.0f, 140.0f / 255.0f, 36.0f / 255.0f ),
|
glm::vec3( 235.0f / 255.0f, 140.0f / 255.0f, 36.0f / 255.0f ),
|
||||||
duskfactor );
|
duskfactor );
|
||||||
// sun
|
// sun
|
||||||
|
if (!m_isATI)
|
||||||
{
|
{
|
||||||
Bind_Texture( m_suntexture );
|
Bind_Texture( m_suntexture );
|
||||||
::glColor4f( suncolor.x, suncolor.y, suncolor.z, clamp( 1.5f - Global.Overcast, 0.f, 1.f ) * fogfactor );
|
::glColor4f( suncolor.x, suncolor.y, suncolor.z, clamp( 1.5f - Global.Overcast, 0.f, 1.f ) * fogfactor );
|
||||||
@@ -1596,6 +1597,7 @@ opengl_renderer::Render( world_environment *Environment ) {
|
|||||||
::glPopMatrix();
|
::glPopMatrix();
|
||||||
}
|
}
|
||||||
// moon
|
// moon
|
||||||
|
if (!m_isATI)
|
||||||
{
|
{
|
||||||
Bind_Texture( m_moontexture );
|
Bind_Texture( m_moontexture );
|
||||||
glm::vec3 mooncolor( 255.0f / 255.0f, 242.0f / 255.0f, 231.0f / 255.0f );
|
glm::vec3 mooncolor( 255.0f / 255.0f, 242.0f / 255.0f, 231.0f / 255.0f );
|
||||||
@@ -4397,6 +4399,8 @@ opengl_renderer::Init_caps() {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
m_isATI = (gl_vendor.find("ATI") != -1);
|
||||||
|
|
||||||
char* extensions = (char*)glGetString( GL_EXTENSIONS );
|
char* extensions = (char*)glGetString( GL_EXTENSIONS );
|
||||||
if (extensions)
|
if (extensions)
|
||||||
WriteLog( "Supported extensions: \n" + std::string(extensions));
|
WriteLog( "Supported extensions: \n" + std::string(extensions));
|
||||||
|
|||||||
@@ -366,6 +366,7 @@ private:
|
|||||||
#ifdef EU07_USE_DEBUG_CAMERA
|
#ifdef EU07_USE_DEBUG_CAMERA
|
||||||
renderpass_config m_worldcamera; // debug item
|
renderpass_config m_worldcamera; // debug item
|
||||||
#endif
|
#endif
|
||||||
|
bool m_isATI;
|
||||||
|
|
||||||
static bool renderer_register;
|
static bool renderer_register;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user