From ffd25a566d9b0ed9586c62fd2dceb19951bdb0c9 Mon Sep 17 00:00:00 2001 From: Laura Hermanns Date: Tue, 1 Aug 2023 21:55:08 -0400 Subject: [PATCH] Updated README.md document and minor changes. --- README.md | 6 ++++-- include/LLGL/ResourceFlags.h | 3 +++ include/LLGL/ResourceHeapFlags.h | 2 +- include/LLGL/ShaderReflection.h | 1 - sources/Renderer/OpenGL/Texture/GLTextureViewPool.cpp | 4 ++-- tests/Testbed/TestbedContext.h | 2 ++ 6 files changed, 12 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index a57f916417..394ff0bfcd 100644 --- a/README.md +++ b/README.md @@ -11,13 +11,13 @@ ## Documentation -- **NOTE:** *This repository receives bug fixes only, but no major updates. Pull requests may still be accepted.* - **Version**: 0.03 Beta (see [ChangeLog](docu/ChangeLog)) - [Getting Started with LLGL](docu/GettingStarted/Getting%20Started%20with%20LLGL.pdf) (PDF) with Introduction, Hello Triangle Tutorial, and Extensibility Example with [GLFW](http://www.glfw.org/) - [LLGL Reference Manual](docu/refman.pdf) (PDF) - [LLGL Coding Conventions](docu/CodingConventions/Coding%20Conventions%20for%20LLGL.pdf) (PDF) - [Examples and Tutorials for C++](examples/Cpp) +- [Examples for C99](examples/C99) - [Examples for C#](examples/CSharp) @@ -80,7 +80,9 @@ CommandBuffer::DrawIndexed(std::uint32_t numIndices, std::uint32_t firstIndex); // OpenGL Implementation: void GLImmediateCommandBuffer::DrawIndexed(std::uint32_t numIndices, std::uint32_t firstIndex) { - glDrawElements(GetDrawMode(), static_cast(numIndices), GetIndexType(), GetIndicesOffset(firstIndex)); + glDrawElements( + GetDrawMode(), static_cast(numIndices), GetIndexType(), GetIndicesOffset(firstIndex) + ); } // Direct3D 11 Implementation diff --git a/include/LLGL/ResourceFlags.h b/include/LLGL/ResourceFlags.h index abb82190fe..b2d8cdbe1b 100644 --- a/include/LLGL/ResourceFlags.h +++ b/include/LLGL/ResourceFlags.h @@ -49,6 +49,9 @@ enum class ResourceType Sampler, }; + +/* ----- Flags ----- */ + /** \brief Flags for Buffer and Texture resources that describe for which purposes they will be used. \remarks Resources can be created with both input and output binding flags, but they cannot be used together when the resource is bound. See the following table for compatibility: diff --git a/include/LLGL/ResourceHeapFlags.h b/include/LLGL/ResourceHeapFlags.h index b0b97563ac..12d641e9a9 100644 --- a/include/LLGL/ResourceHeapFlags.h +++ b/include/LLGL/ResourceHeapFlags.h @@ -24,7 +24,7 @@ namespace LLGL class PipelineLayout; -/* ----- Enumerations ----- */ +/* ----- Flags ----- */ /** \brief Flags for memory barriers in resource heaps. diff --git a/include/LLGL/ShaderReflection.h b/include/LLGL/ShaderReflection.h index 191579c5c9..7d45666dc7 100644 --- a/include/LLGL/ShaderReflection.h +++ b/include/LLGL/ShaderReflection.h @@ -10,7 +10,6 @@ #include -#include #include #include #include diff --git a/sources/Renderer/OpenGL/Texture/GLTextureViewPool.cpp b/sources/Renderer/OpenGL/Texture/GLTextureViewPool.cpp index b54f99f233..53c2bfec4b 100644 --- a/sources/Renderer/OpenGL/Texture/GLTextureViewPool.cpp +++ b/sources/Renderer/OpenGL/Texture/GLTextureViewPool.cpp @@ -22,7 +22,7 @@ namespace LLGL { -static const std::size_t g_maxNumReusableTextureViews = 16; +static constexpr std::size_t g_maxNumReusableTextureViews = 16; GLTextureViewPool::~GLTextureViewPool() { @@ -97,7 +97,7 @@ void GLTextureViewPool::ReleaseTextureView(GLuint texID) { /* Try to find texture by GL texture ID only */ std::size_t insertionIndex = 0; - auto* sharedTexView = FindInSortedArray( + GLTextureView* sharedTexView = FindInSortedArray( textureViews_.data(), textureViews_.size(), [texID](const GLTextureView& rhs) diff --git a/tests/Testbed/TestbedContext.h b/tests/Testbed/TestbedContext.h index f3f29e6a48..5cfb1f6258 100644 --- a/tests/Testbed/TestbedContext.h +++ b/tests/Testbed/TestbedContext.h @@ -165,6 +165,8 @@ class TestbedContext #undef DECL_TEST + private: + bool LoadShaders(); void LoadProjectionMatrix(float nearPlane = 0.1f, float farPlane = 100.0f, float fov = 45.0f);