mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-11 15:22:16 +00:00
Make it compile
This commit is contained in:
parent
b8b5802599
commit
3385e28611
5 changed files with 14 additions and 4 deletions
|
@ -68,6 +68,6 @@ void GLUniformBuffer::SetData(const void *data)
|
|||
if (mBufferId != 0)
|
||||
{
|
||||
glBindBuffer(GL_UNIFORM_BUFFER, mBufferId);
|
||||
glBufferData(GL_UNIFORM_BUFFER, size, data, mStaticDraw? GL_STATIC_DRAW : GL_STREAM_DRAW);
|
||||
glBufferData(GL_UNIFORM_BUFFER, mSize, data, mStaticDraw? GL_STATIC_DRAW : GL_STREAM_DRAW);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,11 +9,10 @@ class GLUniformBuffer : public IUniformBuffer
|
|||
unsigned mBufferId;
|
||||
bool mStaticDraw;
|
||||
|
||||
protected:
|
||||
public:
|
||||
GLUniformBuffer(size_t size, bool staticdraw = false);
|
||||
~GLUniformBuffer();
|
||||
|
||||
void Bind() override;
|
||||
void SetData(const void *data) override;
|
||||
|
||||
unsigned ID() const
|
||||
|
@ -21,4 +20,4 @@ protected:
|
|||
return mBufferId;
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
|
|
|
@ -38,6 +38,7 @@
|
|||
#include "gl/textures/gl_samplers.h"
|
||||
#include "hwrenderer/utility/hw_clock.h"
|
||||
#include "gl/data/gl_vertexbuffer.h"
|
||||
#include "gl/data/gl_uniformbuffer.h"
|
||||
#include "gl/models/gl_models.h"
|
||||
#include "gl/stereo3d/gl_stereo3d.h"
|
||||
#include "gl_debug.h"
|
||||
|
@ -355,6 +356,10 @@ FModelRenderer *OpenGLFrameBuffer::CreateModelRenderer(int mli)
|
|||
return new FGLModelRenderer(mli);
|
||||
}
|
||||
|
||||
IUniformBuffer *OpenGLFrameBuffer::CreateUniformBuffer(size_t size, bool staticuse)
|
||||
{
|
||||
return new GLUniformBuffer(size, staticuse);
|
||||
}
|
||||
|
||||
void OpenGLFrameBuffer::UnbindTexUnit(int no)
|
||||
{
|
||||
|
|
|
@ -44,6 +44,8 @@ public:
|
|||
bool RenderBuffersEnabled() override;
|
||||
void SetViewportRects(IntRect *bounds) override;
|
||||
void BlurScene(float amount) override;
|
||||
IUniformBuffer *CreateUniformBuffer(size_t size, bool staticuse = false) override;
|
||||
|
||||
|
||||
// Retrieves a buffer containing image data for a screenshot.
|
||||
// Hint: Pitch can be negative for upside-down images, in which case buffer
|
||||
|
|
|
@ -319,6 +319,7 @@ public:
|
|||
class FUniquePalette;
|
||||
class IHardwareTexture;
|
||||
class FTexture;
|
||||
class IUniformBuffer;
|
||||
|
||||
// A canvas that represents the actual display. The video code is responsible
|
||||
// for actually implementing this. Built on top of SimpleCanvas, because it
|
||||
|
@ -413,6 +414,9 @@ public:
|
|||
virtual bool RenderBuffersEnabled() { return false; };
|
||||
virtual void BlurScene(float amount) {}
|
||||
|
||||
// Interface to hardware rendering resources
|
||||
virtual IUniformBuffer *CreateUniformBuffer(size_t size, bool staticuse = false) { return nullptr; }
|
||||
|
||||
// Begin 2D drawing operations.
|
||||
// Returns true if hardware-accelerated 2D has been entered, false if not.
|
||||
void Begin2D(bool copy3d) { isIn2D = true; }
|
||||
|
|
Loading…
Reference in a new issue