gl_rasterizer: Use ARB_multi_bind to update UBOs across stages

This commit is contained in:
ReinUsesLisp
2019-04-05 18:31:24 -03:00
parent 66be5150d6
commit 2d1f054c61
4 changed files with 58 additions and 22 deletions

View File

@ -5,11 +5,31 @@
#pragma once
#include <string>
#include <vector>
#include <glad/glad.h>
#include "common/common_types.h"
namespace OpenGL {
class BindBuffersRangePushBuffer {
public:
BindBuffersRangePushBuffer(GLenum target);
~BindBuffersRangePushBuffer();
void Setup(GLuint first_);
void Push(GLuint buffer, GLintptr offset, GLsizeiptr size);
void Bind() const;
private:
GLenum target;
GLuint first;
std::vector<GLuint> buffers;
std::vector<GLintptr> offsets;
std::vector<GLsizeiptr> sizes;
};
void LabelGLObject(GLenum identifier, GLuint handle, VAddr addr, std::string extra_info = "");
} // namespace OpenGL