https://github.com/costava/sdl2-draw-demo
Drawing application made with SDL2
https://github.com/costava/sdl2-draw-demo
batch batch-script c draw drawing sdl2 windows
Last synced: 2 months ago
JSON representation
Drawing application made with SDL2
- Host: GitHub
- URL: https://github.com/costava/sdl2-draw-demo
- Owner: Costava
- License: gpl-3.0
- Created: 2018-02-08T03:28:22.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2020-09-04T02:52:07.000Z (almost 6 years ago)
- Last Synced: 2025-02-02T02:11:18.283Z (over 1 year ago)
- Topics: batch, batch-script, c, draw, drawing, sdl2, windows
- Language: C
- Homepage:
- Size: 1.46 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# sdl2-draw-demo
A simple drawing application made with SDL2.
Use the mouse to draw.
The color drifts randomly.
The drawing drifts in random directions in a pattern
when you hold the mouse button without moving the mouse.
The window defaults to 512x512 pixels and is resizable.
Resizing the window clears the drawing.
Feel free to ask a question by opening an issue.



## License
GNU GPL v3.
See file `LICENSE`.
## How to build and run
### Linux
Tested with SDL v2.0.12
1. Clone repo
2. `make run`
### Windows
Tested with SDL v2.0.9
- Download and install [Build Tools for Visual Studio 2017](https://www.visualstudio.com/downloads) to get the `CL` C/C++ compiler and `x64 Native Tools Command Prompt`. Use `x86 Native Tools Command Prompt` for 32-bit Windows. More information on these command prompts [here](https://docs.microsoft.com/en-us/cpp/build/building-on-the-command-line).
- Download the Visual C++ [SDL2 development libraries](https://www.libsdl.org/download-2.0.php).
- Create a symbolic link named `SDL2-2.0.9` targeting the location of the downloaded `SDL2-2.0.9` folder. Likely use `mklink /D SDL2-2.0.9 C:\path\to\SDL2-2.0.9`. The `/D` argument is for directory symbolic link as opposed to the default file symbolic link.
- Switch `x64` to `x86` for `libpathsdl` in `build.bat` for 32-bit.
- Run `build.bat` in the command prompt from above to build. Run `build.bat dev` to get a console when the program runs.
## Contributing
Not currently accepting contributions.
Feel free to create an issue.