- Open Powershell as Administrator and run:
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
- Open the Microsoft Store, search for Ubuntu, and install
- Launch Ubuntu and create your Linux user
- Open a shell into WSL (I like cmder so far: http://cmder.net/)
- In Windows, download and install MobaXterm (free version): https://mobaxterm.mobatek.net/download.html
- Make sure X server is running
- You’ll always need to run MobaXterm, and in the top right corner of the app there’s an "X server" button. Make sure it’s running.
- In mobaxterm settings -> x11 -> set OpenGL Acceleration to: Hardware
- WSL won't have a display environment variable set by default, so tell it manually to connect to the first display:
export DISPLAY=:0.0
- Test an x11 app:
sudo apt-get install x11-apps
- Download OF:
curl -OLk https://openframeworks.cc/versions/v0.10.0/of_v0.10.0_linux64gcc6_release.tar.gz
- Unpack and move wherever:
untar -xvf of_v0.10.0_linux64gcc6_release.tar.gz
mv of_v0.10.0_linux64gcc6_releas/ of/
- Install ubuntu deps:
cd of/scripts/linux/ubuntu
sudo ./install_dependencies.sh
sudo ./install_codecs.sh
- Make an example:
cd of/examples/graphics/graphicsExample
- glfw errors out at the moment, use glut
- edit src/main.cpp
// Refer to the README.md in the example's root folder for more information on usage
#include "ofMain.h"
#include "ofApp.h"
//========================================================================
int main( ){
ofAppGlutWindow window;
ofSetupOpenGL(&window, 1024, 768, OF_WINDOW);
// ofSetupOpenGL(1024,768, OF_WINDOW); // <-------- setup the GL context
// this kicks off the running of my app
// can be OF_WINDOW or OF_FULLSCREEN
// pass in width and height too:
ofRunApp( new ofApp());
}
Missing a "e" on mv of_v0.10.0_linux64gcc6_releas/ of/ --> mv of_v0.10.0_linux64gcc6_release/ of/