Skip to content

itsYakub/Soft

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Soft

Simple 2D Real-Time Graphics Library

Introduction

This project was created purely for learning purposes. It allows me to get the deeper knowledge of how to graphics programming work under the hood. The big source of information was raylib, a simple and easy-to-use library to enjoy videogames programming. All of the external sources I've used are mentioned as the coude blocks in the soft.c implementation file. My main inspirations were:

Example

#include "soft.h"

int main(int argc, char** argv) {
    softInit(1024, 768, softTextFormat("Soft %s", SOFT_VERSION));

    while(!softWindowShoulClose()) {
        softClearBufferColor(WHITE);
        softDrawCircle((Circle) { softGetWindowCenter(), 100 }, RED);

        softBlit();
    }

    softClose();

    return 0;
}

Setup

0. Prerequesites:

1. Dependencies:

(NOTE: All of the external dependencies should be fetched by CMake using FetchContent)

2. Setup:

  • Clone this repository:

    $ git clone https://github.com/itsYakub/Soft.git --branch=master --depth=1 
    $ cd Soft/
  • Create a binary directory:

    $ mkdir bin
    $ cd bin/
  • Compile the project using CMake:

    $ cmake ..
    $ cmake --build .
  • Run the executable:

    $ ./example/demo.out

Credits

Licence

This project is under the MIT Licence.