Skip to content

MrCappyy/cappygfx-engine

Repository files navigation

CappyGFX

yo so i made this 3d graphics engine in a few days because i wanted to mess around with opengl and shaders and stuff. it's actually pretty decent ngl

what is this

basically a sandbox for testing 3d graphics stuff. not a game engine, just a place to spawn cubes and spheres and make them spin around with fancy lighting. think of it like a graphics playground

features that actually work

  • mouse controls - left click drag to orbit, right click to pan, scroll to zoom. way better than keyboard controls
  • spawn stuff - press 1-9 to spawn primitives (only 1 and 2 work rn lol)
  • object manipulation - select stuff in the list and move it around with arrow keys or the sliders
  • lighting - directional light + 3 colored point lights that you can move around
  • materials - change colors, make stuff shiny, basic pbr properties
  • graphics settings - wireframe mode, post processing effects (some work, some don't)
  • camera modes - orbit mode (default) and fly mode (press C)

controls

Mouse:
- Left drag = orbit camera
- Right drag = pan camera  
- Scroll = zoom

Keyboard:
- 1/2 = spawn cube/sphere
- Arrow keys = move selected object
- Q/E = rotate selected object
- +/- = scale selected object
- C = toggle camera mode
- F1 = toggle UI
- F2 = wireframe
- F3 = grid
- F11 = fullscreen (might be janky)
- ESC = quit

building

you need:

  • visual studio 2022
  • cmake
  • vcpkg (for dependencies)

then just:

setup-ninja.bat
launch-vs.bat

or if you already built it:

quick-run.bat

code structure

tried to keep it modular:

  • Camera - handles all camera movement
  • Shader - loads and manages shaders
  • Model - loads 3d models (or procedural meshes)
  • Scene - manages all objects in the world
  • Renderer - global rendering state
  • Transform - position/rotation/scale for objects

what works vs what doesn't

works:

  • basic 3d rendering with phong shading
  • multiple lights
  • object spawning and manipulation
  • smooth mouse controls
  • imgui interface

kinda works:

  • post processing (needs proper framebuffer implementation)
  • shadows (shader is there but not hooked up)
  • material system (basic version works)

doesn't work yet:

  • model loading (assimp is there but haven't tested)
  • skybox
  • particle systems
  • instanced rendering
  • half the primitives

known issues

  • memory leaks probably (haven't checked)
  • no error handling really
  • some ui options don't do anything
  • performance could be way better
  • code is kinda messy in places

future stuff

if i keep working on this:

  • proper shadow mapping
  • pbr shading
  • better post processing pipeline
  • scene serialization
  • more primitives
  • texture loading
  • normal mapping
  • maybe compute shaders

random notes

  • the cube.obj in assets is literally just a cube for testing
  • shaders hot reload would be cool but haven't done it
  • imgui docking would be nice but needs custom imgui build
  • should probably use smart pointers more

anyway yeah that's cappygfx. it's not gonna compete with unreal or anything but it's a decent little graphics sandbox for testing stuff

feel free to use it for whatever, code is pretty straightforward if you know opengl

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published