mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-05 09:30:44 +00:00
Normalise and make python/public interface more consistent
* We enforce a naming scheme more strongly - types, member functions, and enum values must be UpperCaseCamel, and member variables must be lowerCaseCamel. No underscores allowed. * eventId not eventID or EID, and Id preferred to ID in general. Also for resourceId. * Removed some lingering hungarian m_Foo naming. * Some pipeline state structs that are almost identical between the different APIs are pulled out into common structs. Where something doesn't make sense (e.g. viewport enable for vulkan) it will just be set to a sensible default (in that case always true). * Changed scissors to be x/y & width/height instead of sometimes left/top/right/bottom * Abbreviations are discouraged, e.g. operation not op, function not func.
This commit is contained in:
@@ -142,8 +142,8 @@ void RemoteManager::setRemoteServerLive(RDTreeWidgetItem *node, bool live, bool
|
||||
if(!host)
|
||||
return;
|
||||
|
||||
host->ServerRunning = live;
|
||||
host->Busy = busy;
|
||||
host->serverRunning = live;
|
||||
host->busy = busy;
|
||||
|
||||
if(host->IsLocalhost())
|
||||
{
|
||||
@@ -154,11 +154,11 @@ void RemoteManager::setRemoteServerLive(RDTreeWidgetItem *node, bool live, bool
|
||||
{
|
||||
QString text = live ? tr("Remote server running") : tr("No remote server");
|
||||
|
||||
if(host->Connected)
|
||||
if(host->connected)
|
||||
text += tr(" (Active Context)");
|
||||
else if(host->VersionMismatch)
|
||||
else if(host->versionMismatch)
|
||||
text += tr(" (Version Mismatch)");
|
||||
else if(host->Busy)
|
||||
else if(host->busy)
|
||||
text += tr(" (Busy)");
|
||||
|
||||
node->setText(1, text);
|
||||
@@ -170,7 +170,7 @@ void RemoteManager::setRemoteServerLive(RDTreeWidgetItem *node, bool live, bool
|
||||
bool RemoteManager::isRemoteServerLive(RDTreeWidgetItem *node)
|
||||
{
|
||||
RemoteHost *host = getRemoteHost(node);
|
||||
return host && host->ServerRunning;
|
||||
return host && host->serverRunning;
|
||||
}
|
||||
|
||||
void RemoteManager::addHost(RemoteHost *host)
|
||||
@@ -228,7 +228,7 @@ void RemoteManager::refreshHost(RDTreeWidgetItem *node)
|
||||
host->CheckStatus();
|
||||
|
||||
GUIInvoke::call(
|
||||
[this, node, host]() { setRemoteServerLive(node, host->ServerRunning, host->Busy); });
|
||||
[this, node, host]() { setRemoteServerLive(node, host->serverRunning, host->busy); });
|
||||
|
||||
uint32_t nextIdent = 0;
|
||||
|
||||
@@ -237,13 +237,13 @@ void RemoteManager::refreshHost(RDTreeWidgetItem *node)
|
||||
// just a sanity check to make sure we don't hit some unexpected case and infinite loop
|
||||
uint32_t prevIdent = nextIdent;
|
||||
|
||||
nextIdent = RENDERDOC_EnumerateRemoteTargets(host->Hostname.c_str(), nextIdent);
|
||||
nextIdent = RENDERDOC_EnumerateRemoteTargets(host->hostname.c_str(), nextIdent);
|
||||
|
||||
if(nextIdent == 0 || prevIdent >= nextIdent)
|
||||
break;
|
||||
|
||||
ITargetControl *conn =
|
||||
RENDERDOC_CreateTargetControl(host->Hostname.c_str(), nextIdent, username.data(), false);
|
||||
RENDERDOC_CreateTargetControl(host->hostname.c_str(), nextIdent, username.data(), false);
|
||||
|
||||
if(conn)
|
||||
{
|
||||
@@ -258,7 +258,7 @@ void RemoteManager::refreshHost(RDTreeWidgetItem *node)
|
||||
else
|
||||
running = tr("Running %1").arg(api);
|
||||
|
||||
RemoteConnect tag(host->Hostname, host->Name(), nextIdent);
|
||||
RemoteConnect tag(host->hostname, host->Name(), nextIdent);
|
||||
|
||||
GUIInvoke::call([this, node, target, running, tag]() {
|
||||
RDTreeWidgetItem *child = new RDTreeWidgetItem({target, running});
|
||||
@@ -340,18 +340,18 @@ void RemoteManager::updateConnectButton()
|
||||
ui->connect->setText(tr("Run Server"));
|
||||
ui->connect->setEnabled(false);
|
||||
}
|
||||
else if(host->ServerRunning)
|
||||
else if(host->serverRunning)
|
||||
{
|
||||
ui->connect->setText(tr("Shutdown"));
|
||||
|
||||
if(host->Busy && !host->Connected)
|
||||
if(host->busy && !host->connected)
|
||||
ui->connect->setEnabled(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->connect->setText(tr("Run Server"));
|
||||
|
||||
if(host->RunCommand.isEmpty())
|
||||
if(host->runCommand.isEmpty())
|
||||
ui->connect->setEnabled(false);
|
||||
}
|
||||
}
|
||||
@@ -371,7 +371,7 @@ void RemoteManager::addNewHost()
|
||||
|
||||
for(int i = 0; i < m_Ctx.Config().RemoteHosts.count(); i++)
|
||||
{
|
||||
QString hostname = m_Ctx.Config().RemoteHosts[i]->Hostname;
|
||||
QString hostname = m_Ctx.Config().RemoteHosts[i]->hostname;
|
||||
if(hostname.compare(host, Qt::CaseInsensitive) == 0)
|
||||
{
|
||||
found = true;
|
||||
@@ -382,8 +382,8 @@ void RemoteManager::addNewHost()
|
||||
if(!found)
|
||||
{
|
||||
RemoteHost *h = new RemoteHost();
|
||||
h->Hostname = host;
|
||||
h->RunCommand = ui->runCommand->text().trimmed();
|
||||
h->hostname = host;
|
||||
h->runCommand = ui->runCommand->text().trimmed();
|
||||
|
||||
m_Ctx.Config().RemoteHosts.push_back(h);
|
||||
m_Ctx.Config().Save();
|
||||
@@ -406,7 +406,7 @@ void RemoteManager::setRunCommand()
|
||||
|
||||
if(h)
|
||||
{
|
||||
h->RunCommand = ui->runCommand->text().trimmed();
|
||||
h->runCommand = ui->runCommand->text().trimmed();
|
||||
m_Ctx.Config().Save();
|
||||
}
|
||||
}
|
||||
@@ -451,12 +451,12 @@ void RemoteManager::on_hosts_itemSelectionChanged()
|
||||
if(ui->refreshAll->isEnabled())
|
||||
ui->refreshOne->setEnabled(true);
|
||||
|
||||
ui->runCommand->setText(host->RunCommand);
|
||||
ui->runCommand->setText(host->runCommand);
|
||||
ui->hostname->setText(host->Name());
|
||||
|
||||
ui->addUpdateHost->setText(tr("Update"));
|
||||
|
||||
if(host->IsLocalhost() || host->IsHostADB())
|
||||
if(host->IsLocalhost() || host->IsADB())
|
||||
{
|
||||
// localhost and android hosts cannot be updated or have their run command changed
|
||||
ui->addUpdateHost->setEnabled(false);
|
||||
@@ -591,7 +591,7 @@ void RemoteManager::on_connect_clicked()
|
||||
}
|
||||
else if(host)
|
||||
{
|
||||
if(host->ServerRunning)
|
||||
if(host->serverRunning)
|
||||
{
|
||||
QMessageBox::StandardButton res = RDDialog::question(
|
||||
this, tr("Remote server shutdown"),
|
||||
@@ -602,7 +602,7 @@ void RemoteManager::on_connect_clicked()
|
||||
return;
|
||||
|
||||
// shut down
|
||||
if(host->Connected)
|
||||
if(host->connected)
|
||||
{
|
||||
m_Ctx.Replay().ShutdownServer();
|
||||
setRemoteServerLive(node, false, false);
|
||||
@@ -611,7 +611,7 @@ void RemoteManager::on_connect_clicked()
|
||||
{
|
||||
IRemoteServer *server = NULL;
|
||||
ReplayStatus status =
|
||||
RENDERDOC_CreateRemoteServerConnection(host->Hostname.c_str(), 0, &server);
|
||||
RENDERDOC_CreateRemoteServerConnection(host->hostname.c_str(), 0, &server);
|
||||
if(server)
|
||||
server->ShutdownServerAndConnection();
|
||||
setRemoteServerLive(node, false, false);
|
||||
|
||||
Reference in New Issue
Block a user