mirror of
https://github.com/AxioDL/boo.git
synced 2025-12-16 08:27:10 +00:00
Updates to support instanced rendering (OpenGL only)
This commit is contained in:
@@ -48,7 +48,7 @@ public:
|
||||
IShaderDataBinding*
|
||||
newShaderDataBinding(IShaderPipeline* pipeline,
|
||||
IVertexFormat* vtxFormat,
|
||||
IGraphicsBuffer* vbo, IGraphicsBuffer* ibo,
|
||||
IGraphicsBuffer* vbo, IGraphicsBuffer* instVbo, IGraphicsBuffer* ibo,
|
||||
size_t ubufCount, IGraphicsBuffer** ubufs,
|
||||
size_t texCount, ITexture** texs);
|
||||
|
||||
|
||||
@@ -24,6 +24,12 @@ struct IGraphicsCommandQueue
|
||||
virtual void setRenderTarget(ITextureR* target)=0;
|
||||
virtual void setViewport(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 flushBufferUpdates()=0;
|
||||
|
||||
|
||||
@@ -100,12 +100,18 @@ struct IVertexFormat {};
|
||||
/** Types of vertex attributes */
|
||||
enum class VertexSemantic
|
||||
{
|
||||
None = 0,
|
||||
Position,
|
||||
Normal,
|
||||
Color,
|
||||
UV,
|
||||
Weight
|
||||
UV4,
|
||||
Weight,
|
||||
ModelView,
|
||||
SemanticMask = 0xf,
|
||||
Instanced = 0x10
|
||||
};
|
||||
ENABLE_BITWISE_ENUM(VertexSemantic)
|
||||
|
||||
/** Used to create IVertexFormat */
|
||||
struct VertexElementDescriptor
|
||||
@@ -147,7 +153,9 @@ enum class BlendFactor
|
||||
SrcAlpha,
|
||||
InvSrcAlpha,
|
||||
DstAlpha,
|
||||
InvDstAlpha
|
||||
InvDstAlpha,
|
||||
SrcColor1,
|
||||
InvSrcColor1
|
||||
};
|
||||
|
||||
/** Factory object for creating batches of resources as an IGraphicsData token */
|
||||
@@ -196,7 +204,7 @@ struct IGraphicsDataFactory
|
||||
virtual IShaderDataBinding*
|
||||
newShaderDataBinding(IShaderPipeline* pipeline,
|
||||
IVertexFormat* vtxFormat,
|
||||
IGraphicsBuffer* vbo, IGraphicsBuffer* ibo,
|
||||
IGraphicsBuffer* vbo, IGraphicsBuffer* instVbo, IGraphicsBuffer* ibo,
|
||||
size_t ubufCount, IGraphicsBuffer** ubufs,
|
||||
size_t texCount, ITexture** texs)=0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user