~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; }
-#ifndef MSP_GL_EXTENSION_H_
-#define MSP_GL_EXTENSION_H_
+#ifndef MSP_GL_OPENGL_EXTENSION_H_
+#define MSP_GL_OPENGL_EXTENSION_H_
#include <string>
#include "backend.h"
t.changed = false;
}
- descriptor_set_handles.resize(self.shprog->get_n_descriptor_sets());
- for(unsigned i=0; i<descriptor_set_handles.size(); ++i)
- if(changed_sets&(1<<i))
- descriptor_set_handles[i] = device.get_pipeline_cache().get_descriptor_set(self, i);
+ if(changed_sets)
+ {
+ descriptor_set_handles.resize(self.shprog->get_n_descriptor_sets());
+ for(unsigned i=0; i<descriptor_set_handles.size(); ++i)
+ if(changed_sets&(1<<i))
+ descriptor_set_handles[i] = device.get_pipeline_cache().get_descriptor_set(self, i);
+ }
}
changes = 0;
{
protected:
PipelineState pipeline_state;
- Semaphore *begin_semaphore;
- Semaphore *end_semaphore;
+ Semaphore *begin_semaphore = 0;
+ Semaphore *end_semaphore = 0;
void begin();
void begin(Semaphore &);
change_layout(i+1, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, true);
},
[this, i](VkCommandBuffer cmd_buf, VkBuffer, size_t){
+ const Texture &self = *static_cast<const Texture *>(this);
const VulkanFunctions &vk = device.get_functions();
VkImageBlit region = { };
- region.srcSubresource.aspectMask = get_vulkan_aspect(get_components(static_cast<const Texture *>(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;
#ifndef MSP_GL_BUFFERABLE_H_
#define MSP_GL_BUFFERABLE_H_
+#include <cstddef>
#include <msp/core/noncopyable.h>
#include "buffer.h"
if(l>1)
{
specular_fbos.resize(l-1);
- for(unsigned i=1; i<l; ++i)
+ for(unsigned i=0; i+1<l; ++i)
{
- specular_fbos[i-1].set_format((COLOR_ATTACHMENT,f));
- specular_fbos[i-1].attach_layered(COLOR_ATTACHMENT, env_tex, i);
+ specular_fbos[i].set_format((COLOR_ATTACHMENT,f));
+ specular_fbos[i].attach_layered(COLOR_ATTACHMENT, env_tex, i+1);
}
LinAl::Matrix<float, 3, 3> face_matrices[6];
#include <set>
#include <vector>
#include "commands.h"
+#include "cullface.h"
#include "matrix.h"
#include "programdata.h"
#include "renderer_backend.h"
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;
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),
int clear_stencil = 0;
std::vector<OwnedObject> owned_data;
- static Tag noclear_tag;
+ static const Tag noclear_tag;
public:
Sequence() = default;