@@ -122,8 +122,6 @@ namespace UI_System
122
122
0x00010038
123
123
};
124
124
125
- // static VkDeviceSize g_BufferMemoryAlignment = 256;
126
-
127
125
struct State
128
126
{
129
127
smart_refctd_ptr<ILogicalDevice> device{};
@@ -138,15 +136,13 @@ namespace UI_System
138
136
std::vector<smart_refctd_ptr<IGPUBuffer>> vertexBuffers{};
139
137
std::vector<smart_refctd_ptr<IGPUBuffer>> indexBuffers{};
140
138
bool hasFocus = false ;
141
- // Signal<> UIRecordSignal{};
139
+
140
+ // TODO: Use a signal class instead.//Signal<> UIRecordSignal{};
142
141
struct Subscriber {
143
142
int id = -1 ;
144
143
std::function<void ()> listener = nullptr ;
145
144
};
146
145
std::vector<Subscriber> subscribers{};
147
-
148
- // TODO: Mouse and keyboard events
149
- // TODO: Resize events
150
146
};
151
147
152
148
static State* state = nullptr ;
@@ -159,30 +155,6 @@ namespace UI_System
159
155
160
156
// -------------------------------------------------------------------------------------------------
161
157
162
- // static void onResize(float screenWidth, float screenHeight)
163
- // {
164
- // ImGuiIO& io = ImGui::GetIO();
165
- // assert(io.Fonts->IsBuilt() && "Font atlas not built! It is generally built by the renderer backend. Missing call to renderer _NewFrame() function? e.g. ImGui_ImplOpenGL3_NewFrame().");
166
-
167
- // Setup display size (every frame to accommodate for window resizing)
168
- // int32_t window_width, window_height;
169
- // int32_t drawable_width, drawable_height;
170
- //
171
- // RF::GetDrawableSize(window_width, window_height);
172
-
173
- // if (RF::GetWindowFlags() & MSDL::SDL_WINDOW_MINIMIZED)
174
- // {
175
- // window_width = window_height = 0;
176
- // }
177
-
178
- // RF::GetDrawableSize(drawable_width, drawable_height);
179
-
180
- // io.DisplaySize = ImVec2(screenWidth, screenHeight);
181
- // io.DisplayFramebufferScale = ImVec2(1.0f, 1.0f);
182
- // }
183
-
184
- // -------------------------------------------------------------------------------------------------
185
-
186
158
static smart_refctd_ptr<IGPUDescriptorSetLayout> createDescriptorSetLayout ()
187
159
{
188
160
static constexpr int Count = 1 ;
@@ -418,6 +390,7 @@ namespace UI_System
418
390
void prepareKeyMapForDesktop ()
419
391
{
420
392
ImGuiIO& io = ImGui::GetIO ();
393
+ // TODO:
421
394
// Keyboard mapping. ImGui will use those indices to peek into the io.KeysDown[] array.
422
395
// io.KeyMap[ImGuiKey_Tab] = MSDL::SDL_SCANCODE_TAB;
423
396
// io.KeyMap[ImGuiKey_LeftArrow] = MSDL::SDL_SCANCODE_LEFT;
@@ -552,19 +525,12 @@ namespace UI_System
552
525
553
526
updateDescriptorSets ();
554
527
555
- // TODO: Register to resize event
556
-
557
- // onResize(window->getWidth(), window->getHeight());
558
528
auto & io = ImGui::GetIO ();
559
529
io.DisplaySize = ImVec2 (window->getWidth (), window->getHeight ());
560
530
io.DisplayFramebufferScale = ImVec2 (1 .0f , 1 .0f );
561
531
562
532
state->vertexBuffers .resize (maxFramesInFlight);
563
- state->indexBuffers .resize (maxFramesInFlight);
564
-
565
- // smart_refctd_ptr<IWindow::IEventCallback> eventCallback {};
566
- // window->setEventCallback(std::move(eventCallback));
567
- }
533
+ state->indexBuffers .resize (maxFramesInFlight);}
568
534
569
535
// -------------------------------------------------------------------------------------------------
570
536
0 commit comments