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

namespace Divide {
    namespace GLUtil {
        /// Print GLFW specific errors
        void glfw_error_callback(GLint errorCode, const char* msg) {
            const char* errorDesc = "UNDEFINED_ERROR";
            switch (errorCode) {
                case GLFW_NOT_INITIALIZED : {
                    errorDesc = "GLFW_NOT_INITIALIZED"; 
                } break;
                case GLFW_NO_CURRENT_CONTEXT : {
                    errorDesc = "GLFW_NO_CURRENT_CONTEXT"; 
                } break;
                case GLFW_INVALID_ENUM : {
                    errorDesc = "GLFW_INVALID_ENUM"; 
                } break;
                case GLFW_INVALID_VALUE : {
                    errorDesc = "GLFW_INVALID_VALUE";
                } break;
                case GLFW_OUT_OF_MEMORY  : {
                    errorDesc = "GLFW_OUT_OF_MEMORY";
                } break;
                case GLFW_API_UNAVAILABLE : {
                    errorDesc = "GLFW_API_UNAVAILABLE";
                } break;
                case GLFW_VERSION_UNAVAILABLE : {
                    errorDesc = "GLFW_VERSION_UNAVAILABLE";
                } break;
                case GLFW_PLATFORM_ERROR : {
                    errorDesc = "GLFW_PLATFORM_ERROR";
                } break;
                case GLFW_FORMAT_UNAVAILABLE : {
                    errorDesc = "GLFW_FORMAT_UNAVAILABLE";
                } break;
            }
            ERROR_FN(Locale::get("GLFW_ERROR"), errorDesc, msg);
        }
        /// Print OpenGL specific messages
        void APIENTRY CALLBACK DebugCallback(GLenum source, 
                                             GLenum type, 
                                             GLuint id, 
                                             GLenum severity, 
                                             GLsizei length, 
                                             const GLchar* message, 
                                             const void* userParam) {
            // Translate message source
            const char* gl_source = "Unknown Source";
            if (source == GL_DEBUG_SOURCE_API) {
                gl_source = "OpenGL";
            } else if (source == GL_DEBUG_SOURCE_WINDOW_SYSTEM) {
                gl_source = "Windows";
            } else if (source == GL_DEBUG_SOURCE_SHADER_COMPILER) {
                gl_source = "Shader Compiler";
            } else if (source == GL_DEBUG_SOURCE_THIRD_PARTY) {
                gl_source = "Third Party";
            } else if (source == GL_DEBUG_SOURCE_APPLICATION) {
                gl_source = "Application";
            } else if (source == GL_DEBUG_SOURCE_OTHER) {
                gl_source = "Other";
            }
            // Translate message type
            const char* gl_type = "Unknown Type";
            if (type == GL_DEBUG_TYPE_ERROR) {
                gl_type = "Error";
            } else if (type == GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR) {
                gl_type = "Deprecated behavior";
            } else if (type == GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR) {
                gl_type = "Undefined behavior";
            } else if (type == GL_DEBUG_TYPE_PORTABILITY) {
                gl_type = "Portability";
            } else if (type == GL_DEBUG_TYPE_PERFORMANCE) {
                gl_type = "Performance";
            } else if (type == GL_DEBUG_TYPE_OTHER) {
                gl_type = "Other";
            }
            // Translate message severity     
            const char* gl_severity = "Unknown Severity";      
            if (severity == GL_DEBUG_SEVERITY_HIGH) {
                gl_severity = "High";
            } else if (severity == GL_DEBUG_SEVERITY_MEDIUM) {
               gl_severity = "Medium";
            } else if (severity == GL_DEBUG_SEVERITY_LOW) {
                gl_severity = "Low";
            }
            // Print the message and the details
            ERROR_FN(Locale::get("ERROR_GENERIC_GL_DEBUG"),
                     (GLuint)(userParam) == 0 ? " [Main Thread] " : " [Loader Thread] ",
                     gl_source, gl_type, id, gl_severity,
                     message);
        }
    } //namespace GLUtil
}//namespace Divide

Commits for Divide-Framework/trunk/Source Code/Hardware/Video/OpenGL/GLError.cpp

Diff revisions: vs.
Revision Author Commited Message
331 Diff Diff IonutCava picture IonutCava Sat 06 Dec, 2014 20:53:45 +0000

[Ionut]
- Limited line length to 132 characters to improve readability and diff-comparisons
- Refactored memory allocation/deallocation functions
- Fixed a few compatibility issues with HashMap.h
- Fixed a bug in GPU Skinning shaders (cast a float to int)

302 Diff Diff IonutCava picture IonutCava Wed 06 Aug, 2014 22:09:55 +0000

[Ionut]
- GenericVertexData buffer size (for read/write buffering) is now configurable instead of a fixed 3x and also applies to non-persistently mapped buffers
- Moved OpenGL enum tables to Divide::GLUtil::GL_ENUM_TABLE
- More code cleanups (glResources, glError, glVertexArray, glGenericVertexData, glIMPrimitive)

287 Diff Diff IonutCava picture IonutCava Tue 22 Jul, 2014 16:11:05 +0000

[Ionut]
- Unified matrix transforms and node info and made it a vertex-shader only buffer
- World matrix queries have to be issued from the SceneGraphNode instead of the SGN’s Transform class to allow future interpolation algorithms to be more easily implemented
- Moved all lighting calculations per pixel to save varying and register space (caused compilation issues both on nVidia and AMD)
- Stored GPU buffer info (view, projection, viewport etc) into a special struct to avoid multiple redundant buffer uploads and to remove redundant client side matrix caches
- Some work on shader buffer locking system
- Cleaned up MathClasses.h and Transform.h
- Updated ASSIMP to 3.1.1

266 Diff Diff k1ngp1n picture k1ngp1n Tue 27 May, 2014 20:47:25 +0000

[Ionut] [[BR]]
- Initial OpenGL ES support [[BR]]
- Small update to GLFW error reporting system [[BR]]
- Fixed crash in PostFX when the window fails to create [[BR]]

264 Diff Diff k1ngp1n picture k1ngp1n Tue 27 May, 2014 13:04:38 +0000

[Ionut] [[BR]]
- New camera system: [[BR]]
— Stack based (push/pop active camera) [[BR]]
— Per camera frustum [[BR]]
— Per camera projection [[BR]]
— Shadow mapping now uses the new camera system (each light has a shadow camera) [[BR]]
[[BR]]
- New terrain, water and vegetation system: [[BR]]
— Direct import of terrain from L3DT both as 8-bit grayscale and 16-bit raw formats [[BR]]
— Multiple alpha maps for texture splatting support [[BR]]
— Per texture detail map support [[BR]]
— Transform feedback based visibility culling for vegetation [[BR]]
— Alpha-map based vegetation placing on terrain [[BR]]
— Water now uses a refraction map instead of alpha blending for better refraction effects [[BR]]
[[BR]]
- SceneGraph improvements: [[BR]]
— Better bounding box updates from child to parent [[BR]]
— Better onDraw / postDraw implementation [[BR]]
[[BR]]
- Performance improvements: [[BR]]
— Batch 2D rendering tasks together as much as possible[[BR]]
— Improve renderStateBlock hash generation for better sorting [[BR]]
— Move most state related gfx changes from API implementation to the GFXDevice class [[BR]]
— Move viewport stack to the GFXDevice class [[BR]]
— Added various performance counters (frame duration with round-robin query system, draw call count, etc) [[BR]]
— Fixed and improved clip plane management [[BR]]
— Delete client-side texture data after GPU upload [[BR]]
[[BR]]
- New features: [[BR]]
— Added callback support to the Task class so that a specific task may call a function in the main thread upon completion [[BR]]
— Added mouse-wheel zoom support to Orbit/ThirdPerson cameras [[BR]]
— Added 2D Texture Array support (e.g. used for terrain textures) [[BR]]

259 Diff Diff k1ngp1n picture k1ngp1n Sun 27 Apr, 2014 18:24:52 +0000

[Ionut][[BR]]
- Implemented Exponential Stable Cascaded Shadow Maps for directional lights (still buggy, but basically working) [[BR]]
— CSM settings (resolution, number of splits, etc) are part of the scene render state [[BR]]
- SGN can skip rendering for the current frame if they are not ready (e.g. OnDraw can now return false or materials can fail to bind) [[BR]]
- Frustum class is now using the Plane class [[BR]]
- Removed Math SIMD implementation as the compiler generated code will always be faster and safer [[BR]]
- Added a “STUBBED” macro for outputing to the error stream of important messages (instead of using #pragma message) [[BR]]
- Added “freeze time” logic to pause/resume updates with or without freezing the GUI too [[BR]]
- Added “processGUI” method the every Scene class to separate time-sensitive GUI updates from game logic loop [[BR]]
- GLSL <-> Vertex Buffer bind locations are automatically set for every vertex shader [[BR]]
- Added basic support for compute shaders [[BR]]
- Removed most OS define checks to make porting to a new platform easier [[BR]]
- Texture transparency check per-pixel is now using OpenMP [[BR]]
- Texture samplers can now set a border color for CLAMP_TO_BORDER wrap mode [[BR]]
- Removed “Object” suffix from GFX Classes (pixel buffer, vertex buffer, frame buffer, etc) [[BR]]
- Stop processing scene input when application looses focus [[BR]]
- SceneGraphNode class is now responsible for updating SGNComponents on draw and calling its _node’s OnDraw method [[BR]]
- UBOs can now list all of the active uniforms inside a block with info such as type and offset [[BR]]
- Removed deprecated ‘GLCheck’ macro [[BR]]
- A lot of bug fixes and performance improvements in various places [[BR]]

247 Diff Diff k1ngp1n picture k1ngp1n Sun 16 Feb, 2014 16:36:06 +0000

[Ionut] [[BR]]
- Fixed VSM rendering [[BR]]
- Added Z-prePass as a separate render stage [[BR]]
- Added GL error checking and asserts to “Profile” builds [[BR]]
- Fixed bad XML material dump (invalid file name bug) [[BR]]
- Fixed random crashes [[BR]]
- Shadow cast/receive is now a node property, and not a material property [[BR]]
- Fixed an issue with previous RenderPassManager lock mechanism (clearing the queue on frame end to prevent infinite lock) [[BR]]
- Added depth buffer preview (F10 key) [[BR]]

227 Diff Diff k1ngp1n picture k1ngp1n Sat 11 Jan, 2014 21:05:29 +0000

[Ionut] [[BR]]
- Fixed terrain and grass rendering on AMD [[BR]]
- Made grass load in it’s own thread [[BR]]
- Fixed a bug in Task class that ran twice when “runOnce” was true on creation [[BR]]
- All VAOs now require a HW Index Buffer. Using client side memory is quite bad [[BR]]
- Updated GLEW to use glGetStringi(GL_EXTENSIONS) when a core profile is required (as opposed to glGetString(GL_EXTENSIONS)) to prevent an INVALID_ENUM error on creation [[BR]]

221 Diff Diff k1ngp1n picture k1ngp1n Wed 08 Jan, 2014 18:50:02 +0000

[Ionut] [[BR]]
- Merged branch “Shadows And Animations” back into trunk [[BR]]
- Added DoxygenGUI project file [[BR]]

  • Buggy *
171 k1ngp1n picture k1ngp1n Sun 03 Nov, 2013 18:15:06 +0000

-Replaced all tabs with spaces [[BR]]