Skip to content

Byte-White/Magma

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Magma

magmalogo

Magma is a simple application framework built with Dear ImGui, providing an easy-to-use platform for developing both desktop and web applications. It offers support for both Vulkan and OpenGL rendering backends.

Features

  • Simple and intuitive interface powered by Dear ImGui
  • Cross-platform support for desktop and web applications
  • Rendering backends for Vulkan and OpenGL
  • Easy to use

Requirements

Getting Started

To get started with Magma, follow these steps:

  1. Clone the repository recursively
  2. Create a CMakeLists.txt file
cmake_minimum_required(VERSION 3.3)
project(MagmaExample)


set(MAGMA_VULKAN ON)
set(MAGMA_OPENGL OFF)
set(MAGMA_EMSCRIPTEN OFF)

#add_compile_definitions(MAGMA_NO_LOGGING) #uncomment to stop all logging
#add_compile_definitions(MAGMA_NO_CORE_LOGGING) #uncomment to stop core logging
#add_compile_definitions(MAGMA_NO_CLIENT_LOGGING) #uncomment to stop client logging

add_subdirectory(Magma)

add_executable(MagmaExample 
Sandbox/src/main.cpp
)


target_link_libraries(MagmaExample
PRIVATE
magma
)
  1. Create a main file (in this case Sandbox/src/main.cpp)
#define MAGMA_ENTRYPOINT
#include "Magma/Magma.h"

class MyApplication:public mg::Application
{
public:
	MyApplication()
	{
	}

	void Init()
	{
 		SetSize(600,600);
		SetTitle("Magma Example Application");
	}

	void Destroy() override
	{
	}
	
	~MyApplication()
	{

	}
	void Render() override
	{
		ImGui::ShowDemoWindow();

		ImGui::Begin("Second Window");
			if(ImGui::Button("Click me"))
				SetTitle("You Clicked Me");
			if (ImGui::Button("Resize"))
				SetSize(450,450);
		ImGui::End();
	}
private:
};

mg::Application* CreateApplication(int argc, char** argv)
{
	return new MyApplication();
}

image

NOTE: #define MAGMA_ENTRYPOINT should be before including magma and should be defined where mg::Application* CreateApplication(int argc, char** argv) is implemented.

After initial setup, it may be necessary to rebuild your project to ensure all configurations are properly applied.

You can also use the app template and the app with layers template

Created With This Framework

FireBridge - A Serial Monitor

image

FireBridge repository

Lightning Engine - A CPU Ray Tracing Engine

image

Lightning-Engine repository

Embed - a server code generator for Arduino

draganddrop

export

Embed repository

Contributing

We welcome contributions from the community. If you encounter any issues or have suggestions for improvement, please open an issue or submit a pull request on the GitHub repository.

License

About

Magma is a simple C++ Framework used to create both desktop and web applications.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published