Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Window Multi Context

Header-only C++ project exploring OOP, inheritance, polymorphism, filesystem utilities, and OpenGL rendering with GLX/X11.

Build

make                      # release (default)
make debug                # debug build
make release              # release build
make run                  # run current mode build
make run-debug            # build + run debug
make run-release          # build + run release
make clean                # remove build artifacts

Build modes:

Mode Flags Keunggulan
Debug -g -O0 -DDEBUG -Wextra -Wpedantic Full symbols buat gdb/lldb, tanpa optimisasi (mudah di-step), kode debug aktif, warning lebih ketat
Release -O3 -DNDEBUG -flto Optimisasi maksimal + link-time optimization (FPS lebih tinggi), buang kode debug, binari jauh lebih kecil

Objek file tiap mode dipisah (build/debug/, build/release/), jadi ganti mode tanpa rebuild ulang. Header dependency otomatis (.d files), edit .hpp → auto rebuild file terkait.

./main.out [count]         # N windows, 800x600 each
./main.out [w] [h]         # 1 window with custom size
./main.out [count] [w1 h1 w2 h2 ...]  # N windows, each with own size

Requires: clang++, X11, OpenGL (-lX11 -lGL).

Structure

File Description
GameObject.hpp Base class GameObject + Enemy (polymorphic ds_info())
Player.hpp GameCharacter : GameObjectPlayerCharacter
Weapon.hpp WeaponSword, MagicStaff, Wizard (multiple + diamond inheritance)
Shape.hpp ShapeRectangle, Circle, Triangle
Window.hpp WindowBuffer — X11 window + software framebuffer
GLContext.hpp GLX context + shader compilation + VAO/VBO rendering
WindowMultiContext.hpp Multi-window manager with event dispatching per XID
FileBuffer.hpp File reader (binary, into vector<char>)
Filesystem.hpp File scanner by extension pattern, loads into FileBuffer
Fonts.hpp Font loader (Win32/Linux X11)
shaders/vert.vs.glsl GLSL 330 vertex shader
shaders/frag.fs.glsl GLSL 330 fragment shader

Inheritance Trees

GameObject ← GameCharacter ← PlayerCharacter
          ← Enemy

Weapon ← Sword ─┐
       ← MagicStaff ─┼─ Wizard

Shape ← Rectangle
      ← Circle
      ← Triangle

Usage

./main.out                # 1 window, 800x600
./main.out 3              # 3 windows, 800x600 each
./main.out 1920 1080      # 1 window, 1920x1080
./main.out 2 640 480 320 240  # 2 windows

About

Multi-window rendering and terminal emulation in C++ (X11 & OpenGL).

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages