Removed RenderTarget event pointer.

This commit is contained in:
2023-11-12 19:28:01 -06:00
parent 9363e6bc17
commit aa7ea94669
8 changed files with 30 additions and 23 deletions

View File

@ -7,18 +7,13 @@
using namespace Dawn;
UsageLock::UsageLock() : UsageLock(&this->internalPool) {
}
UsageLock::UsageLock(usagelockid_t *lockPool) {
assertNotNull(lockPool, "Lock pool cannot be null");
this->pool = lockPool;
UsageLock::UsageLock() {
this->onEmpty = []() {};
this->onFirstLock = []() {};
}
usagelockid_t UsageLock::createLock() {
usagelockid_t lock = (*this->pool)++;
usagelockid_t lock = this->pool++;
this->locks.push_back(lock);
if(this->locks.size() == 1) this->onFirstLock();
return lock;

View File

@ -10,8 +10,7 @@ namespace Dawn {
class UsageLock {
protected:
usagelockid_t internalPool = 0;
usagelockid_t *pool = nullptr;
usagelockid_t pool = 0;
std::vector<usagelockid_t> locks;
public:
@ -24,13 +23,6 @@ namespace Dawn {
*/
UsageLock();
/**
* Construct a new Usage Lock object
*
* @param lockPool Pool that will be used to create locks.
*/
UsageLock(usagelockid_t *lockPool);
/**
* Creates a new lock.
*