Skip to content

A playground for pixel-by-pixel software rendering and simple sound synthesis.

License

Notifications You must be signed in to change notification settings

crawlserv/pixels

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pixels

A playground for pixel-by-pixel software rendering and simple sound synthesis.

Example

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).

Example

ExampleNoise

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).

ExampleNoise

ExampleRects

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).

ExampleRects

ExampleSound

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).

ExampleSound

Requirements

On Linux, the following libraries or their substitutes need to be installed and linked against:

For using Sound.h and Sound.cpp you additionally need:

Tested with g++ (Ubuntu 9.2.1-9ubuntu2) 9.2.1.

About

A playground for pixel-by-pixel software rendering and simple sound synthesis.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages