made Editor non reliant on GLFW aka i added an IRenderTexture interface of use in non renderer specific aplications
This commit is contained in:
@@ -882,7 +882,7 @@ namespace TSE::EDITOR
|
||||
ImVec2 field_size = ImVec2(field_width, 60);
|
||||
|
||||
Rect r = element->GetUVRect();
|
||||
float ymultiplyer = (element->GetTexture()->height() * r.height()) / (element->GetTexture()->width() * r.width());
|
||||
float ymultiplyer = (element->GetTexture()->Height() * r.height()) / (element->GetTexture()->Width() * r.width());
|
||||
|
||||
ImVec2 texSize (field_size.y - 2, (field_size.y - 2) * ymultiplyer);
|
||||
|
||||
@@ -916,7 +916,7 @@ namespace TSE::EDITOR
|
||||
}
|
||||
ImGui::Separator();
|
||||
float available_width = ImGui::GetContentRegionAvail().x;
|
||||
float ymultiplyer = (element->GetTexture()->height() * r.height()) / (element->GetTexture()->width() * r.width());
|
||||
float ymultiplyer = (element->GetTexture()->Height() * r.height()) / (element->GetTexture()->Width() * r.width());
|
||||
|
||||
ImVec2 texSize (available_width, (available_width) * ymultiplyer);
|
||||
ImGui::Image(element->GetTexture()->GetTextureId(), texSize, {r.p1.x,r.p2.y}, {r.p2.x,r.p1.y});
|
||||
@@ -931,7 +931,7 @@ namespace TSE::EDITOR
|
||||
|
||||
ImVec2 field_size = ImVec2(field_width, 60);
|
||||
|
||||
float ymultiplyer = element->height() / element->width();
|
||||
float ymultiplyer = element->Height() / element->Width();
|
||||
|
||||
ImVec2 texSize (field_size.y - 2, (field_size.y - 2) * ymultiplyer);
|
||||
|
||||
@@ -963,8 +963,8 @@ namespace TSE::EDITOR
|
||||
if(debug)
|
||||
{
|
||||
ImGui::Separator();
|
||||
ImGui::TextDisabled(("Width: " + std::to_string(element->width())).c_str());
|
||||
ImGui::TextDisabled(("Height: " + std::to_string(element->height())).c_str());
|
||||
ImGui::TextDisabled(("Width: " + std::to_string(element->Width())).c_str());
|
||||
ImGui::TextDisabled(("Height: " + std::to_string(element->Height())).c_str());
|
||||
ImGui::TextDisabled(("BPP: " + std::to_string(element->bpp())).c_str());
|
||||
ImGui::TextDisabled(("Chanels: " + std::to_string(element->Chanels())).c_str());
|
||||
ImGui::Separator();
|
||||
@@ -972,7 +972,7 @@ namespace TSE::EDITOR
|
||||
}
|
||||
ImGui::Separator();
|
||||
float available_width = ImGui::GetContentRegionAvail().x;
|
||||
float ymultiplyer = element->height() / element->width();
|
||||
float ymultiplyer = element->Height() / element->Width();
|
||||
|
||||
ImVec2 texSize (available_width, (available_width) * ymultiplyer);
|
||||
ImGui::Image(element->GetTextureId(), texSize, {0,1}, {1,0});
|
||||
|
||||
Reference in New Issue
Block a user