content browser and textures on entity sprites

This commit is contained in:
Erris
2026-02-27 10:45:44 +01:00
parent cee0f42164
commit 9de9609dee
23 changed files with 809 additions and 213 deletions

View File

@@ -10,10 +10,25 @@
int main(int argc, char **argv);
namespace OpenEngine {
struct ApplicationCommandLineArgs
{
int count = 0;
char** args = nullptr;
const char* operator[](int index)
{
OE_CORE_ASSERT(index < count, "Index is higher than argument count.");
return args[index];
};
};
class Application
{
public:
Application(const std::string& name = "OpenEngine Project");
Application(const std::string& name,
ApplicationCommandLineArgs& args);
~Application();
virtual void OnEvent(Event& event);
@@ -25,6 +40,7 @@ namespace OpenEngine {
ImGuiLayer* GetImGuiLayer() { return imgui_layer.get(); };
inline static Application& Get() { return *instance; };
ApplicationCommandLineArgs GetCommandLineArgs() const { return arguments; };
inline Window& GetWindow() { return *window; };
@@ -36,6 +52,7 @@ namespace OpenEngine {
bool OnWindowResize(WindowResizeEvent& event);
private:
ApplicationCommandLineArgs arguments;
const std::string name;
std::unique_ptr<Window> window;
@@ -49,7 +66,7 @@ namespace OpenEngine {
};
// Is defined by client
Application* CreateApplication();
Application* CreateApplication(ApplicationCommandLineArgs args);
}
#endif // APPLICATION_HPP