Giter VIP home page Giter VIP logo

trikonasana's Introduction

Trikonasana - 3D renderer from scratch

A software CPU based 3D renderer made in pure C and SDL.

Install

Install SDL2 library. For ode completion, compile errors, go-to-definition, etc. install clangd.

Configure & build

Create build directory in the root directory.

Linux & MinGW

To configure and generate, run

cd build/ && cmake -G"Unix Makefiles" ..

to compile and run the program on Linux

cd build/ && make && cd ../bin && ./main

to compile and run the program with MingW

cd build/ && make && cd ../bin && main.exe

MSVC

To configure and generate, run

cd build/ && cmake ..

to compile and run the program

cd build && MSBuild.exe -target:Build /property:Configuration=Release /m /noWarn:C4244;C4305 main.vcxproj && cd ../bin && main.exe

Warning C4244 is about possible loss of data due to conversion, e.g. from 'float' to 'int'. Warning C4305 is about possible loss of data due to truncation, e.g. from 'double' to 'float'.

Clangd

If you are on Linux, compile_commands.json will be created in build directory. Symlink it (or copy it) to the root directory. To symlink it, cd to the root and

ln -s build/compile_commands.json .

On windows, you can generate or compile_commands.json using MinGW with

cd build/ && cmake -G"Unix Makefiles" .. && mv compile_commands.json ../

or using MSVC Ninja with

cd ninja && cmake -G"Ninja" .. && mv compile_commands.json ..

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.