A playground for pixel-by-pixel software rendering and simple sound synthesis.
Load the framework but draw nothing.
// (main.cpp)
#include "Example.h"
int main(int argc, char * argv[]) {
return Example().run(argc, argv);
}
- Press the UP and DOWN arrow keys to adjust the 'pixel' size.
- Press the F10-F12 keys to change the rendering mode (F10=Pixel Buffer , F11=OpenGL Points, F12=Texture).
Draw every pixel with a random color changing each frame.
// (main.cpp)
#include "ExampleNoise.h"
int main(int argc, char * argv[]) {
return ExampleNoise().run(argc, argv);
}
- Press SPACE to change the algorithm for creating pseudo-random numbers.
- Press the UP and DOWN arrow keys to adjust the 'pixel' size.
- Press the F10-F12 keys to change the rendering mode (F10=Pixel Buffer , F11=OpenGL Points, F12=Texture).
Draw random rectangles and clip them accordingly.
// (main.cpp)
#include "ExampleRects.h"
int main(int argc, char * argv[]) {
return ExampleRects().run(argc, argv);
}
- Press ENTER to add a single random rectangle and perform clipping against the existing rectangles.
- Press ESC to clear all rectangles.
- Press SPACE to switch rendering the borders of the rectangles.
- Press TAB to test for and debug overlapping pixels.
- Press the UP and DOWN arrow keys to adjust the 'pixel' size.
- Press the F10-F12 keys to change the rendering mode (F10=Pixel Buffer , F11=OpenGL Points, F12=Texture).
Play and draw semi-random sound waves.
// (main.cpp)
#include "ExampleSound.h"
int main(int argc, char * argv[]) {
return ExampleSound().run(argc, argv);
}
- Press ENTER to add a semi-random sine sound wave.
- Press SPACE to add a semi-random square sound wave.
- Press TAB to add a semi-random triangle sound wave.
- Press BACKSPACE to add a semi-random sawtooth sound wave.
- Press N to add some semi-random noise.
- Press ESC to clear all sound waves.
- Press the RIGHT and LEFT arrow keys to adjust the resolution of the rendered sound wave.
- Press the UP and DOWN arrow keys to adjust the 'pixel' size.
- Press the F10-F12 keys to change the rendering mode (F10=Pixel Buffer , F11=OpenGL Points, F12=Texture).
On Linux, the following libraries or their substitutes need to be installed and linked against:
- OpenGL (
libGL
) - GLFW (
libglfw3
) - X11 (
libX11
) - POSIX Threads (
libpthread
) libdl
For using Sound.h
and Sound.cpp
you additionally need:
- libsoundio (
libsoundio
)
Tested with g++ (Ubuntu 9.2.1-9ubuntu2) 9.2.1
.