huailiang / lgRenderEngine

soft render engine based on SDL2

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

A cross-platform software render engine based on SDL2

Requirement

  • SDL2
  • libpng

Environment

  • xcode on osx
  • vs2017 on windows

Build

  1. you should be ensure cmake installed at your mac, and generate xcode project using command as:
git clone git@github.com:huailiang/lgRenderEngine.git
cd lgRenderEngine
cd build
sh build_osx.sh
  1. compile visual studio project on windows:

    cd build directory, and click build_vs2017.bat

Tips

  1. libpng depends on zlib, so should be set -lz in "Other linker flags" at xcode project

  2. in function transform_homogenize, y is reduced by 1 because SDL_RenderDrawPoint draw point start with left-top pivot.

Reinferences

tutor:

  1. guide outline

  2. Frustum Culling

  3. Bresenham draw-line

  4. triger center calcute

  5. transform matrix

resources: asset format

sdl: http://www.libsdl.org

libpng: http://www.libpng.org/pub/png/libpng.html

cmake: https://cmake.org/

About

soft render engine based on SDL2

License:MIT License


Languages

Language:C 91.1%Language:CMake 4.9%Language:C++ 2.9%Language:Objective-C 1.0%Language:Shell 0.1%Language:Batchfile 0.0%