Git Product home page Git Product logo

abstract-gpu's Introduction

AbstractGPU

The Abstract GPU is a cross platform low-level 3D graphics API.

Building instruction for Linux and Max OS/X

For building the abstraction layer for Linux and Max OS/X, CMake is required. In Linux the Vulkan headers and libraries has to be installed. The following commands can be used for building:

mkdir build
cd build
cmake ..
make

The built files will be available at the dist folder. The samples will not be built by default. For building the samples, SDL2 has to be installed and the AGPU_BUILD_SAMPLES option has to be set. Or for simplicity, you have to use the following commands for building:

mkdir build
cd build
cmake -DAGPU_BUILD_SAMPLES=True ..
make

Installing bindings

Pharo

The Pharo bindings can be installed by running the following script in a playground:

Metacello new
   baseline: 'AbstractGPU';
   repository: 'github://desromech/abstract-gpu/tonel';
   load

This installation script takes care of automatically downloading a version of the platform specific library binary that is automatically being built on the CI server.

After loading the baseline, the following examples can be run in a Playground:

AGPUSampleImmediateRenderer1 new openInWindow.
AGPUSampleImmediateRenderer2 new openInWindow.
AGPUSampleImmediateRenderer3 new openInWindow.
AGPUSampleImmediateRenderer4 new openInWindow.

Squeak

Since Squeak does not support repositories in the Tonel format, the installation requires a manual Tonel to Monticello conversion step that uses Pharo. For converting the Tonel sources, the following script must be executed:

./tonelToMonticello.sh

This script will download a Pharo image, and run the conversion script at scripts/tonelToMonticello.st which will convert the packages under tonel into Monticello packages under the mc folder. These converted packages can be loaded in Squeak by running the following script:

(Installer repository: 'http://source.squeak.org/FFI')
    install: 'FFI-Pools';
    install: 'FFI-Kernel'.
(Smalltalk at: #ExternalType) initialize.

"Replace with the path to the converted MC files, or make a symlink to this folder ;)"
Installer monticello directory: 'mc';
    install: 'AbstractGPU-CoreSqueak';
    install: 'AbstractGPU-GeneratedSqueak';
    install: 'AbstractGPU-Utility';
    install: 'AbstractGPU-Window';
    install: 'AbstractGPU-Samples'.

(Smalltalk at: #AGPUGeneratedDoIt) initializeBindings.

After loading the packages, the following examples can be run in a Workspace, after copying the Agpu libraries in a folder that is searched by the VM:

AGPUSampleImmediateRenderer1 new openInWindow.
AGPUSampleImmediateRenderer2 new openInWindow.
AGPUSampleImmediateRenderer3 new openInWindow.
AGPUSampleImmediateRenderer4 new openInWindow.

abstract-gpu's People

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.