Giter Site home page Giter Site logo

opengl-demo's Introduction

PHP OpenGL (SDL) Demo

Please note that this is only a demo and may contain non-optimal, crazy and completely unbelievable programming techniques.

If your psyche was injured please consult a doctor.

Peace <3


Oh yes, according to my information, nobody has ever done such things in pure PHP.

Demo in action: https://www.youtube.com/watch?v=vsBbJbhKeeU

Requiremens

  • PHP 7.4+ NTS
  • ext-ffi
  • Composer
  • SDL2 (only MacOS and Linux)
  • SDL2 Image (only MacOS and Linux)

Please note that when using the Thread Safe version of the PHP there will be throw an error like "Failed loading libpng16-16.dll" See: https://bugs.php.net/bug.php?id=79439&thanks=4

Installation

Windows

  • composer install
  • php app.php

Linux

  • sudo apt install libsdl2-2.0-0 -y
  • sudo apt install libsdl2-image-2.0-0 -y
  • composer install
  • php app.php

Linux / Docker

  • docker run -it -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=$DISPLAY -e XAUTHORITY=$XAUTHORITY $(docker build -q .)

MacOS

  • brew install sdl2
  • brew install sdl2_image
  • composer install
  • php app.php

opengl-demo's People

Contributors

bobimicroweber avatar purhur avatar serafimarts avatar

Watchers

 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.