1
0
mirror of https://github.com/wolfpld/tracy.git synced 2025-03-20 07:40:02 +08:00

Move all GLFW code to a separate class.

This commit is contained in:
Bartosz Taudul
2022-07-27 00:57:42 +02:00
parent 138f80001e
commit b86f1a907a
9 changed files with 310 additions and 197 deletions
+34
View File
@@ -0,0 +1,34 @@
#ifndef __BACKEND_HPP__
#define __BACKEND_HPP__
#include <functional>
#include <stdint.h>
#include "WindowPosition.hpp"
class RunQueue;
class Backend
{
public:
Backend( const char* title, std::function<void()> redraw, RunQueue* mainThreadTasks );
~Backend();
void Show();
void Run();
void NewFrame( int& w, int& h );
void EndFrame();
void SetIcon( uint8_t* data, int w, int h );
void SetTitle( const char* title );
float GetDpiScale();
void* GetNativeWindow();
private:
WindowPosition m_winPos;
int m_w, m_h;
};
#endif