From: Mikko Rasa Date: Fri, 14 Jan 2022 22:06:58 +0000 (+0200) Subject: Minor, largely cosmetic tweaks X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=50492d9a5106b3dd76e3d6fa5ac88d9f97ba3c47;p=libs%2Fgl.git Minor, largely cosmetic tweaks --- diff --git a/source/backends/opengl/buffer_backend.h b/source/backends/opengl/buffer_backend.h index 06c128af..446b1d2d 100644 --- a/source/backends/opengl/buffer_backend.h +++ b/source/backends/opengl/buffer_backend.h @@ -20,7 +20,7 @@ protected: ~OpenGLBuffer(); void allocate(); - void sub_data(size_t, size_t, const void *); + void sub_data(std::size_t, std::size_t, const void *); unsigned get_multiplicity() const { return 1; } diff --git a/source/backends/opengl/extension.h b/source/backends/opengl/extension.h index 77996357..27dae6fc 100644 --- a/source/backends/opengl/extension.h +++ b/source/backends/opengl/extension.h @@ -1,5 +1,5 @@ -#ifndef MSP_GL_EXTENSION_H_ -#define MSP_GL_EXTENSION_H_ +#ifndef MSP_GL_OPENGL_EXTENSION_H_ +#define MSP_GL_OPENGL_EXTENSION_H_ #include #include "backend.h" diff --git a/source/backends/vulkan/pipelinestate_backend.cpp b/source/backends/vulkan/pipelinestate_backend.cpp index 6107fa49..1d381022 100644 --- a/source/backends/vulkan/pipelinestate_backend.cpp +++ b/source/backends/vulkan/pipelinestate_backend.cpp @@ -68,10 +68,13 @@ void VulkanPipelineState::update() const t.changed = false; } - descriptor_set_handles.resize(self.shprog->get_n_descriptor_sets()); - for(unsigned i=0; iget_n_descriptor_sets()); + for(unsigned i=0; i(this); const VulkanFunctions &vk = device.get_functions(); VkImageBlit region = { }; - region.srcSubresource.aspectMask = get_vulkan_aspect(get_components(static_cast(this)->storage_fmt)); + region.srcSubresource.aspectMask = get_vulkan_aspect(get_components(self.storage_fmt)); region.srcSubresource.mipLevel = i; region.srcSubresource.baseArrayLayer = 0; region.srcSubresource.layerCount = 1; diff --git a/source/core/bufferable.h b/source/core/bufferable.h index d49f0149..29acafe0 100644 --- a/source/core/bufferable.h +++ b/source/core/bufferable.h @@ -1,6 +1,7 @@ #ifndef MSP_GL_BUFFERABLE_H_ #define MSP_GL_BUFFERABLE_H_ +#include #include #include "buffer.h" diff --git a/source/effects/environmentmap.cpp b/source/effects/environmentmap.cpp index 2caecb56..f6e1c411 100644 --- a/source/effects/environmentmap.cpp +++ b/source/effects/environmentmap.cpp @@ -52,10 +52,10 @@ EnvironmentMap::EnvironmentMap(unsigned s, PixelFormat f, unsigned l, Renderable if(l>1) { specular_fbos.resize(l-1); - for(unsigned i=1; i face_matrices[6]; diff --git a/source/render/renderer.h b/source/render/renderer.h index c176f87a..51989f77 100644 --- a/source/render/renderer.h +++ b/source/render/renderer.h @@ -4,6 +4,7 @@ #include #include #include "commands.h" +#include "cullface.h" #include "matrix.h" #include "programdata.h" #include "renderer_backend.h" @@ -13,16 +14,20 @@ namespace Msp { namespace GL { class Batch; +class Blend; class Buffer; class Camera; union ClearValue; +class DepthTest; class Material; class Mesh; class Lighting; class Program; class QueryPool; +struct Rect; class Renderable; class Sampler; +class StencilTest; class Texture; class VertexSetup; diff --git a/source/render/sequence.cpp b/source/render/sequence.cpp index 74b8bc3b..e2986a24 100644 --- a/source/render/sequence.cpp +++ b/source/render/sequence.cpp @@ -12,7 +12,7 @@ using namespace std; namespace Msp { namespace GL { -Tag Sequence::noclear_tag = "noclear"; +const Tag Sequence::noclear_tag = "noclear"; Sequence::Sequence(unsigned w, unsigned h, const FrameFormat &f): width(w), diff --git a/source/render/sequence.h b/source/render/sequence.h index 6ee74986..a5ae2e7c 100644 --- a/source/render/sequence.h +++ b/source/render/sequence.h @@ -82,7 +82,7 @@ private: int clear_stencil = 0; std::vector owned_data; - static Tag noclear_tag; + static const Tag noclear_tag; public: Sequence() = default;