Internal dynamic buffer updating (OpenGL only)

This commit is contained in:
Jack Andersen
2015-12-02 11:09:49 -10:00
parent cd4df5cb27
commit 13cf33d75f
4 changed files with 137 additions and 79 deletions

View File

@@ -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);

View File

@@ -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;

View File

@@ -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) {}
};