2
0
Эх сурвалжийг харах

- Optimizing copilation time
- Investigating a nasty bug in drivers

Panagiotis Christopoulos Charitos 15 жил өмнө
parent
commit
b40772172a

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 469 - 386
build/debug/Makefile


+ 8 - 5
shaders/BsBpSphere.glsl

@@ -33,12 +33,15 @@ void main()
 	_noise = _noise * 2 - 1;
 	_noise *= 7.0;*/
 
-	//vec4 col = texture2D(ppsPrePassFai, (gl_FragCoord.xy+(normalV2f.z*50))*vec2(1.0/rendererSize.x, 1.0/rendererSize.y)) * 0.75;
 	//vec4 _texel = texture2D(isFai, gl_FragCoord.xy*vec2(1.0/R_W, 1.0/R_H));
 
-	gl_FragData[0] = texture2D(ppsPrePassFai, gl_FragCoord.xy * vec2(1.0/rendererSize.x, 1.0/rendererSize.y));
+	vec3 z = vec3(0.0, 0.0, 1.0);
 
-	//if(normalV2f.z > 0.5) discard;
-
-	//gl_FragData[0] = vec4(normalV2f.z);
+	float factor = normalV2f.z*3.0;
+	factor = pow(factor, 6);
+	vec3 col = texture2D(ppsPrePassFai, (gl_FragCoord.xy+(factor*20))*vec2(1.0/rendererSize.x, 1.0/rendererSize.y)).rgb * 0.75;
+	col.r *= factor;
+	col.b *= cos(factor*3.14);
+	gl_FragData[0] = vec4(col, factor);
+	//gl_FragData[0] = vec4(vec3(1), factor);
 }

+ 2 - 2
shaders/HwSkinningTrffbGeneric.glsl

@@ -21,8 +21,8 @@ varying vec4 outTangent;
 
 void main()
 {
-	rot = mat3(0.0);
-	tsl = vec3(0.0);
+	mat3 rot = mat3(0.0);
+	vec3 tsl = vec3(0.0);
 
 	for(int i=0; i<int(vertWeightBonesNum); i++)
 	{

+ 11 - 6
shaders/IsLpGeneric.glsl

@@ -77,7 +77,7 @@ float getAttenuation( in float _frag_light_dist )
 // Pcf                                                                                                                 =
 //======================================================================================================================
 
-#if defined(_SPOT_LIGHT_) && defined( _SHADOW_ )
+#if defined(SPOT_LIGHT_ENABLED) && defined( SHADOW_ENABLED )
 
 /**
  * @return The blurred shadow
@@ -236,7 +236,7 @@ void main()
 	//
 	// Point light
 	//
-	#if defined(_POINT_LIGHT_)
+	#if defined(POINT_LIGHT_ENABLED)
 		// The func phong calculates the frag to light distance (_frag_light_dist) and be cause we need that distance
 		// latter for other calculations we export it
 		float _frag_light_dist;
@@ -249,7 +249,7 @@ void main()
 	//
 	// Spot light
 	//
-	#elif defined(_SPOT_LIGHT_)
+	#elif defined(SPOT_LIGHT_ENABLED)
 		vec4 _tex_coord2 = texProjectionMat * vec4(_frag_pos_vspace, 1.0);
 		vec3 _texCoords3 = _tex_coord2.xyz / _tex_coord2.w;
 
@@ -263,7 +263,7 @@ void main()
 			_tex_coord2.w < 1.0/lightInvRadius
 		)
 		{
-			#if defined( _SHADOW_ )
+			#if defined( SHADOW_ENABLED )
 				#if defined( PCF_ENABLED )
 					float _shadow_color = pcfLow( _texCoords3 );
 					//float _shadow_color = MedianFilterPCF( shadowMap, _texCoords3 );
@@ -280,7 +280,7 @@ void main()
 			vec3 _texel = texture2DProj( lightTex, _tex_coord2.xyz ).rgb;
 			float _att = getAttenuation(_frag_light_dist);
 
-			#if defined( _SHADOW_ )
+			#if defined( SHADOW_ENABLED )
 				gl_FragData[0] = vec4(_texel * _color * (_shadow_color * _att), 1.0);
 			#else
 				gl_FragData[0] = vec4( _color * _texel * _att, 1.0 );
@@ -293,8 +293,13 @@ void main()
 	#endif // spot light
 
 
+
+	/*#if defined(POINT_LIGHT_ENABLED)
+		gl_FragData[0] = gl_FragData[0] - gl_FragData[0] + vec4( 1, 0, 1, 1 );
+	#endif*/
+	
 	//gl_FragData[0] = gl_FragData[0] - gl_FragData[0] + vec4( 1, 0, 1, 1 );
-	/*#if defined(_SPOT_LIGHT_)
+	/*#if defined(SPOT_LIGHT_ENABLED)
 	gl_FragData[0] = gl_FragData[0] - gl_FragData[0] + vec4( texture2D( msDepthFai, texCoords ).r );
 	//gl_FragData[0] = vec4( texture2D( msDepthFai, texCoords ).rg), 1.0 );
 	#endif*/

+ 0 - 7
src/Main.cpp

@@ -410,13 +410,6 @@ int main(int argc, char* argv[])
 {
 	new App(argc, argv);
 
-	MALLINFO_BEGIN
-	Arr<int, 1000> arr;
-	arr[1000] = 100;
-	MALLINFO_END
-
-	return 0;
-
 	init();
 
 	mainLoop();

+ 1 - 0
src/Math/Mat3.inl.h

@@ -1,3 +1,4 @@
+#include <iostream>
 #include "MathDfltHeader.h"
 
 

+ 1 - 0
src/Math/Mat4.inl.h

@@ -1,3 +1,4 @@
+#include <iostream>
 #include "MathDfltHeader.h"
 
 

+ 1 - 0
src/Math/Quat.inl.h

@@ -1,3 +1,4 @@
+#include <iostream>
 #include "MathDfltHeader.h"
 
 

+ 1 - 0
src/Math/Vec2.inl.h

@@ -1,3 +1,4 @@
+#include <iostream>
 #include "MathDfltHeader.h"
 
 

+ 1 - 0
src/Math/Vec3.inl.h

@@ -1,3 +1,4 @@
+#include <iostream>
 #include "MathDfltHeader.h"
 
 

+ 1 - 0
src/Math/Vec4.inl.h

@@ -1,3 +1,4 @@
+#include <iostream>
 #include "MathDfltHeader.h"
 
 

+ 3 - 0
src/Renderer/Bs.cpp

@@ -108,6 +108,9 @@ void Renderer::Bs::run()
 			Renderer::drawQuad(0);
 
 			// cleanup
+			glStencilFunc(GL_ALWAYS, 0x1, 0x1);
+			glStencilOp(GL_KEEP, GL_KEEP, GL_REPLACE);
+			glClear(GL_STENCIL_BUFFER_BIT);
 			glDisable(GL_STENCIL_TEST);
 		}
 		else

+ 1 - 1
src/Renderer/Hdr.cpp

@@ -90,7 +90,7 @@ void Renderer::Pps::Hdr::run()
 	pass0Fbo.bind();
 	pass0SProg.bind();
 	r.is.fai.setRepeat(false);
-	pass0SProg.uniVars.fai->setTexture(r.is.fai, 0);
+	pass0SProg.uniVars.fai->setTexture(r.pps.prePassFai, 0);
 	Renderer::drawQuad(0);
 
 	// pass 1

+ 4 - 3
src/Renderer/Is.cpp

@@ -81,6 +81,7 @@ void Renderer::Is::initFbo()
 
 	// attach
 	glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, fai.getGlId(), 0);
+	//glFramebufferTexture2D(GL_FRAMEBUFFER, GL_DEPTH_STENCIL_ATTACHMENT, GL_TEXTURE_2D, r.ms.depthFai.getGlId(), 0);
 
 	// test if success
 	if(!fbo.isGood())
@@ -101,7 +102,7 @@ void Renderer::Is::init()
 	ambientPassSProg.uniVars.ambientCol = ambientPassSProg.findUniVar("ambientCol");
 	ambientPassSProg.uniVars.sceneColMap = ambientPassSProg.findUniVar("sceneColMap");
 
-	pointLightSProg.customLoad("shaders/IsLpGeneric.glsl", "#define _POINT_LIGHT_\n");
+	pointLightSProg.customLoad("shaders/IsLpGeneric.glsl", "#define POINT_LIGHT_ENABLED\n");
 	pointLightSProg.uniVars.msNormalFai = pointLightSProg.findUniVar("msNormalFai");
 	pointLightSProg.uniVars.msDiffuseFai = pointLightSProg.findUniVar("msDiffuseFai");
 	pointLightSProg.uniVars.msSpecularFai = pointLightSProg.findUniVar("msSpecularFai");
@@ -112,7 +113,7 @@ void Renderer::Is::init()
 	pointLightSProg.uniVars.lightDiffuseCol = pointLightSProg.findUniVar("lightDiffuseCol");
 	pointLightSProg.uniVars.lightSpecularCol = pointLightSProg.findUniVar("lightSpecularCol");
 
-	spotLightNoShadowSProg.customLoad("shaders/IsLpGeneric.glsl", "#define _SPOT_LIGHT_\n");
+	spotLightNoShadowSProg.customLoad("shaders/IsLpGeneric.glsl", "#define SPOT_LIGHT_ENABLED\n");
 	spotLightNoShadowSProg.uniVars.msNormalFai = spotLightNoShadowSProg.findUniVar("msNormalFai");
 	spotLightNoShadowSProg.uniVars.msDiffuseFai = spotLightNoShadowSProg.findUniVar("msDiffuseFai");
 	spotLightNoShadowSProg.uniVars.msSpecularFai = spotLightNoShadowSProg.findUniVar("msSpecularFai");
@@ -125,7 +126,7 @@ void Renderer::Is::init()
 	spotLightNoShadowSProg.uniVars.lightTex = spotLightNoShadowSProg.findUniVar("lightTex");
 	spotLightNoShadowSProg.uniVars.texProjectionMat = spotLightNoShadowSProg.findUniVar("texProjectionMat");
 
-	string pps = "#define SHADOWMAP_SIZE " + Util::intToStr(sm.resolution) + "\n#define _SPOT_LIGHT_\n#define _SHADOW_\n";
+	string pps = "#define SHADOWMAP_SIZE " + Util::intToStr(sm.resolution) + "\n#define SPOT_LIGHT_ENABLED\n#define SHADOW_ENABLED\n";
 	if(sm.pcfEnabled)
 		pps += "#define PCF_ENABLED";
 	spotLightShadowSProg.customLoad("shaders/IsLpGeneric.glsl", pps.c_str());

+ 3 - 1
src/Renderer/MainRenderer.cpp

@@ -1,6 +1,7 @@
 #include <cstdlib>
 #include <cstdio>
 #include <jpeglib.h>
+#include <fstream>
 #include "MainRenderer.h"
 #include "App.h"
 #include "RendererInitializer.h"
@@ -83,7 +84,8 @@ void MainRenderer::render(Camera& cam_)
 	glDisable(GL_DEPTH_TEST);
 	glDisable(GL_BLEND);
 	sProg.bind();
-	sProg.findUniVar("rasterImage")->setTexture(bs.refractFai, 0);
+	//sProg.findUniVar("rasterImage")->setTexture(is.fai, 0);
+	sProg.findUniVar("rasterImage")->setTexture(pps.postPassFai, 0);
 	drawQuad(0);
 }
 

+ 5 - 0
src/Renderer/Ms.cpp

@@ -27,6 +27,11 @@ void Renderer::Ms::init()
 		FATAL("Failed to create one MS FAI. See prev error");
 	}
 
+	normalFai.setRepeat(false);
+	diffuseFai.setRepeat(false);
+	specularFai.setRepeat(false);
+	depthFai.setRepeat(true);
+
 
 	// attach the buffers to the FBO
 	glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, normalFai.getGlId(), 0);

+ 1 - 0
src/Renderer/Pps.cpp

@@ -18,6 +18,7 @@ void Renderer::Pps::initPassFbo(Fbo& fbo, Texture& fai, const char* msg)
 	fbo.setNumOfColorAttachements(1);
 
 	fai.createEmpty2D(r.width, r.height, GL_RGB, GL_RGB, GL_FLOAT, false);
+	fai.setRepeat(false);
 
 	glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, fai.getGlId(), 0);
 

+ 2 - 2
src/Renderer/Renderer.cpp

@@ -197,8 +197,8 @@ void Renderer::setupMaterial(const Material& mtl, const SceneNode& sceneNode, co
 	if(mtl.stdUniVars[Material::SUV_PPS_PRE_PASS_FAI])
 		mtl.stdUniVars[Material::SUV_PPS_PRE_PASS_FAI]->setTexture(pps.prePassFai, textureUnit++);
 
-	if(mtl.stdUniVars[Material::SUV_PPS_PRE_PASS_FAI])
-		mtl.stdUniVars[Material::SUV_PPS_PRE_PASS_FAI]->setTexture(pps.postPassFai, textureUnit++);
+	if(mtl.stdUniVars[Material::SUV_PPS_POST_PASS_FAI])
+		mtl.stdUniVars[Material::SUV_PPS_POST_PASS_FAI]->setTexture(pps.postPassFai, textureUnit++);
 
 
 	//

+ 2 - 1
src/Renderer/Renderer.h

@@ -89,6 +89,7 @@ class Renderer
 		class Is: private RenderingStage
 		{
 			friend class Renderer;
+			friend class MainRenderer;
 
 			public:
 				/**
@@ -185,13 +186,13 @@ class Renderer
 				};
 
 			public:
-				Texture fai;
 				Sm sm;
 				Smo smo;
 
 				Is(Renderer& r_): RenderingStage(r_), sm(r_), smo(r_) {}
 
 			private:
+				Texture fai;
 				Fbo fbo; ///< This FBO writes to the Is::fai
 				uint stencilRb; ///< Illumination stage stencil buffer
 				AmbientShaderProg ambientPassSProg; ///< Illumination stage ambient pass shader program

+ 1 - 2
src/Renderer/Smo.cpp

@@ -35,11 +35,10 @@ void Renderer::Is::Smo::init()
 void Renderer::Is::Smo::run(const PointLight& light)
 {
 	// set GL
-	glClear(GL_STENCIL_BUFFER_BIT);
 	glStencilFunc(GL_ALWAYS, 0x1, 0x1);
 	glStencilOp(GL_KEEP, GL_KEEP, GL_REPLACE);
 	glColorMask(false, false, false, false);
-
+	glClear(GL_STENCIL_BUFFER_BIT);
 
 	glDisable(GL_CULL_FACE);
 

+ 1 - 0
src/Resources/Helpers/Image.cpp

@@ -1,4 +1,5 @@
 #include <SDL/SDL_image.h>
+#include <fstream>
 #include "Image.h"
 #include "Util.h"
 

+ 1 - 0
src/Resources/Helpers/ShaderPrePreprocessor.cpp

@@ -1,4 +1,5 @@
 #include <iomanip>
+#include <cstring>
 #include "ShaderPrePreprocessor.h"
 #include "Scanner.h"
 #include "Parser.h"

+ 1 - 0
src/Resources/LightProps.cpp

@@ -1,3 +1,4 @@
+#include <cstring>
 #include "LightProps.h"
 #include "Parser.h"
 #include "Texture.h"

+ 1 - 0
src/Resources/ResourceContainer.h

@@ -51,6 +51,7 @@ template<typename Type> class ResourceContainer: public Vec<Type*>
 		Iterator findByPtr(Type* ptr);
 }; // end class ResourceContainer
 
+
 #include "ResourceContainer.inl.h"
 
 #endif

+ 11 - 5
src/Resources/ResourceContainer.inl.h

@@ -4,7 +4,8 @@
 //======================================================================================================================
 // findByName                                                                                                          =
 //======================================================================================================================
-template<typename Type> typename ResourceContainer<Type>::Iterator ResourceContainer<Type>::findByName(const char* name)
+template<typename Type>
+typename ResourceContainer<Type>::Iterator ResourceContainer<Type>::findByName(const char* name)
 {
 	Iterator it = BaseClass::begin();
 	while(it != BaseClass::end())
@@ -21,7 +22,9 @@ template<typename Type> typename ResourceContainer<Type>::Iterator ResourceConta
 //======================================================================================================================
 // findByNameAndPath                                                                                                   =
 //======================================================================================================================
-template<typename Type> typename ResourceContainer<Type>::Iterator ResourceContainer<Type>::findByNameAndPath(const char* name, const char* path)
+template<typename Type>
+typename ResourceContainer<Type>::Iterator ResourceContainer<Type>::findByNameAndPath(const char* name,
+                                                                                      const char* path)
 {
 	Iterator it = BaseClass::begin();
 	while(it != BaseClass::end())
@@ -38,7 +41,8 @@ template<typename Type> typename ResourceContainer<Type>::Iterator ResourceConta
 //======================================================================================================================
 // findByPtr                                                                                                           =
 //======================================================================================================================
-template<typename Type> typename ResourceContainer<Type>::Iterator ResourceContainer<Type>::findByPtr(Type* ptr)
+template<typename Type>
+typename ResourceContainer<Type>::Iterator ResourceContainer<Type>::findByPtr(Type* ptr)
 {
 	Iterator it = BaseClass::begin();
 	while(it != BaseClass::end())
@@ -55,7 +59,8 @@ template<typename Type> typename ResourceContainer<Type>::Iterator ResourceConta
 //======================================================================================================================
 // load                                                                                                                =
 //======================================================================================================================
-template<typename Type> Type* ResourceContainer<Type>::load(const char* fname)
+template<typename Type>
+Type* ResourceContainer<Type>::load(const char* fname)
 {
 	char* name = Util::cutPath(fname);
 	string path = Util::getPath(fname);
@@ -89,7 +94,8 @@ template<typename Type> Type* ResourceContainer<Type>::load(const char* fname)
 //======================================================================================================================
 // unload                                                                                                              =
 //======================================================================================================================
-template<typename Type> void ResourceContainer<Type>::unload(Type* x)
+template<typename Type>
+void ResourceContainer<Type>::unload(Type* x)
 {
 	Iterator it = findByPtr(x);
 	if(it == BaseClass::end())

+ 5 - 5
src/Resources/ShaderProg.h

@@ -2,8 +2,8 @@
 #define _SHADER_PROG_H_
 
 #include <GL/glew.h>
-#include <map>
 #include <limits>
+#include <boost/unordered_map.hpp>
 #include "Common.h"
 #include "Resource.h"
 #include "Math.h"
@@ -160,10 +160,10 @@ class ShaderProg: public Resource
 		static string stdSourceCode;
 		Vec<UniVar> uniVars; ///< All the uniform variables
 		Vec<AttribVar> attribVars; ///< All the attribute variables
-		map<string,UniVar*> uniNameToVar;  ///< A map for quick variable searching
-		map<string,AttribVar*> attribNameToVar; ///< @see uniNameToVar
-		typedef map<string,UniVar*>::const_iterator NameToUniVarIterator; ///< Uniform variable name to variable iterator
-		typedef map<string,AttribVar*>::const_iterator NameToAttribVarIterator; ///< Attribute variable name to variable iterator
+		boost::unordered_map<string,UniVar*> uniNameToVar;  ///< A UnorderedMap for quick variable searching
+		boost::unordered_map<string,AttribVar*> attribNameToVar; ///< @see uniNameToVar
+		typedef boost::unordered_map<string,UniVar*>::const_iterator NameToUniVarIterator; ///< Uniform variable name to variable iterator
+		typedef boost::unordered_map<string,AttribVar*>::const_iterator NameToAttribVarIterator; ///< Attribute variable name to variable iterator
 
 		/**
 		 * After the linking of the shader prog is done gather all the vars in custom containers

+ 2 - 1
src/Resources/Skeleton.cpp

@@ -1,3 +1,4 @@
+#include <cstring>
 #include "Skeleton.h"
 #include "Scanner.h"
 #include "Parser.h"
@@ -57,7 +58,7 @@ bool Skeleton::load(const char* filename)
 		// parent
 		token = &scanner.getNextToken();
 		if((token->getCode() != Scanner::TC_NUMBER || token->getDataType() != Scanner::DT_INT) &&
-		    (token->getCode() != Scanner::TC_IDENTIFIER || strcmp(token->getValue().getString(), "NULL")!=0))
+		   (token->getCode() != Scanner::TC_IDENTIFIER || strcmp(token->getValue().getString(), "NULL")!=0))
 		{
 			PARSE_ERR_EXPECTED("integer or NULL");
 			return false;

+ 2 - 0
src/Scene/Camera.h

@@ -1,6 +1,8 @@
 #ifndef _CAMERA_H_
 #define _CAMERA_H_
 
+#include <fstream>
+#include <cstring>
 #include "Common.h"
 #include "collision.h"
 #include "SceneNode.h"

+ 1 - 0
src/Scene/SkelModelNode.cpp

@@ -1,3 +1,4 @@
+#include <cstring>
 #include "SkelModelNode.h"
 #include "Parser.h"
 #include "SkelNode.h"

+ 1 - 0
src/Util/Common.cpp

@@ -1,3 +1,4 @@
+#include <iostream>
 #include <GL/glew.h>
 #include <GL/glu.h>
 #include "Common.h"

+ 0 - 41
src/Util/Common.h

@@ -1,13 +1,7 @@
 #ifndef _COMMON_H_
 #define _COMMON_H_
 
-#include <cstdlib>
-#include <cstdio>
-#include <cstring>
-#include <fstream>
-#include <cstdio>
 #include <iostream>
-#include <vector>
 
 using namespace std;
 
@@ -152,41 +146,6 @@ template <typename Type> inline void memZero(Type& t)
 }
 
 
-//======================================================================================================================
-// Memory allocation information for Linux                                                                             =
-//======================================================================================================================
-#if defined(PLATFORM_LINUX)
-
-#include <malloc.h>
-
-typedef struct mallinfo Mallinfo; 
-
-inline Mallinfo GetMallInfo()
-{
-	return mallinfo();
-}
-
-inline void printMallInfo(const Mallinfo& minfo)
-{
-	PRINT("used:" << minfo.uordblks << " free:" << minfo.fordblks << " total:" << minfo.arena);
-}
-
-inline void printMallInfoDiff(const Mallinfo& prev, const Mallinfo& now)
-{
-	Mallinfo diff;
-	diff.uordblks = now.uordblks-prev.uordblks;
-	diff.fordblks = now.fordblks-prev.fordblks;
-	diff.arena = now.arena-prev.arena;
-	printMallInfo(diff);
-}
-
-#define MALLINFO_BEGIN Mallinfo __m__ = GetMallInfo();
-
-#define MALLINFO_END printMallInfoDiff(__m__, GetMallInfo()); 
-
-#endif
-
-
 //======================================================================================================================
 // Application                                                                                                         =
 //======================================================================================================================

+ 38 - 0
src/Util/LinuxMalinfo.h

@@ -0,0 +1,38 @@
+#ifndef LINUXMALINFO_H
+#define LINUXMALINFO_H
+
+#include "Common.h"
+
+
+#if defined(PLATFORM_LINUX)
+
+	#include <malloc.h>
+
+	typedef struct mallinfo Mallinfo;
+
+	inline Mallinfo GetMallInfo()
+	{
+		return mallinfo();
+	}
+
+	inline void printMallInfo(const Mallinfo& minfo)
+	{
+		PRINT("used:" << minfo.uordblks << " free:" << minfo.fordblks << " total:" << minfo.arena);
+	}
+
+	inline void printMallInfoDiff(const Mallinfo& prev, const Mallinfo& now)
+	{
+		Mallinfo diff;
+		diff.uordblks = now.uordblks-prev.uordblks;
+		diff.fordblks = now.fordblks-prev.fordblks;
+		diff.arena = now.arena-prev.arena;
+		printMallInfo(diff);
+	}
+
+	#define MALLINFO_BEGIN Mallinfo __m__ = GetMallInfo();
+
+	#define MALLINFO_END printMallInfoDiff(__m__, GetMallInfo());
+
+#endif
+
+#endif

+ 3 - 3
src/Util/Tokenizer/Scanner.cpp

@@ -1,7 +1,7 @@
 #include <fstream>
-#include <stdio.h>
-#include <string.h>
-#include <math.h>
+#include <iostream>
+#include <cstring>
+#include <cmath>
 #include <sstream>
 #include <iomanip>
 #include "Scanner.h"

+ 1 - 0
src/Util/Tokenizer/Scanner.h

@@ -2,6 +2,7 @@
 #define _SCANNER_H_
 
 #include <sstream>
+#include <fstream>
 #include "Common.h"
 
 

+ 4 - 1
src/Util/Util.cpp

@@ -1,5 +1,8 @@
+#include <cstdlib>
+#include <cmath>
+#include <cstring>
+#include <fstream>
 #include "Util.h"
-#include <math.h>
 
 
 namespace Util {

Энэ ялгаанд хэт олон файл өөрчлөгдсөн тул зарим файлыг харуулаагүй болно