]> de.git.xonotic.org Git - xonotic/netradiant.git/blobdiff - plugins/shaders/shaders.cpp
Centralise compile checks
[xonotic/netradiant.git] / plugins / shaders / shaders.cpp
index 54df7abc499c4658c464d4f068bf9e2d4a49051a..656c1d8404cb85eab959046c87d4f27d16800ea8 100644 (file)
@@ -35,6 +35,7 @@
 //
 
 #include "shaders.h"
+#include "globaldefs.h"
 
 #include <stdio.h>
 #include <stdlib.h>
@@ -207,7 +208,7 @@ Image* loadHeightmap( void* environment, const char* name ){
 Image* loadSpecial( void* environment, const char* name ){
        if ( *name == '_' ) { // special image
                StringOutputStream bitmapName( 256 );
-               bitmapName << GlobalRadiant().getAppPath() << "bitmaps/" << name + 1 << ".bmp";
+               bitmapName << GlobalRadiant().getAppPath() << "bitmaps/" << name + 1 << ".png";
                Image* image = loadBitmap( environment, bitmapName.c_str() );
                if ( image != 0 ) {
                        return image;
@@ -951,7 +952,7 @@ void realise(){
 
                {
                        StringOutputStream name( 256 );
-                       name << GlobalRadiant().getAppPath() << "bitmaps/" << ( IsDefault() ? "notex.bmp" : "shadernotex.bmp" );
+                       name << GlobalRadiant().getAppPath() << "bitmaps/" << ( IsDefault() ? "notex.png" : "shadernotex.png" );
                        m_pTexture = GlobalTexturesCache().capture( LoadImageCallback( 0, loadBitmap ), name.c_str() );
                }
        }
@@ -1369,7 +1370,7 @@ void ParseShaderFile( Tokeniser& tokeniser, const char* filename ){
                                if ( result ) {
                                        // do we already have this shader?
                                        if ( !g_shaderDefinitions.insert( ShaderDefinitionMap::value_type( shaderTemplate->getName(), ShaderDefinition( shaderTemplate.get(), ShaderArguments(), filename ) ) ).second ) {
-  #ifdef _DEBUG
+  #if GDEF_DEBUG
                                                globalOutputStream() << "WARNING: shader " << shaderTemplate->getName() << " is already in memory, definition in " << filename << " ignored.\n";
   #endif
                                        }