mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-12-16 15:31:30 +00:00
f166624eb2
The binding point needs to be part of the ShaderUniforms class because Vulkan will need this value to generate the declaration in the shader source. There's still one issue here: Since OpenGL has no local render state, the buffer must be bound every time it is used. Once the code is better abstracted this should be moved to a higher level class that knows all associated data and how to set it up.
18 lines
354 B
C++
18 lines
354 B
C++
#pragma once
|
|
|
|
#include "zstring.h"
|
|
|
|
class IUniformBuffer
|
|
{
|
|
protected:
|
|
size_t mSize;
|
|
|
|
IUniformBuffer(size_t size) : mSize(size) {}
|
|
|
|
public:
|
|
virtual ~IUniformBuffer() {}
|
|
virtual void SetData(const void *data) = 0;
|
|
virtual void Bind(int bindingpoint) = 0; // This is only here for OpenGL. Vulkan doesn't need the ability to bind this at run time.
|
|
|
|
|
|
};
|