WIP Backend System Redesign Step 1
- Created 1 Context for Backend Management and Sharing - Made every class that used a static Backend require the Context or specific Backend - Bring Back 3ds support
This commit is contained in:
@@ -47,7 +47,7 @@ namespace PD {
|
||||
namespace Li {
|
||||
class PD_API DrawList {
|
||||
public:
|
||||
DrawList(int initial_size = 64);
|
||||
DrawList(Context& ctx, int initial_size = 64);
|
||||
~DrawList();
|
||||
|
||||
/** Require Copy and Move Constructors */
|
||||
@@ -218,6 +218,7 @@ class PD_API DrawList {
|
||||
std::vector<fvec2> pPath;
|
||||
u32 pNumIndices = 0;
|
||||
u32 pNumVertices = 0;
|
||||
Context* pCtx = nullptr;
|
||||
};
|
||||
} // namespace Li
|
||||
} // namespace PD
|
||||
|
||||
@@ -42,6 +42,7 @@ enum LiTextFlags_ {
|
||||
};
|
||||
|
||||
namespace PD {
|
||||
class Context;
|
||||
namespace Li {
|
||||
class PD_API Font {
|
||||
public:
|
||||
@@ -56,7 +57,7 @@ class PD_API Font {
|
||||
};
|
||||
|
||||
/** Constructore doesnt need Backand anymore */
|
||||
Font() = default;
|
||||
Font(Context& ctx) : pCtx(ctx) {}
|
||||
~Font() = default;
|
||||
|
||||
PD_SHARED(Font);
|
||||
@@ -128,6 +129,7 @@ class PD_API Font {
|
||||
u64 TimeStamp;
|
||||
};
|
||||
std::unordered_map<u32, TMELEM> pTMS;
|
||||
Context& pCtx;
|
||||
};
|
||||
} // namespace Li
|
||||
} // namespace PD
|
||||
Reference in New Issue
Block a user