mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-03-22 15:05:03 +01: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 ),
|
||||
duskfactor );
|
||||
// sun
|
||||
if (!m_isATI)
|
||||
{
|
||||
Bind_Texture( m_suntexture );
|
||||
::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();
|
||||
}
|
||||
// moon
|
||||
if (!m_isATI)
|
||||
{
|
||||
Bind_Texture( m_moontexture );
|
||||
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;
|
||||
}
|
||||
|
||||
m_isATI = (gl_vendor.find("ATI") != -1);
|
||||
|
||||
char* extensions = (char*)glGetString( GL_EXTENSIONS );
|
||||
if (extensions)
|
||||
WriteLog( "Supported extensions: \n" + std::string(extensions));
|
||||
|
||||
@@ -366,6 +366,7 @@ private:
|
||||
#ifdef EU07_USE_DEBUG_CAMERA
|
||||
renderpass_config m_worldcamera; // debug item
|
||||
#endif
|
||||
bool m_isATI;
|
||||
|
||||
static bool renderer_register;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user