Skip to content

Repository files navigation

QuarkCoreA rendering library built for the Quark Engine

C++17OpenGLVulkanLicense


Quick Start

Requirements

  • C++17 or later
  • OpenGL 3.3+
  • CMake 3.16+

Installation

git clone https://github.com/Quark-Engine/QuarkCore.git
cd QuarkCore
cmake -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build

Then link against QuarkCore in your CMakeLists.txt:

target_link_libraries(your_targetPRIVATEQuarkCore)

Usage

#include"QuarkCore/QuarkCore.hpp"intmain() {
qc::InitWindow(1280, 720, "Hello World", qc::RendererType::OpenGL);
qc::SetTargetFPS(60);
while (!qc::WindowShouldClose()) {
qc::BeginDrawing();
qc::ClearBackground(qc::Color{20, 24, 32, 255});
qc::DrawText("Hello, World!", 360, 340, 32, qc::WHITE);
qc::EndDrawing();
}
qc::CloseWindow();
return0;
}

API Overview

CategoryFunctions
WindowInitWindow, CloseWindow, WindowShouldClose, SetTargetFPS, SetWindowMinimumSize
DrawingBeginDrawing, EndDrawing, ClearBackground
2DBeginMode2D, EndMode2D, DrawRectangle, DrawCircle, DrawGrid, DrawTexture, DrawTexturePro
3DBeginMode3D, EndMode3D, DrawPlane, DrawCube
TexturesLoadRenderTexture, UnloadRenderTexture, GenCheckerTexture, UnloadTexture
ShadersLoadShaderFromMemory, GetShaderLocation, SetShaderValue, BeginShaderMode, EndShaderMode, UnloadShader
TextDrawText, DrawTextEx, MeasureText, MeasureTextEx, GetDefaultFont, TextFormat
InputIsKeyPressed, IsKeyDown, PollEvent
LoggingTraceLog, SetLogLevel
ScreenGetScreenWidth, GetScreenHeight, GetFPS, GetDeltaTime, GetCurrentMonitorRefreshRate

Built-in Shader Constants

QuarkCore exposes its default vertex shader source so you can pair it with any custom fragment shader:

qc::LoadShaderFromMemory(qc::kVertexShaderSource, myFragmentShader);

Examples

The examples/ directory contains demos for:

  • sandbox.cpp — window setup, 2D/3D cameras, render textures, text rendering
  • shaders.cpp — chromatic aberration, pixelation, vignette, scanlines with live parameter tuning

Made for the Quark Engine

About

A rendering library built for the Quark Engine

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages