Skip to content

Commit

Permalink
Initial Release
Browse files Browse the repository at this point in the history
Most things are working, except title bar + multi window
  • Loading branch information
Kyle Pelham committed Aug 15, 2024
1 parent 83e9dde commit 155e773
Show file tree
Hide file tree
Showing 20 changed files with 37,091 additions and 24 deletions.
22 changes: 19 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ include(cmake/prelude.cmake)
project(
prism
VERSION 0.1.0
DESCRIPTION "A library to help in the development of projects that depend on process interaction via DMA."
DESCRIPTION "A Vulkan rendered C++ application framework using GLFW and ImGui."
LANGUAGES CXX
)

Expand All @@ -14,9 +14,11 @@ include(cmake/variables.cmake)

# ---- Declare library ----

add_library(
prism_prism
add_library(prism_prism
# Prism
src/prism.cpp
src/window.cpp
src/renderer.cpp
)
add_library(prism::prism ALIAS prism_prism)

Expand Down Expand Up @@ -56,9 +58,23 @@ target_include_directories(

target_compile_features(prism_prism PUBLIC cxx_std_20)

# Link dependencies
find_package(fmt REQUIRED)
target_link_libraries(prism_prism PRIVATE fmt::fmt)

find_package(glfw3 REQUIRED)
target_link_libraries(prism_prism PRIVATE glfw)

find_package(Freetype REQUIRED)
target_link_libraries(prism_prism PRIVATE Freetype::Freetype)

find_package(imgui CONFIG REQUIRED)
target_link_libraries(prism_prism PRIVATE imgui::imgui)

find_package(Vulkan REQUIRED)
target_include_directories(prism_prism PRIVATE ${Vulkan_INCLUDE_DIRS})
target_link_libraries(prism_prism PRIVATE ${Vulkan_LIBRARIES})

# Prevent windows.h from including winsock.h (for kmbox code)
add_definitions(-D_WINSOCKAPI_)

Expand Down
8 changes: 0 additions & 8 deletions cmake/install-rules.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,6 @@ install(
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}"
)


# Install the external .lib files
install(
FILES "${PROJECT_SOURCE_DIR}/lib/vmm.lib" "${PROJECT_SOURCE_DIR}/lib/leechcore.lib"
DESTINATION "${CMAKE_INSTALL_LIBDIR}"
COMPONENT prism_Development
)

write_basic_package_version_file(
"${package}ConfigVersion.cmake"
COMPATIBILITY SameMajorVersion
Expand Down
29 changes: 29 additions & 0 deletions include/prism/colors.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#pragma once
#include "imgui.h"

namespace Prism::Colors
{
constexpr auto accent = IM_COL32(0, 120, 215, 255); // Bright Blue
constexpr auto highlight = IM_COL32(255, 193, 7, 255); // Amber
constexpr auto niceBlue = IM_COL32(52, 152, 219, 255); // Light Sky Blue
constexpr auto compliment = IM_COL32(231, 76, 60, 255); // Soft Red
constexpr auto background = IM_COL32(248, 249, 250, 255); // Light Gray (almost white)
constexpr auto backgroundDark = IM_COL32(36, 37, 38, 255); // Very Dark Gray
constexpr auto titlebar = IM_COL32(44, 62, 80, 255); // Dark Blue-Gray
constexpr auto titlebarBrighter = IM_COL32(52, 73, 94, 255); // Steel Blue
constexpr auto titlebarDarker = IM_COL32(33, 37, 41, 255); // Dark Charcoal
constexpr auto propertyField = IM_COL32(52, 73, 94, 255); // Steel Blue
constexpr auto text = IM_COL32(33, 37, 41, 255); // Dark Charcoal
constexpr auto textBrighter = IM_COL32(255, 255, 255, 255); // White
constexpr auto textDarker = IM_COL32(87, 96, 111, 255); // Dim Gray
constexpr auto textError = IM_COL32(231, 76, 60, 255); // Soft Red (same as compliment for consistency)
constexpr auto button = IM_COL32(52, 52, 52, 200); // Dark Gray
constexpr auto buttonBrighter = IM_COL32(52, 52, 52, 150); // Dark Gray (less opaque)
constexpr auto buttonDarker = IM_COL32(60, 60, 60, 255); // Dark Gray (more opaque)
constexpr auto muted = IM_COL32(189, 195, 199, 255); // Light Gray
constexpr auto groupHeader = IM_COL32(52, 152, 219, 255); // Light Sky Blue (same as niceBlue)
constexpr auto selection = IM_COL32(88, 101, 242, 255); // Indigo
constexpr auto selectionMuted = IM_COL32(107, 115, 125, 255); // Muted Dark Gray
constexpr auto backgroundPopup = IM_COL32(255, 255, 255, 255); // White

}
2,946 changes: 2,946 additions & 0 deletions include/prism/embeds/font_awesome.embed

Large diffs are not rendered by default.

10,467 changes: 10,467 additions & 0 deletions include/prism/embeds/roboto_bold.embed

Large diffs are not rendered by default.

10,665 changes: 10,665 additions & 0 deletions include/prism/embeds/roboto_italic.embed

Large diffs are not rendered by default.

10,525 changes: 10,525 additions & 0 deletions include/prism/embeds/roboto_regular.embed

Large diffs are not rendered by default.

35 changes: 35 additions & 0 deletions include/prism/entry_point.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/**
* @file entry_point.h
* @author Kyle Pelham (bonezone2001@gmail.com)
* @brief Just a simple entry point for the Prism application framework.
*
* You can completely ignore this file and implement your own entry point if you wish.
*
* @version 0.1
* @date 2024-08-09
*
* @copyright Copyright (c) 2024
*
*/

#pragma once
#include <Windows.h>
#include "prism/prism.h"

namespace Prism
{
class Application* AppCreate(int argc, char** argv);
};

int APIENTRY WinMain(HINSTANCE hInst, HINSTANCE hInstPrev, PSTR cmdline, int cmdshow)
{
// Create the application
Prism::Application* app = Prism::AppCreate(__argc, __argv);

// Run the application
app->run();

// Clean up
delete app;
return 0;
}
Loading

0 comments on commit 155e773

Please sign in to comment.