mirror of
https://github.com/AxioDL/boo.git
synced 2025-12-16 08:27:10 +00:00
Internal dynamic buffer updating (OpenGL only)
This commit is contained in:
@@ -12,9 +12,10 @@ namespace boo
|
||||
|
||||
class GLDataFactory : public IGraphicsDataFactory
|
||||
{
|
||||
friend struct GLCommandQueue;
|
||||
IGraphicsContext* m_parent;
|
||||
IGraphicsData* m_deferredData = nullptr;
|
||||
std::unordered_set<IGraphicsData*> m_committedData;
|
||||
struct GLData* m_deferredData = nullptr;
|
||||
std::unordered_set<struct GLData*> m_committedData;
|
||||
std::vector<int> m_texUnis;
|
||||
public:
|
||||
GLDataFactory(IGraphicsContext* parent);
|
||||
|
||||
@@ -25,12 +25,6 @@ struct IGraphicsCommandQueue
|
||||
virtual void setViewport(const SWindowRect& rect)=0;
|
||||
virtual void setScissor(const SWindowRect& rect)=0;
|
||||
|
||||
/**
|
||||
* @brief Which dynamic buffer slot is being populated for pending command list
|
||||
* @return Index [0,2] indicating the buffer slot
|
||||
*/
|
||||
virtual int pendingDynamicSlot()=0;
|
||||
|
||||
virtual void resizeRenderTexture(ITextureR* tex, size_t width, size_t height)=0;
|
||||
|
||||
virtual void setClearColor(const float rgba[4])=0;
|
||||
|
||||
@@ -127,12 +127,12 @@ ENABLE_BITWISE_ENUM(VertexSemantic)
|
||||
/** Used to create IVertexFormat */
|
||||
struct VertexElementDescriptor
|
||||
{
|
||||
const IGraphicsBuffer* vertBuffer = nullptr;
|
||||
const IGraphicsBuffer* indexBuffer = nullptr;
|
||||
IGraphicsBuffer* vertBuffer = nullptr;
|
||||
IGraphicsBuffer* indexBuffer = nullptr;
|
||||
VertexSemantic semantic;
|
||||
int semanticIdx = 0;
|
||||
VertexElementDescriptor() = default;
|
||||
VertexElementDescriptor(const IGraphicsBuffer* v, const IGraphicsBuffer* i, VertexSemantic s, int idx=0)
|
||||
VertexElementDescriptor(IGraphicsBuffer* v, IGraphicsBuffer* i, VertexSemantic s, int idx=0)
|
||||
: vertBuffer(v), indexBuffer(i), semantic(s), semanticIdx(idx) {}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user