Git Product home page Git Product logo

instantcg's Introduction

InstantCG

A port of QuickCG by Lode Vandevenne to SDL2

InstantCG aims to be as backwards compatible as possible with QuickCG. Ideally you should only need to change the include line and convert using namespace QuickCG to using namespace InstantCG.

Using InstantCG

Copy instantcg.h and instantcg.cpp into your project directory, make sure you are linking with SDL2, and compile.

To do this from the command line on mac or linux would look something like this:

clang++ *.cpp -lSDL2

There are a few ways you could install SDL2. On linux it should be availble from your package manager, on mac or windows you can grab the .framework or .lib/.dll files from the github releases page, altenatively on mac you can use homebrew brew install sdl2.

The example folder in this repo also bundles the SDL2 libs which you could also use to get started, although they are probably not up to date.

Building The Examples

Both SDL2 and premake have been bundled with the repo so you can quickly build the exmaples.

Windows from Git Bash

cd examples
./premake vs2019
start build/vs2019/InstantCG.sln

In the solution explorer, right click the example you want to run and select 'Set as Startup Project', then press F5 to build and run.

Mac from Terminal.app

cd examples
./premake xcode4
open build/xcode4/InstantCG.xcworkspace

Select the project by clicking the current project name in the top bar in Xcode, run by pressing the play button in the top left.

TODO

Some of these things might work already, just need to find examples and add tests for them.

  • file loading
  • image loading
  • print text to screen
  • reading text from the user
  • playing audio

instantcg's People

Contributors

thomashope avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

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.