# Changes -> 0.5.1

- 3ds
  - Remove Gfx values that are present in Backend Tamplate
  - Move to default Palladium Namespace
  - Set the Input Flags
- Desktop
  - Move to PD Namespace
  - Comment out old keyboard stuff
  - HidDriver needs a rewrite but is functional enough
- Core
  - Add u128 class (only used in input driver so far
- Drivers (Core)
  - Move Gfx to PD namespace
  - Move Vertex/Index Pos and Projection Mtx to Gfx template
  - Add Keyboard support with u128 to Hid
  - Add a Update func if no hiddriver is specified (to prevent crashes when requestign inputs)
- Image
   - Add RGBA -> BGRA support (used in windows bitmaps iirc)
- Lithium
  - Add Vertex/Index counters to drawlist
  - Add a LoadTTF from Mem func and let the loadfile func use PD::IO::LoadFile2Mem (looks cleaner)
  - Add LoadDefaultFont (which loads one of the integrated fonts if the PD_LI_INCLUDE_FONTS flag was passed on palaldium build) !!! Note that there are no fonts integrated yet due to i dont know how to handle licensing...
- UI7
  - Add MouseLeft support to Input handler
  - Use xy coords of the Viewport to create Menus inside it
  - Get num of Vertices/Indices out of FinalDrawList
  - Add some Palladium Info to metrics Menu
  - Readd Compiler string
- pdfm
  - New tool that creates fonts.cpp/fonts.hpp
This commit is contained in:
2025-08-14 20:37:55 +02:00
parent 87910b57de
commit 310b44caf5
38 changed files with 644 additions and 166 deletions

View File

@ -57,7 +57,7 @@ int main() {
#endif
List->SetFont(font);
PD::Image::Convert(img, img->RGBA);
auto tex = PD::Li::Gfx::LoadTex(img->pBuffer, img->pWidth, img->pHeight);
auto tex = PD::Gfx::LoadTex(img->pBuffer, img->pWidth, img->pHeight);
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
auto ui7 = PD::UI7::Context::New();
@ -71,7 +71,7 @@ int main() {
font->DefaultPixelHeight = 32;
while (!glfwWindowShouldClose(win)) {
#else
PD::Li::Gfx::pGfx->ViewPort = PD::ivec2(400, 240);
PD::Gfx::pGfx->ViewPort = PD::ivec2(400, 240);
while (aptMainLoop()) {
#endif
PD::Hid::Update();
@ -79,7 +79,10 @@ int main() {
/** Auto ViewPort Resize */
int wx, wy;
glfwGetWindowSize(win, &wx, &wy);
PD::Li::Gfx::pGfx->ViewPort = PD::ivec2(wx, wy);
PD::Gfx::pGfx->ViewPort = PD::ivec2(wx, wy);
glViewport(0, 0, wx, wy);
glClearColor(0, 0, 0, 0);
glClear(GL_COLOR_BUFFER_BIT);
// ui7->pIO->GetViewPort(VpTop)->pSize = PD::ivec4(0, 0, wx, wy);
#endif
/** Rendering some stuff */
@ -127,9 +130,8 @@ int main() {
if (ui7->BeginMenu("Yet another Window")) {
auto menu = ui7->pCurrent;
menu->Label(std::format("this->Pos: {}", menu->pLayout->GetPosition()));
menu->Label(
std::format("Vertices: {}", PD::Li::Gfx::pGfx->VertexCounter));
menu->Label(std::format("Indices: {}", PD::Li::Gfx::pGfx->IndexCounter));
menu->Label(std::format("Vertices: {}", PD::Gfx::pGfx->VertexCounter));
menu->Label(std::format("Indices: {}", PD::Gfx::pGfx->IndexCounter));
ui7->EndMenu();
}
if (ui7->BeginMenu("#Debug (UI7)")) {
@ -173,9 +175,9 @@ int main() {
C3D_RenderTargetClear(Top, C3D_CLEAR_ALL, 0x00000000, 0);
#endif
PD::TT::Beg("REN");
PD::Li::Gfx::NewFrame();
PD::Li::Gfx::RenderDrawData(List->pDrawList);
PD::Li::Gfx::RenderDrawData(ui7->GetDrawData()->pDrawList);
PD::Gfx::NewFrame();
PD::Gfx::RenderDrawData(List->pDrawList);
PD::Gfx::RenderDrawData(ui7->GetDrawData()->pDrawList);
/** Clear The List */
List->Clear();
PD::TT::End("REN");