large scale renderer rework
- Abstracts all OpenGL functionality including UI objects - Cleans up several rendering codepaths - Improves threading functionality - Removes old code and problematic functions
This commit is contained in:
@@ -52,8 +52,6 @@ ThreadPool::~ThreadPool()
|
||||
thread->wait();
|
||||
delete thread;
|
||||
}
|
||||
|
||||
RunNext();
|
||||
}
|
||||
|
||||
void ThreadPool::AddTicket(RenderTicketPtr ticket, bool prioritize)
|
||||
|
||||
@@ -83,7 +83,12 @@ void RenderTicket::Finish(QVariant result, bool cancelled)
|
||||
{
|
||||
QMutexLocker locker(&lock_);
|
||||
|
||||
if (started_ && !finished_) {
|
||||
if (!started_) {
|
||||
qWarning() << "Tried to finish a ticket that hadn't started";
|
||||
} else if (finished_) {
|
||||
// Do nothing
|
||||
return;
|
||||
} else {
|
||||
finished_ = true;
|
||||
cancelled_ = cancelled;
|
||||
|
||||
|
||||
@@ -30,8 +30,15 @@ RenderTicketWatcher::RenderTicketWatcher(QObject *parent) :
|
||||
|
||||
void RenderTicketWatcher::SetTicket(RenderTicketPtr ticket)
|
||||
{
|
||||
// Ensure that a ticket has NOT already been set and that this ticket is NOT NULL
|
||||
Q_ASSERT(!ticket_ && ticket);
|
||||
if (ticket_) {
|
||||
qCritical() << "Tried to set a ticket on a RenderTicketWatcher twice";
|
||||
return;
|
||||
}
|
||||
|
||||
if (!ticket) {
|
||||
qCritical() << "Tried to set a null ticket on a RenderTicketWatcher";
|
||||
return;
|
||||
}
|
||||
|
||||
ticket_ = ticket;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user