 |
Blamite Game Engine - blam!
00453.06.08.26.0624.blamite
The core library for the Blamite Game Engine.
|
Go to the documentation of this file.
3 #include <OGRE/Hlms/Unlit/OgreHlmsUnlit.h>
4 #include <OGRE/Hlms/Pbs/OgreHlmsPbs.h>
5 #include <OGRE/OgreHlmsListener.h>
7 #define SHADER_ADDONS_PARAM_ID 8000000u
60 Ogre::VaoManager* vaoManager,
79 BlamHlmsPbs(Ogre::Archive* dataFolder, Ogre::ArchiveVec* libraryFolders) :
80 HlmsPbs(dataFolder, libraryFolders)
86 void hlmsTypeChanged(
bool casterPass, Ogre::CommandBuffer* commandBuffer,
87 const Ogre::HlmsDatablock* datablock,
size_t texUnit)
override;
91 using HlmsPbs::setupRootLayout;
92 void setupRootLayout(Ogre::RootLayout& rootLayout,
const Ogre::HlmsPropertyVec& properties,
93 size_t tid)
const override;
95 Ogre::uint32
fillBuffersForV1(
const Ogre::HlmsCache* cache,
const Ogre::QueuedRenderable& queuedRenderable,
96 bool casterPass, Ogre::uint32 lastCacheHash,
97 Ogre::CommandBuffer* commandBuffer)
override;
99 Ogre::uint32
fillBuffersForV2(
const Ogre::HlmsCache* cache,
const Ogre::QueuedRenderable& queuedRenderable,
100 bool casterPass, Ogre::uint32 lastCacheHash,
101 Ogre::CommandBuffer* commandBuffer)
override;
Ogre::uint32 fillBuffersForV2(const Ogre::HlmsCache *cache, const Ogre::QueuedRenderable &queuedRenderable, bool casterPass, Ogre::uint32 lastCacheHash, Ogre::CommandBuffer *commandBuffer) override
Definition: BlamHlmsPbs.cpp:209
#define RENDERABLE_SHADER_USER_KEY
Definition: world_objects.h:19
void unmapObjectDataBuffer()
Unmaps the current buffer holding per-object data from memory.
Definition: BlamHlmsPbs.cpp:109
#define SHADER_ADDONS_PARAM_ID
Definition: hlms.h:7
BLAM void FillInstanceParameterBuffer(float *address, BlamWorldObject_Tag *object, shader *program)
Definition: shaders_hlms.cpp:223
Class representing a tag-based world object.
Definition: world_objects.h:278
~SharedHelperForHlms()
Definition: BlamHlmsPbs.cpp:29
BLAM uint16_t CalculateInstanceBufferElementCount(shader *program)
Definition: shaders_hlms.cpp:251
Ogre::uint32 fillBuffersForV1(const Ogre::HlmsCache *cache, const Ogre::QueuedRenderable &queuedRenderable, bool casterPass, Ogre::uint32 lastCacheHash, Ogre::CommandBuffer *commandBuffer) override
Definition: BlamHlmsPbs.cpp:155
float *ogre_nullable mCurrPerObjectDataPtr
The mapped contents of currPerObjectDataBuffer.
Definition: hlms.h:28
void hlmsTypeChanged(bool casterPass, Ogre::CommandBuffer *commandBuffer, const Ogre::HlmsDatablock *datablock, size_t texUnit) override
Definition: BlamHlmsPbs.cpp:136
void preCommandBufferExecution(Ogre::CommandBuffer *commandBuffer) override
Definition: BlamHlmsPbs.cpp:265
SharedHelperForHlms()
Definition: BlamHlmsPbs.cpp:21
void frameEnded() override
Definition: BlamHlmsPbs.cpp:271
float * mapObjectDataBufferFor(uint32_t instanceIdx, Ogre::CommandBuffer *commandBuffer, Ogre::VaoManager *vaoManager, const ConstBufferPackedVec &constBuffers, uint32_t currConstBufferIdx, uint32_t *startMappedConstBuffer, uint16_t perObjectDataBufferSlot, uint16_t element_count)
Definition: BlamHlmsPbs.cpp:51
Ogre::ConstBufferPacked *ogre_nullable mLastMainConstBuffer
The last content of mCurrentConstBuffer.
Definition: hlms.h:25
unsigned int uint32_t
Definition: stdint.h:17
void calculateHashForPreCreate(Ogre::Renderable *renderable, Ogre::PiecesMap *inOutPieces) override
Definition: BlamHlmsPbs.cpp:123
#define OBJECT_DATA_BUFFER_SLOT
The slot where to bind mCurrPerObjectDataBuffer HlmsPbs might consume slot 3, so we always use slot 4...
Definition: BlamHlmsPbs.cpp:19
#define WORLD_OBJECT_USER_KEY
Definition: world_objects.h:18
void bindObjectDataBuffer(Ogre::CommandBuffer *commandBuffer, uint16_t perObjectDataBufferSlot)
Binds currPerObjectDataBuffer to the right slot.
Definition: BlamHlmsPbs.cpp:40
BlamHlmsPbs(Ogre::Archive *dataFolder, Ogre::ArchiveVec *libraryFolders)
This value is completely arbitrary.
Definition: hlms.h:79
Ogre::VaoManager *ogre_nullable mOwnVaoManager
Pointer to Ogre's VAO manager. Used here for destroying const buffers.
Definition: hlms.h:31
BLAM shader * GetShaderTag(std::string tag_path)
Definition: shader.cpp:13
ConstBufferPackedVec mPerObjectDataBuffers
Vector of buffers holding per-object data.
Definition: hlms.h:17
Ogre::vector< Ogre::ConstBufferPacked * >::type ConstBufferPackedVec
Definition: hlms.h:12
unsigned short uint16_t
Definition: stdint.h:16
void setupRootLayout(Ogre::RootLayout &rootLayout, const Ogre::HlmsPropertyVec &properties, size_t tid) const override
Definition: BlamHlmsPbs.cpp:143
Ogre::ConstBufferPacked *ogre_nullable mCurrPerObjectDataBuffer
The buffer currently use. Can be nullptr. It is contained in mPerObjectDataBuffers.
Definition: hlms.h:20