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
#include "Core/Resources/Headers/ResourceLoader.h"
#include "Core/Resources/Headers/ResourceCache.h"
#include "Geometry/Material/Headers/Material.h"
#include "Geometry/Shapes/Headers/Object3D.h"

Material* ImplResourceLoader<Material>::operator()(){
    Material* ptr = New Material();
    assert(ptr != nullptr);

    if(!load(ptr,_descriptor.getName())){
       SAFE_DELETE(ptr);
    }else{
        if(_descriptor.getFlag()) {
            ptr->setShaderProgram("");
        }
        if(_descriptor.getEnumValue() == Object3D::OBJECT_FLAG_SKINNED)
            ptr->setHardwareSkinning(true);
    }

    return ptr;
}

DEFAULT_LOADER_IMPL(Material)

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

Diff revisions: vs.
Revision Author Commited Message
286 Diff Diff IonutCava picture IonutCava Fri 18 Jul, 2014 16:32:03 +0000

[Ionut] [[BR]]

    • very buggy commit ** [[BR]]

- New rendering pipeline: [[BR]]
— Bumped OpenGL version to 4.4 [[BR]]
— Command based rendering. GFXDevice dispatches rendering commands to their respective buffers [[BR]]
— State changing is exclusively controlled by the GFXDevice class [[BR]]
— Material properties and transform matrices are stored in shader storage buffers that are updated after culling and uploaded once per RenderPass. Objects use drawIDs to index data in shaders [[BR]]
— Removed all custom matrices and other, per shader, bind data [[BR]]
— Removed per node light data. Light culling and shader buffers will replace the old light management system [[BR]]
— Framebuffers now use the Texture class for attachments [[BR]]
— Sampler objects now work like RenderStateBlocks. GL_API handles them and stores them in a hash indexed map [[BR]]
— Removed “prepareMaterial” calls. Pre-draw material setup is now only limited to texture binding [[BR]]
— Moved immediate mode emulation and primitive rendering from API level to GFXDevice level [[BR]]
— Framebuffer rendering must be completed with a call to end() to ensure proper MSAA resolve (asserts, otherwise) [[BR]]
- Fixed hash code generation for RenderStateBlock (and now, glSamplerObject) using boost::hash_combine [[BR]]
- Temporarily disabled XML caching for materials [[BR]]

249 Diff Diff k1ngp1n picture k1ngp1n Mon 31 Mar, 2014 20:42:31 +0000

[Ionut] [[BR]]
- Migrated to platform toolset v100 [[BR]]
- Updated boost to 1.55 [[BR]]
- Moved from “NULL” to “nullptr” [[BR]]
- DevIL is now linked dynamically [[BR]]

171 Diff Diff k1ngp1n picture k1ngp1n Sun 03 Nov, 2013 18:15:06 +0000

-Replaced all tabs with spaces [[BR]]

152 Diff Diff k1ngp1n picture k1ngp1n Thu 20 Jun, 2013 14:23:31 +0000

[Ionut] [[BR]]
- New rendering pipeline (experimental and unstable): [[BR]]
— OpenGL 3.x clean context (glLight commands are still used for now, but UBO support is there, but not used yet) [[BR]]
— Custom matrix stacks and UBO based shader data (UBOs cause some link errors on some nVidia cards)[[BR]]
— Multi-threaded texture loading and shader compilation (mt shader compilation disabled for now. needs more tests) [[BR]]
— VAO rendering is self contained (no more enable/disable calls before a draw request) [[BR]]
— Render instance class used for rendering information [[BR]]
[[BR]]
- New unique ID generation base class: GUIDWrapper. Each class that derives from this, gets an application wide unique id on construction [[BR]]
- Added base code for an in-game editor using CEGUI [[BR]]
- Replaced some mutex locks with lockless data structures or atomic data [[BR]]
- CEGUI 0.8.2, FTGL-GL3 and GLIM 0.4 modified to support GLEW_MX if defined [[BR]]
- Dropped VS2008 support [[BR]]
- Networking library, server framework and ReCast files are now projects inside the Divide Framework solution [[BR]]
- New console command “setFov” that modifies the horizontal FoV value in realtime [[BR]]
- New console command “recompileShader” that reparses shader files, recompiles shaders and relinks shader programs who’s names match or contain the argument string [[BR]]
- New debug utility: axis angle drawn in corner of the screen if needed [[BR]]
- More ‘const’-s pasted around the code, more loop performance tweaks (allocations before a loop, tighter loops, etc), more utility member functions added to various classes [[BR]]

146 Diff Diff k1ngp1n picture k1ngp1n Wed 10 Apr, 2013 13:20:15 +0000

[Ionut] [[BR]]
*Final LightBranch updates 2/3 : Main trunk merge and build test (VC90, VC100, gDebugger) [[BR]]
-Merged light branch with trunk [[BR]]
-Deleted light branch [[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]]

114 k1ngp1n picture k1ngp1n Sat 02 Jun, 2012 13:03:01 +0000

[Ionut][[BR]]
-First steps in moving away from a generalized “ResourceManager”: [[BR]]
--Added templated resource loaders (Core\Resources\ConcreteLoaders). Just add a new loader for a new resource type and it’s ready for use [[BR]]
---Next step involves moving loading responsibility from the resource itself to the resource loader that handles it’s creation [[BR]]
--Renamed the ResourceManager to ResourceCache and limited it’s responsibility from general resource operations to a more standard abstract template factory with cache [[BR]]
---Manager base class is renamed to BaseCache as it’s a wrapper for a cache map in essence [[BR]]
---Next step involves adding a ResourceCache per scene (dropping Singleton status) with the possibility of sharing resources between them (to avoid reloading existing resources for a new scene) [[BR]]
-Translated AITenisScene and PingPongScene source code to english [[BR]]