Git Product home page Git Product logo

sokol-nim's Introduction

build

Auto-generated Nim bindings for the sokol headers.

NOTE: if you are getting compilation errors about 'addr' please switch to the Nim development version (e.g. choosenim devel)

Build and run samples

First install sokol as local module:

nimble install

Remember to do this each time you update the bindings.

Then to build and run the samples with the platform's default 3D backend (D3D11 on Windows, Metal on macOS, GL on Linux):

nimble clear
nimble triangle
nimble quad
nimble bufferoffsets
nimble cube
nimble noninterleaved
nimble texcube
nimble shapes
nimble offscreen
nimble instancing
nimble mrt
nimble blend
nimble debugtext
nimble debugtextprintf
nimble debugtextuserfont
nimble sgl
nimble sglcontext
nimble sglpoints
nimble saudio

NOTE: on Windows, the MSVC C compiler will be used by all Nimble tasks. To build with Clang or GCC on Windows, invoke the nim compiler directly with --cc:

nim r --cc:clang examples/clear
nim r --cc:gcc examples/clear

To force the GL backend (on Windows or Mac) use -d:gl before the target:

nimble -d:gl clear

To build all samples into the build/ subdirectory:

# with debug info
nimble build_debug
# in release mode:
nimble build_all
# ...or with forced GL backend:
nimble -d:gl build_debug
nimble -d:gl build_all

sokol-nim's People

Contributors

floooh avatar garettbass avatar gustavolsson avatar rsduck avatar angluca avatar geotre avatar smalllixin 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.