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

namespace Divide {

IMPLEMENT_CUSTOM_ALLOCATOR(d3dShaderProgram, 0, 0);
d3dShaderProgram::d3dShaderProgram(GFXDevice& context, const stringImpl& name, const stringImpl& resourceLocation, bool asyncLoad) :
    ShaderProgram(context, name, resourceLocation, asyncLoad)
{
}

d3dShaderProgram::~d3dShaderProgram()
{
}

bool d3dShaderProgram::unload() {
    return ShaderProgram::unload();
}

bool d3dShaderProgram::bind() {
    return false;
}

bool d3dShaderProgram::isBound() const {
    return false;
}

bool d3dShaderProgram::isValid() const {
    return false;
}

// Subroutines
void d3dShaderProgram::SetSubroutines(ShaderType type, const vectorImpl<U32>& indices) const {
}

void d3dShaderProgram::SetSubroutine(ShaderType type, U32 index) const {
}

U32 d3dShaderProgram::GetSubroutineIndex(ShaderType type, const char* name) const {
    return 0;
}

U32 d3dShaderProgram::GetSubroutineUniformLocation(ShaderType type, const char* name) const {
    return 0;
}

U32 d3dShaderProgram::GetSubroutineUniformCount(ShaderType type) const {
    return 0;
}

// Uniforms
void d3dShaderProgram::Uniform(const char* ext, U32 value) {}
void d3dShaderProgram::Uniform(const char* ext, I32 value) {}
void d3dShaderProgram::Uniform(const char* ext, F32 value) {}
void d3dShaderProgram::Uniform(const char* ext, const vec2<F32>& value) {}
void d3dShaderProgram::Uniform(const char* ext, const vec2<I32>& value) {}
void d3dShaderProgram::Uniform(const char* ext, const vec3<F32>& value) {}
void d3dShaderProgram::Uniform(const char* ext, const vec3<I32>& value) {}
void d3dShaderProgram::Uniform(const char* ext, const vec4<F32>& value) {}
void d3dShaderProgram::Uniform(const char* ext, const vec4<I32>& value) {}
void d3dShaderProgram::Uniform(const char* ext, const mat3<F32>& value, bool transpose) {}
void d3dShaderProgram::Uniform(const char* ext, const mat4<F32>& value, bool transpose) {}
void d3dShaderProgram::Uniform(const char* ext, const vectorImpl<I32>& values) {}
void d3dShaderProgram::Uniform(const char* ext, const vectorImpl<F32>& values) {}
void d3dShaderProgram::Uniform(const char* ext, const vectorImpl<vec2<F32> >& values) {}
void d3dShaderProgram::Uniform(const char* ext, const vectorImpl<vec3<F32> >& values) {}
void d3dShaderProgram::Uniform(const char* ext, const vectorImplAligned<vec4<F32> >& values) {}
void d3dShaderProgram::Uniform(const char* ext, const vectorImpl<mat3<F32> >& values, bool transpose) {}
void d3dShaderProgram::Uniform(const char* ext, const vectorImplAligned<mat4<F32> >& values, bool transpose) {}

void d3dShaderProgram::Uniform(I32 location, U32 value) {}
void d3dShaderProgram::Uniform(I32 location, I32 value) {}
void d3dShaderProgram::Uniform(I32 location, F32 value) {}
void d3dShaderProgram::Uniform(I32 location, const vec2<F32>& value) {}
void d3dShaderProgram::Uniform(I32 location, const vec2<I32>& value) {}
void d3dShaderProgram::Uniform(I32 location, const vec3<F32>& value){}
void d3dShaderProgram::Uniform(I32 location, const vec3<I32>& value) {}
void d3dShaderProgram::Uniform(I32 location, const vec4<F32>& value) {}
void d3dShaderProgram::Uniform(I32 location, const vec4<I32>& value) {}
void d3dShaderProgram::Uniform(I32 location, const mat3<F32>& value, bool transpose) {}
void d3dShaderProgram::Uniform(I32 location, const mat4<F32>& value, bool transpose) {}
void d3dShaderProgram::Uniform(I32 location, const vectorImpl<I32>& values) {}
void d3dShaderProgram::Uniform(I32 location, const vectorImpl<F32>& values) {}
void d3dShaderProgram::Uniform(I32 location, const vectorImpl<vec2<F32> >& values){}
void d3dShaderProgram::Uniform(I32 location, const vectorImpl<vec3<F32> >& values) {}
void d3dShaderProgram::Uniform(I32 location, const vectorImplAligned<vec4<F32> >& values) {}
void d3dShaderProgram::Uniform(I32 location, const vectorImpl<mat3<F32> >& values, bool transpose) {}
void d3dShaderProgram::Uniform(I32 location, const vectorImplAligned<mat4<F32> >& values, bool transpose) {}
I32 d3dShaderProgram::getUniformLocation(const char* name) { return -1; }
void d3dShaderProgram::DispatchCompute(U32 xGroups, U32 yGroups, U32 zGroups) {}

void d3dShaderProgram::SetMemoryBarrier(MemoryBarrierType type) {
}

bool d3dShaderProgram::load() {
    return ShaderProgram::load();
}
};

Commits for Divide-Framework/trunk/Source Code/Platform/Video/Direct3D/Shaders/d3dShaderProgram.cpp

Diff revisions: vs.
Revision Author Commited Message
727 Diff Diff IonutCava picture IonutCava Tue 14 Jun, 2016 16:01:38 +0000

[IonutCava]
- Remove node and cmd buffers from GFXDevice and add them as a new BufferData struct to RenderPass class.
— Each render pass holds its own buffers
- Improvements / fixes to the CSM code
- Added a global toggle to enable/disable custom memory allocators

718 Diff Diff IonutCava picture IonutCava Thu 02 Jun, 2016 16:02:48 +0000

[IonutCava]
- Code cleanup:
— Rename Framebuffer to RenderTarget. Only OpenGL uses the Framebuffer nomenclature.
— Remove base Shader class as only OpenGL will have separate shaders (and eventually move to pipeline objects) as Direct3D uses FX files and may end up with different structure
— Remove drawBox3D, drawSphere3D and drawLines from GFXDevice class and add them as member functions to the IMPrimitive class (renamed to fromXYZ)
— Pull some elements from SceneManager and move them to standalone classes (W.I.P.)

692 Diff Diff IonutCava picture IonutCava Wed 27 Apr, 2016 16:24:26 +0000

[IonutCava]
- Resource system cleanup:
— Resource name and resource file location (if any) is now passed only via explicit constructors! (ResourceDescriptors already contain this data, so why use setters?)
- Fix a bug with ortho projection matrix calculation (set m[3][3] to 1. this was skipped when the identity() call was changed to zero() in the ortho() function)
— This also fixed text rendering

671 Diff Diff IonutCava picture IonutCava Fri 08 Apr, 2016 16:26:49 +0000

[Ionut]
- Custom memory allocation system part 1:
— Add http://www.codeproject.com/Articles/1089905/A-Custom-STL-std-allocator-Replacement-Improves-Pe
— Add custom allocators to strings and vectors
— Add custom allocators to a few test classes
— No support for aligned memory yet, so vec4<F32> and mat4<F32> vectors use the old allocation system
- Replace more std::async call with our custom task system

669 Diff Diff IonutCava picture IonutCava Mon 04 Apr, 2016 16:15:35 +0000

[IonutCava]
- Move Task creation calls to TaskPool.h
- Allow tasks to use any pool, but default behaviour is to use the Kernel’s main task pool
- Change image transparency check to use the task pool instead of OpenMP
— Perfect place for future parallel_for implementation
- Warning fixes
- Some method renaming for improved readability

350 Diff Diff IonutCava picture IonutCava Tue 10 Feb, 2015 16:25:39 +0000

[Ionut]
- Simplified some Util-namespace level functions by using STL algorithms where possible
- Formatted the entire codebase using clang-format with the following style: "{BasedOnStyle: Google, IndentWidth: 4}"
- Attempted to make ProfileTimer thread-safe (temp fix until std::chrono works properly in Visual Studio)

334 IonutCava picture IonutCava Wed 10 Dec, 2014 17:21:22 +0000

[Ionut]
- Reorganized the Hardware project and renamed to "Platform"
- Reorganized the Server project