# 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:
@ -25,7 +25,6 @@ SOFTWARE.
|
||||
#include <pd-desktop/bknd-gfx.hpp>
|
||||
|
||||
namespace PD {
|
||||
namespace Li {
|
||||
const char* vertex_shader = R"(
|
||||
#version 120
|
||||
|
||||
@ -161,13 +160,11 @@ void GfxGL2::NewFrame() {
|
||||
glUniformMatrix4fv(pLocProjection, 1, GL_FALSE, Projection.m.data());
|
||||
glEnable(GL_BLEND);
|
||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||
CurrentIndex = 0;
|
||||
CurrentVertex = 0;
|
||||
FrameCounter++;
|
||||
VertexCounter = NumVtx;
|
||||
IndexCounter = NumIdx;
|
||||
NumVtx = 0;
|
||||
NumIdx = 0;
|
||||
VertexCounter = CurrentVertex;
|
||||
IndexCounter = CurrentIndex;
|
||||
CurrentVertex = 0;
|
||||
CurrentIndex = 0;
|
||||
}
|
||||
|
||||
void GfxGL2::BindTex(PD::Li::TexAddress addr) {
|
||||
@ -194,11 +191,9 @@ void GfxGL2::RenderDrawData(const std::vector<PD::Li::Command::Ref>& Commands) {
|
||||
Commands[index]->ScissorRect == ScissorRect) {
|
||||
auto c = Commands[index].get();
|
||||
for (size_t i = 0; i < c->IndexBuffer.Size(); i++) {
|
||||
NumIdx++;
|
||||
IndexBuffer[CurrentIndex++] = CurrentVertex + c->IndexBuffer.At(i);
|
||||
}
|
||||
for (size_t i = 0; i < c->VertexBuffer.Size(); i++) {
|
||||
NumVtx++;
|
||||
VertexBuffer[CurrentVertex++] = c->VertexBuffer.At(i);
|
||||
}
|
||||
index++;
|
||||
@ -258,5 +253,4 @@ PD::Li::Texture::Ref GfxGL2::LoadTex(const std::vector<PD::u8>& pixels, int w,
|
||||
auto res = PD::Li::Texture::New(texID, PD::ivec2(w, h));
|
||||
return res;
|
||||
}
|
||||
} // namespace Li
|
||||
} // namespace PD
|
Reference in New Issue
Block a user