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
#include "Headers/ResourceDescriptor.h"

ResourceDescriptor::ResourceDescriptor(const std::string& name,
									   const std::string& resourceLocation,
									   bool flag, U32 id, U8 enumValue) : _propertyDescriptor(NULL),
																		  _name(name),
												  					      _resourceLocation(resourceLocation),
															              _flag(flag),
															              _id(id),
															              _enumValue(enumValue)
{
    _mask.i = 0;
    _threaded = true;
}

ResourceDescriptor::~ResourceDescriptor()
{
	SAFE_DELETE(_propertyDescriptor);
}

ResourceDescriptor::ResourceDescriptor(const ResourceDescriptor& old) : _propertyDescriptor(NULL)
{
	_name = old._name;
	_resourceLocation = old._resourceLocation;
	_properties = old._properties;
	_flag = old._flag;
	_threaded = old._threaded;
	_id = old._id;
	_mask = old._mask;
	_enumValue = old._enumValue;
	if(old._propertyDescriptor != NULL)	_propertyDescriptor = old._propertyDescriptor->clone();
}

 ResourceDescriptor& ResourceDescriptor::operator= (ResourceDescriptor const& old) {
    if (this != &old) {
		_name = old._name;
		_resourceLocation = old._resourceLocation;
		_properties = old._properties;
		_flag = old._flag;
		_threaded = old._threaded;
		_id = old._id;
		_mask = old._mask;
		_enumValue = old._enumValue;
		if(old._propertyDescriptor != NULL)	 SAFE_UPDATE(_propertyDescriptor, old._propertyDescriptor->clone());
      }

      return *this;
}

Commits for Divide-Framework/trunk/Source Code/Core/Resources/ResourceDescriptor.cpp

Diff revisions: vs.
Revision Author Commited Message
168 k1ngp1n picture k1ngp1n Sat 26 Oct, 2013 19:03:21 +0000

- Reworked the Camera class[[BR]]
— Now fully quaternion based [[BR]]
— Basic camera types added but not used yet (third person, first person, orbit) [[BR]]
- Cleaned up Material and Texture handling [[BR]]
- Added clipping plane support [[BR]]
— Similar to OpenGL fixed-function clip planes but fully shader driven [[BR]]
— Added a new class, “Plane”, that helps define clip planes [[BR]]
- Optimized the Singleton class to allow faster “getInstance” calls without performance penalties [[BR]]
-- “createInstance” must be called for each singleton class before usage. Or “gerOrCreateInstance” can be used, which is basically the former “getInstance” implementation [[BR]]
- Improved console logging by changing some heap allocations to stack and removing dependencies on the std::string class [[BR]]
- Added a lot of performance optimizations related to coding standards and redundant calculations [[BR]]
— e.g. Frustum AABB check didn’t need to recompute the AABB points as they were calculated already [[BR]]
— e.g. A vector did not need to be set to 0 on initialization as that is already it’s default state on creation [[BR]]
— e.g. Faster Framerate and Timing calculations by using less member variables that are not needed outsied of calling functions [[BR]]
- The SceneState now contains the SceneRenderState and is passed on to the SceneGraph’s update calls [[BR]]
- Better material export/import to/from XML format [[BR]]
- More bug fixes and cleanups [[BR]]