Bladeren bron

Merge branch 'dev' into new-render

# Conflicts:
#	oxygine/src/oxygine/core/UberShaderProgram.cpp
#	oxygine/src/oxygine/core/UberShaderProgram.h
#	oxygine/src/oxygine/core/system_data.cpp
[email protected] 8 jaren geleden
bovenliggende
commit
257783e96d

+ 1 - 1
oxygine/src/oxygine/AsyncTask.cpp

@@ -13,7 +13,7 @@ namespace oxygine
 
 
     AsyncTask::~AsyncTask()
     AsyncTask::~AsyncTask()
     {
     {
-        LOGD("~");
+        //LOGD("~");
     }
     }
 
 
     void AsyncTask::sync(const std::function< void()>& f)
     void AsyncTask::sync(const std::function< void()>& f)

+ 4 - 4
oxygine/src/oxygine/core/STDFileSystem.cpp

@@ -232,11 +232,11 @@ namespace oxygine
             std::string     root = path;
             std::string     root = path;
             std::string     strFilePath;                 // Filepath
             std::string     strFilePath;                 // Filepath
             std::string     strPattern;                  // Pattern
             std::string     strPattern;                  // Pattern
-            WIN32_FIND_DATA FileInformation;             // File information
+            WIN32_FIND_DATAA FileInformation;             // File information
 
 
 
 
             strPattern = root + "\\*.*";
             strPattern = root + "\\*.*";
-            hFile = ::FindFirstFile(strPattern.c_str(), &FileInformation);
+            hFile = ::FindFirstFileA(strPattern.c_str(), &FileInformation);
             if (hFile == INVALID_HANDLE_VALUE)
             if (hFile == INVALID_HANDLE_VALUE)
                 return -1;
                 return -1;
 
 
@@ -253,11 +253,11 @@ namespace oxygine
                     }
                     }
                     else
                     else
                     {
                     {
-                        DeleteFile(strFilePath.c_str());
+                        DeleteFileA(strFilePath.c_str());
                     }
                     }
                 }
                 }
             }
             }
-            while (::FindNextFile(hFile, &FileInformation) == TRUE);
+            while (::FindNextFileA(hFile, &FileInformation) == TRUE);
 
 
             // Close handle
             // Close handle
             ::FindClose(hFile);
             ::FindClose(hFile);

+ 3 - 0
oxygine/src/oxygine/core/UberShaderProgram.cpp

@@ -66,6 +66,9 @@ namespace oxygine
             if (flags & MASK)
             if (flags & MASK)
                 strcat(prepend, "#define MASK\n");
                 strcat(prepend, "#define MASK\n");
 
 
+            if (flags & ADD_COLOR)
+                strcat(prepend, "#define ADD_COLOR\n");
+
             char* end = prepend + strlen(prepend);
             char* end = prepend + strlen(prepend);
             strcat(prepend, "#define program_main_ps main\n");
             strcat(prepend, "#define program_main_ps main\n");
             strcat(prepend, "#define PS\n");
             strcat(prepend, "#define PS\n");

+ 1 - 0
oxygine/src/oxygine/core/UberShaderProgram.h

@@ -53,6 +53,7 @@ namespace oxygine
             SEPARATE_ALPHA = 1 << 1,
             SEPARATE_ALPHA = 1 << 1,
             MASK_R_CHANNEL = 1 << 2,
             MASK_R_CHANNEL = 1 << 2,
             MASK = 1 << 3,
             MASK = 1 << 3,
+            ADD_COLOR = 1 << 4,
             _SIZE = 1 << 5
             _SIZE = 1 << 5
         };
         };
 
 

File diff suppressed because it is too large
+ 0 - 1
oxygine/src/oxygine/core/system_data.cpp


+ 9 - 2
oxygine/system_data/original/system/shader.glsl

@@ -31,6 +31,7 @@ void program_main_vs()
 
 
 #ifdef PS
 #ifdef PS
 uniform lowp vec4 clip_mask;
 uniform lowp vec4 clip_mask;
+uniform lowp vec4 add_color;
 uniform lowp sampler2D base_texture;
 uniform lowp sampler2D base_texture;
 uniform lowp sampler2D mask_texture;
 uniform lowp sampler2D mask_texture;
 uniform lowp sampler2D alpha_texture;
 uniform lowp sampler2D alpha_texture;
@@ -107,10 +108,16 @@ lowp vec4 get_color()
 
 
 #ifdef DONT_MULT_BY_RESULT_COLOR
 #ifdef DONT_MULT_BY_RESULT_COLOR
 	//for your purposes
 	//for your purposes
-	return base;
+	lowp vec4 res = base;
 #else
 #else
-	return base * result_color;
+	lowp vec4 res = base * result_color;
 #endif	
 #endif	
+
+#ifdef ADD_COLOR
+	res = res + add_color * res.a;
+#endif
+
+	return res;
 }
 }
 
 
 
 

Some files were not shown because too many files changed in this diff