Subversion Repository Public Repository

Divide-Framework

This repository has no backups
This repository's network speed is throttled to 100KB/sec

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
#include "Headers/XMLParser.h"
#include "Core/Headers/ParamHandler.h"
#include "Core/Headers/Application.h"
#include "Managers/Headers/SceneManager.h"
#include "Environment/Terrain/Headers/TerrainDescriptor.h"
#include "SceneList.h"

namespace XML {

	ParamHandler &par = ParamHandler::getInstance();
	using boost::property_tree::ptree;
	ptree pt;
	std::string activeScene("MainScene");

	void loadScripts(const std::string& file){

		PRINT_FN("XML: Loading Scripts!");
		read_xml(file,pt);
		par.setParam("scriptLocation",pt.get("scriptLocation","XML"));
		par.setParam("assetsLocation",pt.get("assets","Assets"));
		par.setParam("scenesLocation",pt.get("scenes","Scenes"));
		par.setParam("serverAddress",pt.get("server","127.0.0.1"));
		loadConfig(par.getParam<std::string>("scriptLocation") + "/" + pt.get("config","config.xml"));

		read_xml(par.getParam<std::string>("scriptLocation") + "/" +
			     par.getParam<std::string>("scenesLocation") + "/Scenes.xml",pt);
		activeScene = pt.get("MainScene",activeScene);
		loadScene(activeScene); 
		
	}

	void loadConfig(const std::string& file) {

		pt.clear();
		PRINT_F("XML: Loading Configuration settings file: [ %s ]\n", file.c_str());
		read_xml(file,pt);
		par.setParam("logFile",pt.get("debug.logFile","none"));
		par.setParam("memFile",pt.get("debug.memFile","none"));
		par.setParam("groundPos", pt.get("runtime.groundPos",-2000.0f));
		par.setParam("simSpeed",pt.get("runtime.simSpeed",1));
		par.setParam("appTitle",pt.get("title","DIVIDE Framework"));
		par.setParam("detailLevel",pt.get<U8>("rendering.detailLevel",HIGH));
		par.setParam("enableShadows",pt.get("rendering.enableShadows", true));
		par.setParam("shadowDetailLevel",pt.get<U8>("rendering.shadowDetailLevel",HIGH));
		par.setParam("defaultTextureLocation",pt.get("defaultTextureLocation","textures/"));
		par.setParam("shaderLocation",pt.get("defaultShadersLocation","shaders/"));
		I32 winWidth = pt.get("runtime.windowWidth",1024.0f);
		I32 winHeight = pt.get("runtime.windowHeight",768.0f);
		par.setParam("zNear",(F32)pt.get("runtime.zNear",0.1f));
		par.setParam("zFar",(F32)pt.get("runtime.zFar",1200.0f));
		par.setParam("verticalFOV",(F32)pt.get("runtime.verticalFOV",60));
		par.setParam("aspectRatio",1.0f * winWidth / winHeight);
		par.setParam("windowWidth",winWidth);
		par.setParam("windowHeight",winHeight);
		
		Application::getInstance().setWindowHeight(winHeight);
		Application::getInstance().setWindowWidth(winWidth);
		bool postProcessing = pt.get("rendering.enablePostFX",false);
		par.setParam("postProcessing.enablePostFX",postProcessing);
		if(postProcessing){
			bool enable3D = pt.get("rendering.enable3D",false);
			par.setParam("postProcessing.enable3D",enable3D);
			if(enable3D){
				par.setParam("postProcessing.anaglyphOffset",pt.get("rendering.anaglyphOffset",0.16f));
			}
			par.setParam("postProcessing.enableNoise",pt.get("rendering.enableNoise",false));
			par.setParam("postProcessing.enableDepthOfField",pt.get("rendering.enableDepthOfField",false));
			par.setParam("postProcessing.enableBloom",pt.get("rendering.enableBloom",false));
			par.setParam("postProcessing.enableSSAO",pt.get("rendering.enableSSAO",false));
		}
		par.setParam("mesh.playAnimations",pt.get("mesh.playAnimations",true));
	}

	void loadScene(const std::string& sceneName) {

		pt.clear();
		SceneManager& scnMGR = SceneManager::getInstance();
		PRINT_F("XML: Loading scene [ %s ]\n", sceneName.c_str());
		try{
			read_xml(par.getParam<std::string>("scriptLocation") + "/" +
				     par.getParam<std::string>("scenesLocation") + "/" +
					 sceneName + ".xml", pt);
		}catch(	boost::property_tree::xml_parser_error & e ){
			ERROR_FN("Invalid Scene!. Could not find [ %s ]",sceneName.c_str());
			std::string error = e.what();
			error += " [check error log!]";
			throw error.c_str();
		}
		par.setParam("currentScene",sceneName);
		Scene* scene = scnMGR.loadScene(sceneName);

		if(!scene)	{
			ERROR_F("XML: Trying to load unsupported scene! Defaulting to default scene\n");
			scene = New MainScene();
		}

		scnMGR.setActiveScene(scene);
		scene->setName(sceneName);

		scene->getGrassVisibility() = pt.get("vegetation.grassVisibility",1000.0f);
		scene->getTreeVisibility()  = pt.get("vegetation.treeVisibility",1000.0f);
		scene->getGeneralVisibility()  = pt.get("options.visibility",1000.0f);

		scene->getWindDirX()  = pt.get("wind.windDirX",1.0f);
		scene->getWindDirZ()  = pt.get("wind.windDirZ",1.0f);
		scene->getWindSpeed() = pt.get("wind.windSpeed",1.0f);

		scene->getWaterLevel() = pt.get("water.waterLevel",RAND_MAX);
		scene->getWaterDepth() = pt.get("water.waterDepth",-75);
		std::string sceneLocation = par.getParam<std::string>("scriptLocation") + "/" + 
				                    par.getParam<std::string>("scenesLocation") + "/" + sceneName + "/";

		loadTerrain(sceneLocation   + pt.get("terrain","terrain.xml"));
		loadGeometry(sceneLocation  + pt.get("assets","assets.xml"));
	}



	void loadTerrain(const std::string &file) {

		pt.clear();
		PRINT_F("XML: Loading terrain: [ %s ]\n",file.c_str());
		read_xml(file,pt);
		ptree::iterator it;
		std::string assetLocation = ParamHandler::getInstance().getParam<std::string>("assetsLocation") + "/"; 
		for (it = pt.get_child("terrainList").begin(); it != pt.get_child("terrainList").end(); ++it )	{
			std::string name = it->second.data(); //The actual terrain name
			std::string tag = it->first.data();   //The <name> tag for valid terrains or <xmlcomment> for comments
			//Check and skip commented terrain
			if(tag.find("<xmlcomment>") != std::string::npos) continue;
			//Load the rest of the terrain
			TerrainDescriptor* ter = CreateResource<TerrainDescriptor>(name+"_descriptor");
			ter->addVariable("terrainName",name);
			ter->addVariable("heightmap",assetLocation + pt.get<std::string>(name + ".heightmap"));
			ter->addVariable("textureMap",assetLocation + pt.get<std::string>(name + ".textures.map"));
			ter->addVariable("redTexture",assetLocation + pt.get<std::string>(name + ".textures.red"));
			ter->addVariable("greenTexture",assetLocation + pt.get<std::string>(name + ".textures.green"));
			ter->addVariable("blueTexture",assetLocation + pt.get<std::string>(name + ".textures.blue"));
			ter->addVariable("alphaTexture",assetLocation + pt.get<std::string>(name + ".textures.alpha","none"));
			ter->addVariable("normalMap",assetLocation + pt.get<std::string>(name + ".textures.normalMap"));
			ter->addVariable("waterCaustics",assetLocation + pt.get<std::string>(name + ".textures.waterCaustics"));
			ter->addVariable("grassMap",assetLocation + pt.get<std::string>(name + ".vegetation.map"));
			ter->addVariable("grassBillboard1",assetLocation + pt.get<std::string>(name + ".vegetation.grassBillboard1"));
			ter->addVariable("grassBillboard2",assetLocation + pt.get<std::string>(name + ".vegetation.grassBillboard2"));
			ter->addVariable("grassBillboard3",assetLocation + pt.get<std::string>(name + ".vegetation.grassBillboard3"));
			//ter->addVariable("grassBillboard1",pt.get<std::string>(name + ".vegetation.grassBillboard1"));
			ter->setGrassDensity(pt.get<U32>(name + ".vegetation.<xmlattr>.grassDensity"));
			ter->setTreeDensity(pt.get<U16>(name + ".vegetation.<xmlattr>.treeDensity"));
			ter->setGrassScale(pt.get<F32>(name + ".vegetation.<xmlattr>.grassScale"));
			ter->setTreeScale(pt.get<F32>(name + ".vegetation.<xmlattr>.treeScale"));

			ter->setPosition(vec3<F32>(pt.get<F32>(name + ".position.<xmlattr>.x"),
								       pt.get<F32>(name + ".position.<xmlattr>.y"),
								       pt.get<F32>(name + ".position.<xmlattr>.z")));
			ter->setScale(vec2<F32>(pt.get<F32>(name + ".scale"), //width / length
							        pt.get<F32>(name + ".heightFactor"))); //height
							   

			ter->setActive(pt.get<bool>(name + ".active"));
			
			SceneManager::getInstance().addTerrain(ter);
			
		}
		PRINT_F("XML: Number of terrains to load: %d\n",SceneManager::getInstance().getNumberOfTerrains());
	}

	void loadGeometry(const std::string &file) 	{

		pt.clear();
		PRINT_F("XML: Loading Geometry: [ %s ]\n",file.c_str());
		read_xml(file,pt);
		ptree::iterator it;
		std::string assetLocation = ParamHandler::getInstance().getParam<std::string>("assetsLocation")+"/";

		if(boost::optional<ptree &> geometry = pt.get_child_optional("geometry"))
		for (it = pt.get_child("geometry").begin(); it != pt.get_child("geometry").end(); ++it ) 	{
			std::string name = it->second.data();
			std::string format = it->first.data();
			if(format.find("<xmlcomment>") != std::string::npos) continue;
			FileData model;
			model.ItemName = name;
			model.ModelName  = assetLocation + pt.get<std::string>(name + ".model");
			model.position.x = pt.get<F32>(name + ".position.<xmlattr>.x",1);
			model.position.y = pt.get<F32>(name + ".position.<xmlattr>.y",1);
			model.position.z = pt.get<F32>(name + ".position.<xmlattr>.z",1);
			model.orientation.x = pt.get<F32>(name + ".orientation.<xmlattr>.x");
			model.orientation.y = pt.get<F32>(name + ".orientation.<xmlattr>.y");
			model.orientation.z = pt.get<F32>(name + ".orientation.<xmlattr>.z");
			model.scale.x    = pt.get<F32>(name + ".scale.<xmlattr>.x"); 
			model.scale.y    = pt.get<F32>(name + ".scale.<xmlattr>.y"); 
			model.scale.z    = pt.get<F32>(name + ".scale.<xmlattr>.z"); 
			model.type = GEOMETRY;
			model.version = pt.get<F32>(name + ".version");
			SceneManager::getInstance().addModel(model);
		}

		if(boost::optional<ptree &> vegetation = pt.get_child_optional("vegetation"))
		for (it = pt.get_child("vegetation").begin(); it != pt.get_child("vegetation").end(); ++it ) {

			std::string name = it->second.data();
			std::string format = it->first.data();
			if(format.find("<xmlcomment>") != std::string::npos) continue;
			FileData model;
			model.ItemName = name;
			model.ModelName  = assetLocation + pt.get<std::string>(name + ".model");
			model.position.x = pt.get<F32>(name + ".position.<xmlattr>.x");
			model.position.y = pt.get<F32>(name + ".position.<xmlattr>.y");
			model.position.z = pt.get<F32>(name + ".position.<xmlattr>.z");
			model.orientation.x = pt.get<F32>(name + ".orientation.<xmlattr>.x");
			model.orientation.y = pt.get<F32>(name + ".orientation.<xmlattr>.y");
			model.orientation.z = pt.get<F32>(name + ".orientation.<xmlattr>.z");
			model.scale.x    = pt.get<F32>(name + ".scale.<xmlattr>.x"); 
			model.scale.y    = pt.get<F32>(name + ".scale.<xmlattr>.y"); 
			model.scale.z    = pt.get<F32>(name + ".scale.<xmlattr>.z"); 
			model.type = VEGETATION;
			model.version = pt.get<F32>(name + ".version");
			SceneManager::getInstance().addModel(model);
		}

		if(boost::optional<ptree &> primitives = pt.get_child_optional("primitives"))
		for (it = pt.get_child("primitives").begin(); it != pt.get_child("primitives").end(); ++it ) {

			std::string name = it->second.data();
			std::string format = it->first.data();
			if(format.find("<xmlcomment>") != std::string::npos) continue;

			FileData model;
			model.ItemName = name;
			model.ModelName = pt.get<std::string>(name + ".model");
			model.position.x = pt.get<F32>(name + ".position.<xmlattr>.x");
			model.position.y = pt.get<F32>(name + ".position.<xmlattr>.y");
			model.position.z = pt.get<F32>(name + ".position.<xmlattr>.z");
			model.orientation.x = pt.get<F32>(name + ".orientation.<xmlattr>.x");
			model.orientation.y = pt.get<F32>(name + ".orientation.<xmlattr>.y");
			model.orientation.z = pt.get<F32>(name + ".orientation.<xmlattr>.z");
			model.scale.x    = pt.get<F32>(name + ".scale.<xmlattr>.x"); 
			model.scale.y    = pt.get<F32>(name + ".scale.<xmlattr>.y"); 
			model.scale.z    = pt.get<F32>(name + ".scale.<xmlattr>.z"); 
			model.color.r    = pt.get<F32>(name + ".color.<xmlattr>.r"); 
			model.color.g    = pt.get<F32>(name + ".color.<xmlattr>.g"); 
			model.color.b    = pt.get<F32>(name + ".color.<xmlattr>.b");
			/*The data variable stores a float variable (not void*) that can represent anything you want*/
			/*For Text3D, it's the line width and for Box3D it's the edge length*/
			if(model.ModelName.compare("Text3D") == 0){
				model.data = pt.get<F32>(name + ".lineWidth");
				model.data2 = pt.get<std::string>(name + ".text");
			}else if(model.ModelName.compare("Box3D") == 0)
				model.data = pt.get<F32>(name + ".size");
			else if(model.ModelName.compare("Sphere3D") == 0)
				model.data = pt.get<F32>(name + ".radius");
			else model.data = 0;
			
			model.type = PRIMITIVE;
			model.version = pt.get<F32>(name + ".version");
			SceneManager::getInstance().addModel(model);
		}
	}

	Material* loadMaterial(const std::string &file){
	
		std::string location = par.getParam<std::string>("scriptLocation") + "/" + 
				                    par.getParam<std::string>("scenesLocation") + "/" +
									par.getParam<std::string>("currentScene") + "/materials/";

		return loadMaterialXML(location+file);
		
	}

	Material* loadMaterialXML(const std::string &matName){
		pt.clear();
		std::ifstream inp;
		inp.open(std::string(matName+".xml").c_str(), std::ifstream::in);
		inp.close();
		if(inp.fail()){
			inp.clear(std::ios::failbit);
			return NULL;
		}
		bool skip = false;
		PRINT_FN("Loading material from XML file [ %s ]",matName.c_str());
		read_xml(matName+".xml",pt);
		std::string materialName = matName.substr(matName.rfind("/")+1,matName.length());
		if(FindResource(materialName)) skip = true;
		Material* mat = CreateResource<Material>(ResourceDescriptor(materialName));
		if(skip) return mat;
		mat->setDiffuse(vec4<F32>(pt.get<F32>("material.diffuse.<xmlattr>.r",0.6f),
								  pt.get<F32>("material.diffuse.<xmlattr>.g",0.6f),
								  pt.get<F32>("material.diffuse.<xmlattr>.b",0.6f),
								  pt.get<F32>("material.diffuse.<xmlattr>.a",1.f)));
		mat->setAmbient(vec4<F32>(pt.get<F32>("material.ambient.<xmlattr>.r",0.6f),
								  pt.get<F32>("material.ambient.<xmlattr>.g",0.6f),
								  pt.get<F32>("material.ambient.<xmlattr>.b",0.6f),
								  pt.get<F32>("material.ambient.<xmlattr>.a",1.f)));
		mat->setSpecular(vec4<F32>(pt.get<F32>("material.specular.<xmlattr>.r",1.f),
								   pt.get<F32>("material.specular.<xmlattr>.g",1.f),
								   pt.get<F32>("material.specular.<xmlattr>.b",1.f),
								   pt.get<F32>("material.specular.<xmlattr>.a",1.f)));
		mat->setEmissive(vec3<F32>(pt.get<F32>("material.emissive.<xmlattr>.r",1.f),
			                       pt.get<F32>("material.emissive.<xmlattr>.g",1.f),
							       pt.get<F32>("material.emissive.<xmlattr>.b",1.f)));
		mat->setShininess(pt.get<F32>("material.shininess.<xmlattr>.v",50.f));
		mat->setDoubleSided(pt.get<bool>("material.doubleSided",false));
		if(boost::optional<ptree &> child = pt.get_child_optional("diffuseTexture1")){
			mat->setTexture(Material::TEXTURE_BASE,loadTextureXML(pt.get("diffuseTexture1.file","none")),
							mat->getTextureOperation(pt.get("diffuseTexture1.operation",0)));
		}
		if(boost::optional<ptree &> child = pt.get_child_optional("diffuseTexture2")){
			mat->setTexture(Material::TEXTURE_SECOND,loadTextureXML(pt.get("diffuseTexture2.file","none")),
							mat->getTextureOperation(pt.get("diffuseTexture2.operation",0)));
		}
		if(boost::optional<ptree &> child = pt.get_child_optional("bumpMap")){
			mat->setTexture(Material::TEXTURE_BUMP,loadTextureXML(pt.get("bumpMap.file","none")),
							mat->getTextureOperation(pt.get("bumpMap.operation",0)));
		}
		if(boost::optional<ptree &> child = pt.get_child_optional("opacityMap")){
			mat->setTexture(Material::TEXTURE_OPACITY,loadTextureXML(pt.get("opacityMap.file","none")),
							mat->getTextureOperation(pt.get("opacityMap.operation",0)));
		}
		if(boost::optional<ptree &> child = pt.get_child_optional("specularMap")){
			mat->setTexture(Material::TEXTURE_SPECULAR,loadTextureXML(pt.get("specularMap.file","none")),
							mat->getTextureOperation(pt.get("specularMap.operation",0)));
		}
		if(boost::optional<ptree &> child = pt.get_child_optional("shaderProgram")){
			mat->setShaderProgram(pt.get("shaderProgram.effect","NULL_SHADER"));
		}
		if(boost::optional<ptree &> child = pt.get_child_optional("shadows")){
			mat->setCastsShadows(pt.get<bool>("shadows.castsShadows", true));
			mat->setReceivesShadows(pt.get<bool>("shadows.receiveShadows", true));
		}
		return mat;

	}

	void dumpMaterial(Material* const mat){
		std::string file = mat->getName();
		file = file.substr(file.rfind("/")+1,file.length());

		std::string location = par.getParam<std::string>("scriptLocation") + "/" + 
				                    par.getParam<std::string>("scenesLocation") + "/" +
									par.getParam<std::string>("currentScene") + "/materials/";
		
		std::string fileLocation = location +  file + ".xml";
		if(!mat->isDirty()) return;
		pt.clear();
		pt.put("material.name",file);
		pt.put("material.ambient.<xmlattr>.r",mat->getMaterialMatrix().getCol(0).x);
		pt.put("material.ambient.<xmlattr>.g",mat->getMaterialMatrix().getCol(0).y);
		pt.put("material.ambient.<xmlattr>.b",mat->getMaterialMatrix().getCol(0).z);
		pt.put("material.ambient.<xmlattr>.a",mat->getMaterialMatrix().getCol(0).w);
		pt.put("material.diffuse.<xmlattr>.r",mat->getMaterialMatrix().getCol(1).x);
		pt.put("material.diffuse.<xmlattr>.g",mat->getMaterialMatrix().getCol(1).y);
		pt.put("material.diffuse.<xmlattr>.b",mat->getMaterialMatrix().getCol(1).z);
		pt.put("material.diffuse.<xmlattr>.a",mat->getMaterialMatrix().getCol(1).w);
		pt.put("material.specular.<xmlattr>.r",mat->getMaterialMatrix().getCol(2).x);
		pt.put("material.specular.<xmlattr>.g",mat->getMaterialMatrix().getCol(2).y);
		pt.put("material.specular.<xmlattr>.b",mat->getMaterialMatrix().getCol(2).z);
		pt.put("material.specular.<xmlattr>.a",mat->getMaterialMatrix().getCol(2).w);
		pt.put("material.shininess.<xmlattr>.v",mat->getMaterialMatrix().getCol(3).x);
		pt.put("material.emissive.<xmlattr>.r",mat->getMaterialMatrix().getCol(3).y);
		pt.put("material.emissive.<xmlattr>.g",mat->getMaterialMatrix().getCol(3).z);
		pt.put("material.emissive.<xmlattr>.b",mat->getMaterialMatrix().getCol(3).w);
		pt.put("material.doubleSided", mat->isDoubleSided());
		Texture* baseTexture = mat->getTexture(Material::TEXTURE_BASE);

		if(baseTexture){
			pt.put("diffuseTexture1.file",baseTexture->getResourceLocation());
			U32 wrap[3] = {baseTexture->getTextureWrap(0),
						   baseTexture->getTextureWrap(1),
						   baseTexture->getTextureWrap(2)};
			if(wrap[0] ==  Texture::TextureWrap_Wrap){
				pt.put("diffuseTexture1.MapU","WRAP");
			}else if (wrap[0] ==  Texture::TextureWrap_Clamp){
				pt.put("diffuseTexture1.MapU","CLAMP");
			}else {
				pt.put("diffuseTexture1.MapU","REPEAT");
			}
			if(wrap[1] ==  Texture::TextureWrap_Wrap){
				pt.put("diffuseTexture1.MapV","WRAP");
			}else if (wrap[1] ==  Texture::TextureWrap_Clamp){
				pt.put("diffuseTexture1.MapV","CLAMP");
			}else {
				pt.put("diffuseTexture1.MapV","REPEAT");
			}
			if(wrap[2] ==  Texture::TextureWrap_Wrap){
				pt.put("diffuseTexture1.MapW","WRAP");
			}else if (wrap[2] ==  Texture::TextureWrap_Clamp){
				pt.put("diffuseTexture1.MapW","CLAMP");
			}else {
				pt.put("diffuseTexture1.MapW","REPEAT");
			}
			pt.put("diffuseTexture1.minFilter","LINEAR");
			pt.put("diffuseTexture1.magFilter","LINEAR");
			pt.put("diffuseTexture1.mipFilter",true);
			pt.put("diffuseTexture1.operation",mat->getTextureOperation(Material::TEXTURE_BASE));
		}
		Texture* secondTexture = mat->getTexture(Material::TEXTURE_SECOND);
		if(secondTexture){
			pt.put("diffuseTexture2.file",secondTexture->getResourceLocation());
			U32 wrap[3] = {secondTexture->getTextureWrap(0),
						   secondTexture->getTextureWrap(1),
						   secondTexture->getTextureWrap(2)};
			if(wrap[0] ==  Texture::TextureWrap_Wrap){
				pt.put("diffuseTexture1.MapU","WRAP");
			}else if (wrap[0] ==  Texture::TextureWrap_Clamp){
				pt.put("diffuseTexture1.MapU","CLAMP");
			}else {
				pt.put("diffuseTexture1.MapU","REPEAT");
			}
			if(wrap[1] ==  Texture::TextureWrap_Wrap){
				pt.put("diffuseTexture1.MapV","WRAP");
			}else if (wrap[1] ==  Texture::TextureWrap_Clamp){
				pt.put("diffuseTexture1.MapV","CLAMP");
			}else {
				pt.put("diffuseTexture1.MapV","REPEAT");
			}
			if(wrap[2] ==  Texture::TextureWrap_Wrap){
				pt.put("diffuseTexture1.MapW","WRAP");
			}else if (wrap[2] ==  Texture::TextureWrap_Clamp){
				pt.put("diffuseTexture1.MapW","CLAMP");
			}else {
				pt.put("diffuseTexture1.MapW","REPEAT");
			}
			pt.put("diffuseTexture2.minFilter","LINEAR");
			pt.put("diffuseTexture2.magFilter","LINEAR");
			pt.put("diffuseTexture2.mipFilter",true);
			pt.put("diffuseTexture2.operation",mat->getTextureOperation(Material::TEXTURE_SECOND));
		}
		Texture* bumpTexture = mat->getTexture(Material::TEXTURE_BUMP);
		if(bumpTexture){
			pt.put("bumpMap.file",bumpTexture->getResourceLocation());
			U32 wrap[3] = {bumpTexture->getTextureWrap(0),
						   bumpTexture->getTextureWrap(1),
						   bumpTexture->getTextureWrap(2)};
			if(wrap[0] ==  Texture::TextureWrap_Wrap){
				pt.put("diffuseTexture1.MapU","WRAP");
			}else if (wrap[0] ==  Texture::TextureWrap_Clamp){
				pt.put("diffuseTexture1.MapU","CLAMP");
			}else {
				pt.put("diffuseTexture1.MapU","REPEAT");
			}
			if(wrap[1] ==  Texture::TextureWrap_Wrap){
				pt.put("diffuseTexture1.MapV","WRAP");
			}else if (wrap[1] ==  Texture::TextureWrap_Clamp){
				pt.put("diffuseTexture1.MapV","CLAMP");
			}else {
				pt.put("diffuseTexture1.MapV","REPEAT");
			}
			if(wrap[2] ==  Texture::TextureWrap_Wrap){
				pt.put("diffuseTexture1.MapW","WRAP");
			}else if (wrap[2] ==  Texture::TextureWrap_Clamp){
				pt.put("diffuseTexture1.MapW","CLAMP");
			}else {
				pt.put("diffuseTexture1.MapW","REPEAT");
			}
			pt.put("bumpMap.minFilter","LINEAR");
			pt.put("bumpMap.magFilter","LINEAR");
			pt.put("bumpMap.mipFilter",true);
			pt.put("bumpMap.operation",mat->getTextureOperation(Material::TEXTURE_BUMP));
		}
		Texture* opacityMap = mat->getTexture(Material::TEXTURE_OPACITY);
		if(opacityMap){
			pt.put("opacityMap.file",opacityMap->getResourceLocation());
			U32 wrap[3] = {opacityMap->getTextureWrap(0),
						   opacityMap->getTextureWrap(1),
						   opacityMap->getTextureWrap(2)};
			if(wrap[0] ==  Texture::TextureWrap_Wrap){
				pt.put("diffuseTexture1.MapU","WRAP");
			}else if (wrap[0] ==  Texture::TextureWrap_Clamp){
				pt.put("diffuseTexture1.MapU","CLAMP");
			}else {
				pt.put("diffuseTexture1.MapU","REPEAT");
			}
			if(wrap[1] ==  Texture::TextureWrap_Wrap){
				pt.put("diffuseTexture1.MapV","WRAP");
			}else if (wrap[1] ==  Texture::TextureWrap_Clamp){
				pt.put("diffuseTexture1.MapV","CLAMP");
			}else {
				pt.put("diffuseTexture1.MapV","REPEAT");
			}
			if(wrap[2] ==  Texture::TextureWrap_Wrap){
				pt.put("diffuseTexture1.MapW","WRAP");
			}else if (wrap[2] ==  Texture::TextureWrap_Clamp){
				pt.put("diffuseTexture1.MapW","CLAMP");
			}else {
				pt.put("diffuseTexture1.MapW","REPEAT");
			}
			pt.put("opacityMap.minFilter","LINEAR");
			pt.put("opacityMap.magFilter","LINEAR");
			pt.put("opacityMap.mipFilter",true);
			pt.put("opacityMap.operation",mat->getTextureOperation(Material::TEXTURE_OPACITY));
		}
		Texture* specularMap = mat->getTexture(Material::TEXTURE_SPECULAR);
		if(specularMap){
			pt.put("specularMap.file",specularMap->getResourceLocation());
			U32 wrap[3] = {specularMap->getTextureWrap(0),
						   specularMap->getTextureWrap(1),
						   specularMap->getTextureWrap(2)};
			if(wrap[0] ==  Texture::TextureWrap_Wrap){
				pt.put("diffuseTexture1.MapU","WRAP");
			}else if (wrap[0] ==  Texture::TextureWrap_Clamp){
				pt.put("diffuseTexture1.MapU","CLAMP");
			}else {
				pt.put("diffuseTexture1.MapU","REPEAT");
			}
			if(wrap[1] ==  Texture::TextureWrap_Wrap){
				pt.put("diffuseTexture1.MapV","WRAP");
			}else if (wrap[1] ==  Texture::TextureWrap_Clamp){
				pt.put("diffuseTexture1.MapV","CLAMP");
			}else {
				pt.put("diffuseTexture1.MapV","REPEAT");
			}
			if(wrap[2] ==  Texture::TextureWrap_Wrap){
				pt.put("diffuseTexture1.MapW","WRAP");
			}else if (wrap[2] ==  Texture::TextureWrap_Clamp){
				pt.put("diffuseTexture1.MapW","CLAMP");
			}else {
				pt.put("diffuseTexture1.MapW","REPEAT");
			}
			pt.put("specularMap.minFilter","LINEAR");
			pt.put("specularMap.magFilter","LINEAR");
			pt.put("specularMap.mipFilter",true);
			pt.put("specularMap.operation",mat->getTextureOperation(Material::TEXTURE_SPECULAR));
		}
		
		ShaderProgram* s = mat->getShaderProgram();
		if(s){
			pt.put("shaderProgram.effect",s->getName());
		}

		pt.put("shadows.castsShadows", mat->getCastsShadows());
		pt.put("shadows.receiveShadows", mat->getReceivesShadows());
		boost::property_tree::xml_writer_settings<char> settings('\t', 1);
		FILE * xml = fopen(fileLocation.c_str(), "w");
		write_xml(fileLocation, pt,std::locale(),settings);
		fclose(xml);
	}


	Texture*  loadTextureXML(const std::string& textureName){
		std::string img_name = textureName.substr( textureName.find_last_of( '/' ) + 1 );
		std::string pathName = textureName.substr( 0, textureName.rfind("/")+1 );
		ResourceDescriptor texture(img_name);
		texture.setResourceLocation(pathName + img_name);
		texture.setFlag(true);
		Texture* tex1 = CreateResource<Texture2D>(texture);

		std::string clampU = pt.get("diffuseTexture1.MapU","CLAMP");
		std::string clampV = pt.get("diffuseTexture1.MapV","CLAMP");
		std::string clampW = pt.get("diffuseTexture1.MapW","CLAMP");
		Texture::TextureWrap wrapU = Texture::TextureWrap_Repeat;
		Texture::TextureWrap wrapV = Texture::TextureWrap_Repeat;
		Texture::TextureWrap wrapW = Texture::TextureWrap_Repeat;

		if(clampU.compare("WRAP")){
			wrapU = Texture::TextureWrap_Wrap;
		}else if (clampU.compare("CLAMP")){
			wrapU = Texture::TextureWrap_Clamp;
		}else if (clampU.compare("REPEAT")){
			wrapU = Texture::TextureWrap_Repeat;
		}else{
			ERROR_FN("Invalid U-map parameter for [ %s ]",textureName.c_str());
		}
		if(clampV.compare("WRAP")){
			wrapV = Texture::TextureWrap_Wrap;
		}else if (clampV.compare("CLAMP")){
			wrapV = Texture::TextureWrap_Clamp;
		}else if (clampV.compare("REPEAT")){
			wrapV = Texture::TextureWrap_Repeat;
		}else{
			ERROR_FN("Invalid V-map parameter for [ %s ]",textureName.c_str());
		}
		if(clampW.compare("WRAP")){
			wrapW = Texture::TextureWrap_Wrap;
		}else if (clampW.compare("CLAMP")){
			wrapW = Texture::TextureWrap_Clamp;
		}else if (clampW.compare("REPEAT")){
			wrapW = Texture::TextureWrap_Repeat;
		}else{
			ERROR_FN("Invalid W-map parameter for [ %s ]",textureName.c_str());
		}

		tex1->setTextureWrap(wrapU,wrapV,wrapW);

		std::string minFilter = pt.get("diffuseTexture1.minFilter","LINEAR");
		std::string magFilter = pt.get("diffuseTexture1.magFilter","LINEAR");
		bool mipFilter = pt.get("diffuseTexture1.mipFilter",true);
		U8 minFilterValue = Texture::LINEAR_MIPMAP_LINEAR;
		U8 magFilterValue = Texture::LINEAR_MIPMAP_LINEAR;
		if(mipFilter){
			if(minFilter.compare("LINEAR")){
				minFilterValue = Texture::LINEAR_MIPMAP_LINEAR;
			}else if(minFilter.compare("NEAREST")){
				minFilterValue = Texture::NEAREST_MIPMAP_NEAREST;
			}else{
			ERROR_FN("Invalid min filter parameter for [ %s ]",textureName.c_str());
			}
			if(magFilter.compare("LINEAR")){
				magFilterValue = Texture::LINEAR_MIPMAP_LINEAR;
			}else if(magFilter.compare("NEAREST")){
				magFilterValue= Texture::NEAREST_MIPMAP_NEAREST;
			}else{
				ERROR_FN("Invalid mag filter parameter for [ %s ]",textureName.c_str());
			}

		}else{
			if(minFilter.compare("LINEAR")){
				minFilterValue = Texture::LINEAR;
			}else if(minFilter.compare("NEAREST")){
				minFilterValue = Texture::NEAREST;
			}else{
				ERROR_FN("Invalid min filter parameter for [ %s ]",textureName.c_str());
			}
			if(magFilter.compare("LINEAR")){
				magFilterValue = Texture::LINEAR;
			}else if(magFilter.compare("NEAREST")){
				magFilterValue = Texture::NEAREST;
			}else{
				ERROR_FN("Invalid mag filter parameter for [ %s ]",textureName.c_str());
			}
		}
		tex1->setTextureFilters(minFilterValue,magFilterValue);
		return tex1;
	}
}

Commits for Divide-Framework/trunk/Source Code/Utility/XMLParser.cpp

Diff revisions: vs.
Revision Author Commited Message
117 Diff Diff k1ngp1n picture k1ngp1n Tue 05 Jun, 2012 17:30:40 +0000

[Ionut] [[BR]]
-Separated responsibilities between “Application” and “Kernel” [[BR]]
--“Application” handles data such as window dimensions, logs, “ParamHandler” etc [[BR]]
--“Kernel” handles the main loop, SFX, GFX, physics, sceneManager etc updates [[BR]]
---“Kernel” is now a “Core” component [[BR]]
-Reduced coupling between some classes by passing more info via parameters rather than relying on singleton access [[BR]]
--Ex: eyePos in “Terrain”,“Water” and “Trigger” classes is now passed as a "vec3<F32>" on render call rather than querying “CameraManager” [[BR]]
-Reworked “GLWrapper” shutdown routine [[BR]]
Singleton witch hunt [[BR]]
-“Kernel” is no longer a singleton and it’s initialized on application startup in the “Application” class[[BR]]
-“CameraManager” is no longer a singleton and it’s instantiated in the kernel [[BR]]

116 Diff Diff k1ngp1n picture k1ngp1n Mon 04 Jun, 2012 22:27:07 +0000

[Ionut] [[BR]]
-Removed now useless “BaseCache” class as a simple unordered_map in each manager-type class is all that’s needed [[BR]]
-Moved loading responsibility from each Resource implementation to each "ImplResourceLoader<T>" class (defaults via macro’s are available for convenience) [[BR]]
--Resources now have a “setInitialData” method for setting post-load values [[BR]]
--Also added a loader for Particle Emitters [[BR]]
-Added a new class, “HardwareResource” (for textures, shaders, etc) that needs special loading routines to facilitate future multi-threaded asset streaming [[BR]]
--HardwareResource’s have a “generateHWResource” that should be called after threaded loading routines join with main thread [[BR]]
-Renamed “Guardian” class to “Kernel” as that’s what it’s new responsibility will be in future revisions [[BR]]
-Added the “threadpool” library from here: http://threadpool.sourceforge.net/ (not used yet) [[BR]]
-Added some more macro’s and cleanups [[BR]]

113 Diff Diff k1ngp1n picture k1ngp1n Fri 01 Jun, 2012 16:51:23 +0000

[Ionut] [[BR]]
-Fixed animated bounding box calculations[[BR]]
-BoundingBox recalculation per frame is now a general SceneNode property [[BR]]
--Note: Animated BB’s have problems with multi-threaded collision detection for now (see AITenisScene) [[BR]]
-Wrapped boost::mutex to separate file and moved it to shared_mutex structure as read requests are more frequent than write requests [[BR]]
-Mesh class now calls animations update on all of it’s subclasses so animations for each node in a mesh are in sync [[BR]]
-Split up GUI elements by class [[BR]]
-Added base code for a console GUI element (disabled) [[BR]]
-Animations can now be disabled in confg file [[BR]]
-Added a “texture not found” default texture [[BR]]
-Some AI rewrite in AITenisScene (translation to english in next commit) [[BR]]
-Inlines, const’s, cleanups, etc [[BR]]

106 Diff Diff k1ngp1n picture k1ngp1n Wed 28 Mar, 2012 21:50:23 +0000

[Ionut] [[BR]]
Unstable revision – New animation code is not yet optimized and loading performance is low [[BR]]
[[BR]]
-Added animation loading and bone matrix calculations (actual skinning not implemented yet)[[BR]]
-Modified VBO classes to support dynamic data and faster updates [[BR]]
-Templatized Math classes (vec2,vec3,vec4,mat3,mat4) for greater flexibility [[BR]]
-Separated Rendering API from Rendering API version [[BR]]
-Fixed buggy GL error checking [[BR]]
-Small bugs fixed in Projectile and Weapon classes [[BR]]

105 Diff Diff k1ngp1n picture k1ngp1n Fri 16 Mar, 2012 17:58:32 +0000

[Ionut] [[BR]]
-Improved material loading using ASSIMP a bit [[BR]]

103 Diff Diff k1ngp1n picture k1ngp1n Mon 12 Mar, 2012 19:06:00 +0000

[Ionut] [[BR]]
Features: [[BR]]
-Added a proper RenderState Management system similar to the D3D default one[[BR]]
--All possible states are managed: cull, blend, alpha-blend, color mask, lighting, stencil mask, fill mode etc [[BR]]
--Every material has different states for normal rendering, shadow rendering and reflection rendering [[BR]]
--Nodes are sorted by shader first then by state hash depending on current render stage [[BR]]
--Redundant states are not changed [[BR]]
--Every entity submits it’s desired state before render [[BR]]
--Every state is checked before rendering a VBO or other primitive type[[BR]]
[[BR]]
-Added a Reflector base class used for reflection calculations and updates (useful for water, mirrors, portals etc)[[BR]]
--Reflections are triggered between pre-render and render calls [[BR]]
--Water now derives from Reflector class as well [[BR]]
[[BR]]
-Material now properly calculates if it has transparency or is double sided, setting desired states to handle this feature (cull, blend) [[BR]]
-Added some basic defines or inline template functions to facilitate access to useful classes and methods (hardware devices, resource management, console printing, etc) [[BR]]
-Lights are updated after every camera update[[BR]]
-Added a new FrameListener event triggered after pre-render call is finished (used by reflectors) [[BR]]
-Added a CRC class to compute unique hash values for entities[[BR]]
-Added D3D dummy files [[BR]]
-Removed executables from subversion [[BR]]
Performance: [[BR]]
-Image loading has been improved a bit [[BR]]
-Terrain texel density now varies with LOD level [[BR]]
-Light API specific calls,except position, are set only if values changed[[BR]]
-Specific GUI casting and rendering are the Rendering API’s job now, not the GUI class [[BR]]
-Rendering Queue processing is now more efficient in sorting valid visible nodes and setting appropriate states/materials
[[BR]]
Bug fixes: [[BR]]
-Better drawState checks[[BR]]
-Proper light effects in deferred rendering[[BR]]
-Light dummy now renders properly[[BR]]
-Reworked bounding box computation [[BR]]
[[BR]]
Known bugs: [[BR]]
-Terrain infinite plain still not visible [[BR]]
-Some z-fighting occurs when looking at certain objects from a distance. (looking at another object and back again fixes it) [[BR]]

101 Diff Diff k1ngp1n picture k1ngp1n Wed 07 Mar, 2012 13:56:56 +0000

[Ionut] [[BR]]
-Added GLSL effect-like file support using GLSW [http://prideout.net/blog/?p=11] [[BR]]
-Added GLSL “#include” support. Now shader functions can be define in separate frag/vert files as atoms and included in the glsl effect file [[BR]]
-Added more DoxyGen-comments[[BR]]

100 Diff Diff k1ngp1n picture k1ngp1n Mon 05 Mar, 2012 17:45:11 +0000

[Ionut] [[BR]]
Features: [[BR]]
-Added a physics system interface instead of direct PhysX interaction to allow other physics engines (Bullet, ODE etc) to be easily implemented [[BR]]
--This will aid in Object-Object collisions and character control in future revisions [[BR]]
-Added an Ogre3D inspired FrameListener which now allows Before-frame/during-frame/after-frame event plugins of callbacks [[BR]]
-Added a renderInViewport system to draw elements in a user defined rectangle on screen [[BR]]
--Current uses: shadowmap preview (F10) [[BR]]
-Separated Shaders from ShaderPrograms[[BR]]
--ShaderPrograms can now use multiple Shaders [[BR]]
-Error output is now sent to errors.log[[BR]]
-All SceneNode based elements now have a postDraw calls as well [[BR]]
-A cubemap generating function has been added to the GFXDevice class[[BR]]
-Added debug only print options to the Console class [[BR]]
[[BR]]
Performance: [[BR]]
-All shadows are now filtered by a faster Gaussian 3x3 blur filter [[BR]]
-All renderables are now sorted and rendered by material/front-to-back/back-to-front, depending on case [[BR]]
-RenderQueue now sorts and queue’s translucent and opaque objects separately[[BR]]
-Shader uniforms/attributes are now cached to reduce number of address calls to the GPU[[BR]]
-Shaders are now cached, so that if multiple ShaderPrograms use an already compiled Shader, that Shader is returned from memory instead of creating a new copy[[BR]]
-Shaders are not unbound/rebound except when an objects demands so (vastly improves performance)[[BR]]
-Reduced calls to glEnable[[BR]]
[[BR]]
Bug fixes: [[BR]]
-Preprocessor configurations now work properly [[BR]]
-Video API is now unloaded before destruction [[BR]]
-Manager base class now properly frees memory [[BR]]
-Materials are saved to XML only if they are changed at any point [[BR]]

99 Diff Diff k1ngp1n picture k1ngp1n Fri 10 Feb, 2012 22:17:24 +0000

[ Ionut ] [[BR]]
- Added a PreRenderStage Builder that allows multiple pre-render stages to be added to the pre-render step [[ BR ]]
--A PreRenderStage is composed of a series of PreRender Operators that generate certain PostFX outputs that are used by the PostFX class [[BR]]
--Each PreRenderOperator, similar to a “plugin”, can use any number of input FBO’s, any input shader and render target to generate an effect [[BR]]
--Rendering pipeline has been modified to allow the specification of current render stage [[BR]]
[[BR]]
Added C++<>Shader attribute passing support for shaders[[BR]]
-Added per-pixel fog [[BR]]
-Fixed some typo’s in uniform names [[BR]]
-Optimized shadow generation pipeline [[BR]]
-Added cast/receive shadow options for materials [[BR]]
-FBO’s now clear color and depth buffers when Begin() is called [[BR]]
-Fixed loading of primitives' material properties [[BR]]
-All shaders now use the same shadowmapping techniques [[BR]]
-Quad3D’s can now be modified by specifying a target rect [[BR]]
-Split the “lighting.frag” shader in 3 variants: one that only applies color properties, one with textures and one with bump-mapping [[BR]]
--This reduces fragment shader complexity for the first 2 shaders [[BR]]
--Each material change will now force a shader recalculation for the object [[BR]]
-Renamed sphere’s “size” member to “radius” [[BR]]

97 k1ngp1n picture k1ngp1n Tue 07 Feb, 2012 15:23:45 +0000

[ Ionut ] [[BR]]
-Restructured code base to a more logical layout [[BR]]
--Geometry folder contains shapes, materials, animations and the importer; Environment folder holds sky, terrain, water, vegetation; etc [[BR]]
--All header files are moved to a “Headers” sub-folder [[BR]]
--Renamed most of the Romanian code/comments/files/folders to English [[BR]]
--Added comments to parts of the code (ongoing from now on) [[BR]]
[[BR]]
-Rewrote the entire lighting system [[BR]]
--Added a LightManager class to handle all lights [[BR]]
---LightManager calls updates and render calls to all lights it manages [[BR]]
--Lights have all needed properties stored in 2 maps (one for vector values, one for float values) [[BR]]
--Added a LightImpostor class that takes the light’s properties and applies it to a dummy sphere [[BR]]
--If a light should draw it’s impostor, the impostor draws the dummy sphere [[BR]]
--Rewrote the Light <-> GFXDevice interaction [[BR]]
---Each light stores it’s type in a variable and passes all properties to the rendering API that then decides what to use based on that type [[BR]]
--Each light handles it’s own ShadowMapping [[BR]]
[[BR]]
-ShadowMapping: [[BR]]
-Each light stores it’s own depth maps and generates them based on it’s type [[BR]]
-LightManager binds all available depth maps and shaders pick them up automatically for use [[BR]]
-Each shadow map (of a total of 3 per light) corresponds to a detail level[[BR]]
-The final shadow map resolution is decided by the shadow detail level set in the config [[BR]]
--Camera and Frustum are set up for shadow rendering and applied to the render callback set for the current light (for example, Scene::render()) [[BR]]
--The light manager tells every light that has “_castShadows = true” to generate shadowmaps automatically after the Scene::PreRender stage [[BR]]
--ShadowMaps are blurred before applied to the fragment’s final color via shaders. [[BR]]
[[BR]]
-Added detail level configuration options [[BR]]
--ToDo: add shaders for each detail level [[BR]]
[[BR]]
-Moved all predefined geometry from immediate mode to VBO’s [[BR]]
--This allowed the rendering pipeline to be more streamlined (one render function for all geometry) [[BR]]
[[BR]]
-Fixed GuiElement visibility toggle [[BR]]
-Fixed GuiText color state problem [[BR]]
-Added FBO texture format options [[BR]]
-VBO rendering uses U16 as default instead of U32 (better for GPU) [[BR]]
-VBO’s now contain BiTangent data as well [[BR]]
-Added OpenGL 2.0 compatibility (not guaranteed!) [[BR]]
-Added static (on load) shader selection based on detail level [[BR]]
-Added SSAO PostFX option, but this won’t work until the implementation of “plugins” for PostFX system [[BR]]
-Optimized/Fixed code based on VisualLint + CppCheck analysis [[BR]]