Coder Social home page Coder Social logo

gargaj / bonzomatic Goto Github PK

View Code? Open in Web Editor NEW
1.3K 48.0 114.0 16.7 MB

Live shader coding tool and Shader Showdown workhorse

Home Page: http://www.pouet.net/topic.php?which=9881

License: Other

C++ 68.34% C 21.79% CMake 6.80% Batchfile 0.47% Objective-C++ 2.60%
demoscene live-coding livecoding shader shadertoy graphics directx opengl c-plus-plus hlsl

bonzomatic's Introduction

Bonzomatic

Github workflow status Appveyor build status Travis build status

What's this?

This is a live-coding tool, where you can write a 2D fragment/pixel shader while it is running in the background.

Screenshot

The tool was originally conceived and implemented after the Revision 2014 demoscene party's live coding competition where two contestants improv-code an effect in 25 minutes head-to-head. Wanna see how it looks in action? Check https://www.youtube.com/watch?v=KG_2q4OEhKc

Where to get? / Binary builds

Fresh builds of Bonzomatic will always be available at https://github.com/Gargaj/Bonzomatic/releases

Keys

  • F2: toggle texture preview
  • F5 or Ctrl-R: recompile shader
  • Ctrl-[/]: adjust text background transparency
  • F11 or Ctrl/Cmd-f: hide shader overlay
  • Alt-F4 or Shift+Escape: exbobolate your planet

Requirements

On Windows, both DirectX 9 and 11 are supported.

For the OpenGL version (for any platform), at least OpenGL 4.1 is required.

On recent macOS, to allow sound input to be captured (for FFT textures to be generated), you need to: Open up System Preferences, click on Security & Privacy, click on the Privacy tab then click on the Microphone menu item. Make sure Bonzomatic.app is in the list and ticked.

Configuration

You can configure Bonzomatic by creating a config.json and placing it next to the binary executable you're planning to run in the working directory for the binary; Bonzomatic will helpfully print this directory out for you when you run it, and you can also pass a file (with absolute or relative path, whichever you want) as parameter to the executable to load any other file as config.json. This allows you to have multiple configurations for multiple situations.

The file can have the following contents: (all fields are optional)

{
  "skipSetupDialog": true, // If true, setup dialog will be suppressed - all values you provide below will be used without validation (at your own risk!)
  "window":{ // default window size / state; if there's a setup dialog, it will override it
    "width":1920,
    "height":1080,
    "fullscreen":true,
  },
  "audio":{ // default audio device settings; if there's a setup dialog, it will override it
    "useInput":false, // if true, use line-in/mic/...; if false, attempt to create a loopback device and use stereo out
  },
  "font":{ // all paths in the file are also relative to the binary, but again, can be absolute paths if that's more convenient
    "file":"Input-Regular_(InputMono-Medium).ttf",
    "size":16,
  },
  "rendering":{
    "fftSmoothFactor": 0.9, // 0.0 means there's no smoothing at all, 1.0 means the FFT is completely smoothed flat
    "fftAmplification": 1.0, // 1.0 means no change, larger values will result in brighter/stronger bands, smaller values in darker/weaker ones
  },
  "textures":{ // the keys below will become the shader variable names
    "texChecker":"textures/checker.png",
    "texNoise":"textures/noise.png",
    "texTex1":"textures/tex1.jpg",
  },
  "gui":{
    "outputHeight": 200,
    "opacity": 192, // 255 means the editor occludes the effect completely, 0 means the editor is fully transparent
    "texturePreviewWidth": 64,
    "spacesForTabs": false,
    "tabSize": 8,
    "visibleWhitespace": true,
    "autoIndent": "smart", // can be "none", "preserve" or "smart"
    "scrollXFactor": 1.0, // if horizontal scrolling is too slow you can speed it up here (or change direction)
    "scrollYFactor": 1.0, // if vertical scrolling is too slow you can speed it up here (or change direction)
  },
  "midi":{ // the keys below will become the shader variable names, the values are the CC numbers
    "fMidiKnob": 16, // e.g. this would be CC#16, i.e. by default the leftmost knob on a nanoKONTROL 2
  },
  // this section is if you want to enable NDI streaming; otherwise just ignore it
  "ndi":{
    "enabled": true,
    "connectionString": "<ndi_product something=\"123\"/>", // metadata sent to the receiver; completely optional
    "identifier": "hello!", // device identifier; must be unique, also helps source discovery/identification in the receiver if there are multiple sources on the network
    "frameRate": 60.0, // frames per second
    "progressive": true, // progressive or interleaved?
  },
  // this section is if you want to customise colors to your liking
  "theme":{
    "text": "FFFFFF", // color format is "RRGGBB" or "AARRGGBB" in hexadecimal
    "comment": "00FF00",
    "number": "FF8000",
    "op": "FFCC00",
    "keyword": "FF6600",
    "type": "00FFFF",
    "builtin": "44FF88",
    "preprocessor": "C0C0C0",
    "selection": "C06699CC", // background color when selecting text
    "charBackground": "C0000000", // if set, this value will be used (instead of gui opacity) behind characters
  },
  "postExitCmd":"copy_to_dropbox.bat" // this command gets ran when you quit Bonzomatic, and the shader filename gets passed to it as first parameter. Use this to take regular backups.
}

Automatic shader backup

If you want the shader to be backed up once you quit Bonzomatic, you can use the above postExitCmd parameter in the config, and use a batch file like this:

@echo off
REM ### cf. https://stackoverflow.com/a/23476347
for /f "tokens=2 delims==" %%a in ('wmic OS Get localdatetime /value') do set "dt=%%a"
set "YY=%dt:~2,2%" & set "YYYY=%dt:~0,4%" & set "MM=%dt:~4,2%" & set "DD=%dt:~6,2%"
set "HH=%dt:~8,2%" & set "Min=%dt:~10,2%" & set "Sec=%dt:~12,2%"
copy %1 X:\MyShaderBackups\%YYYY%%MM%%DD%-%HH%%Min%%Sec%.glsl

This will copy the shader timestamped into a specified folder.

A similar script for Linux and OSX would be:

cp "$1" "~/MyShaderBackups/shader-$(date +%s).glsl"

To have this script run on exit, make sure your postExitCmd has a ./ before the script name.

Building

As you can see you're gonna need CMAKE for this, but don't worry, a lot of it is automated at this point.

Windows

Use at least Visual C++ 2010. For the DX9/DX11 builds, obviously you'll be needing a DirectX SDK, though a lot of it is already in the Windows 8.1 SDK as well.

OSX/macOS

cmake should take care of everything:

mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release ../
cmake --build .

The Bonzomatic.app bundle, resulting from the compilation, should be found in ./build/Bonzomatic.app. You can place it anywhere. We do NOT recommend putting it in /Applications. Bonzomatic is looking for config.json files and resources living at the same level of the app.

Linux

You'll need xorg-dev, libasound2-dev and libglu1-mesa-dev; after that cmake should take care of the rest:

apt install xorg-dev libglu1-mesa-dev libasound2-dev cmake
cd Bonzomatic
cmake .
make
make install

OpenBSD

Xenocara contains all required components. Hack away with

cmake .
make

or use the port

cd /usr/ports/graphics/bonzomatic
make install

Organizing a competition

If you want to organize a competition using Bonzomatic at your party, here's a handy-dandy guide on how to get started: https://github.com/Gargaj/Bonzomatic/wiki/How-to-set-up-a-Live-Coding-compo

Credits and acknowledgements

Original / parent project authors

Libraries and other included software

These software are available under their respective licenses.

The remainder of this project code was (mostly, I guess) written by Gargaj / Conspiracy and is public domain. OSX / macOS maintenance and ports by Alkama / Tpolm + Calodox; Linux maintenance by PoroCYon / K2.

Contact / discussion forum

If you have anything to say, do it at https://www.pouet.net/topic.php?which=9881

bonzomatic's People

Contributors

22459 avatar alkama avatar amdmi3 avatar blackle avatar cupe avatar cxw42 avatar fluttergust avatar gargaj avatar gitter-badger avatar hamidnazari avatar jasmin68k avatar julien avatar kebby avatar klemensn avatar linkmauve avatar lunasorcery avatar pansk avatar perweij avatar plabatut avatar porocyon avatar rgiot avatar sacredbanana avatar skomp avatar stapelberg avatar tehe avatar thatguyjk avatar ursg avatar w23 avatar w84death avatar wilhelmy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bonzomatic's Issues

Audio configuration for Linux

What is the correct configuration for audio input to work for the FFT on Linux?
I don't see a way to configure the input device.

Edit: summary:

  • miniaudio failed to dlopen any audio libraries on my system #104 (comment)
  • pulseaudio let me easily set the recording device #104 (comment)

Where to put config.json - Lack of info in Readme.md

The documentation lacks information about where to put the config.json file.
When on Windows, it's easy to suppose that this file must be in the same directory as bonzomatic executable. but when on Linux or OSX, it's not obvious, especially if bonzomatic has been installed by make install, which puts the executable in a directory not writable by the user (/usr/local/bin for example).
Please update the Readme.md file to tell where to put the config.json file in each case.

Wrong display size on Linux with multiple screen

When using Bonzomatic from a laptop using a 4K display I have notice various issues :

  • laptop without monitor : Bonzomatic takes 1/4 of the screen (lower left quadrant)

  • lapopt with a plugged (not 4k) monitor

    • Bonzomatic started from the laptop screen : Bonzomatic uses the external monitor and seems to be properly displayed. Hower moving the mouse to the extra right part of the screen makes it scroll until seing only the right part of bonzomatric screen; moving the mouse to the left of the screen do fix the issue
    • Bonzomatic started from the external monitor : top part of Bonzomatic is hidden (the 20th first lines of text)

The configuration is:

  • ubuntu 18.04
  • GNOME Shell 3.28.3
  • Quadro M2200

No idea of which additional information could help to solve this issue. But I can provide more if needed

Low DPI and wrong resolution in Mac OS X High Sierra.

I cloned and compiled Bonzomatic on my Mac OS X 10.13.3 and I noticed two bug:

  • GLFW seem to use the wrong DPI (the title bar is very blurry).
  • The resolution is wrong. A small resolution will end up creating a much bigger window.

Here is a screenshot.
I selected a resolution of 1440x900 which is much smaller than my mac resolution (2 880x1 800, 220dpi) and the window is bigger than my screen.

It seem to be related with this GLFW issue.
I tried to manually add :

<key>NSHighResolutionCapable</key>
<true/>

to the Info.plist of the App but the option "Open in low resolution" is still locked to true.

Metal

With macOS officially deprecating OpenGL with macOS Mojave because they only want to support Metal, it made me think perhaps I could create a Metal version of Bonzomatic. Do you think Metal shader live coding could be popular enough to warrant developing this version? The only experience I have so far with Metal is porting the Bonzomatic default shader to a Metal fragment shader. It's almost the same as GLSL so the transition is quite smooth.

GetDefaultFontPath couldn't find ANY default fonts!

When launching, after selecting resolution,... there is this error:
GetDefaultFontPath couldn't find ANY default fonts!

I managed to track the problem, it's because my windows is on the D: disk, I don't have a C:
I did a workaround mounting \my_pc\d$ as C:

Maybe the default font path could be defined in the config file?

cursor keys "Top" and "Right" move the cursor in the opposite direction under Linux

I compiled the app according to the instructions, everything works fine except that the cursor key "Top" moves the cursor down and the key "Right" moves the cursor to the left. I tested on 2 distros (Manjaro/KDE and Mint/XFCE):

$ cat /etc/lsb-release 
DISTRIB_ID=ManjaroLinux
DISTRIB_RELEASE=20.1
DISTRIB_CODENAME=Mikah
DISTRIB_DESCRIPTION="Manjaro Linux"
$ cat /etc/lsb-release  
DISTRIB_ID=LinuxMint
DISTRIB_RELEASE=19.1
DISTRIB_CODENAME=tessa
DISTRIB_DESCRIPTION="Linux Mint 19.1 Tessa"

GLX: Failed to create context: GLXBadFBConfig

Attempting to run on Debian 9.4. Appears to build fine, but when running:

$ ./Bonzomatic
OpenSetupDialog STUB
GLX: Failed to create context: GLXBadFBConfig
[GLFW] Window creation failed
Renderer::Open failed

Shadertoy mode in the SDL renderer?

Basically allow incoming shaders to be (somewhat) compatible with Shadertoy, allowing them to be viewed offline.

Maybe a branch is better suitable for this.

more than one GUI opacity level

it could just cycle through them or the could have separate keys. maybe have separate opacity controls for the text. easiest would be to just allow an arbitrary number in config.json i guess? thanks!

Post-exit custom step

Add option to execute an arbitrary shell command when the app is closed; will help organizers get the final shader from a competition without having to manually copy it.

Drawing texture previews significantly slows down FFT updating on macOS

Hey there! So I've been trying this out this on my fairly beefy Macbook, writing up some shaders. Noticed that when I have the code display open (and specifically, when I have the texture previews open on the right-hand side) the FFT variables seem to stop updating. I'm not sure whether it's an issue generally with the new mini_al stuff, or just for my specific set of hardware though (i7, 16GB RAM, Radeon Pro 460).

To see what I mean, I've got an example with a shader that updates things based on the FFT:
https://www.youtube.com/watch?v=oiPx3q0-_as

Commenting out this function here resolves the issue and makes the shader display properly while the texture preview sidebar is open:

          Renderer::RenderQuad(
            Renderer::Vertex( x1, y1, 0xccFFFFFF, 0.0, 0.0 ),
            Renderer::Vertex( x2, y1, 0xccFFFFFF, 1.0, 0.0 ),
            Renderer::Vertex( x2, y2, 0xccFFFFFF, 1.0, 1.0 ),
            Renderer::Vertex( x1, y2, 0xccFFFFFF, 0.0, 1.0 )
          );

Example of running with this change:
https://www.youtube.com/watch?v=7OqKnOFWBro

The interesting thing is that on one of my more complex shaders, if I only draw with the 256x256 checker texture, the FFT does update, just more slowly than usual. On that same shader, if I draw one of the 1024x1024 shaders, the FFT doesn't update at all (or at least it's so slow it feels like it doesn't at all). Which makes me suspect that the size (and/or necessary scaling or something) of the textures factors into it.

Makes me think that rendering those textures to the screen is what's slowing it down juuust enough for the FFT updating to mess up. I've tried writing up a change to precalc texture previews but haven't managed to work out exactly how to do so yet (need to dig into using GLFW and such :P).

Little example GLSL shader that I've used for the above videos:

#version 410 core

uniform sampler1D texFFT; // towards 0.0 is bass / lower freq, towards 1.0 is higher / treble freq
uniform sampler1D texFFTSmoothed; // this one has longer falloff and less harsh transients
uniform sampler1D texFFTIntegrated; // this is continually increasing

layout(location = 0) out vec4 out_color; // out_color must be written in order to see anything

void main(void)
{
  float r, g, b;

  r = sin(gl_FragCoord.x*0.04-texture(texFFTIntegrated, 0.2).r*2);
  g = sin(gl_FragCoord.x*0.04+1-texture(texFFTIntegrated, 0.2).r*2);
  b = sin(gl_FragCoord.x*0.04+2-texture(texFFTIntegrated, 0.2).r*2);

  out_color = vec4(r, g, b, 1);
}

Thanks for making this awesome tool! Been really fun to learn about GLSL using it. Please let me know if you're after any more information.

Licence is misleading

The stated licence doesn't seem correct, a quick look at http://www.un4seen.com/bass.html#license should clarify this for you. It is clearly not a do as you like licence. The audio stream librarary libbass is FREEWARE, and requries payment for use outside of home/presonal use.
Are the authors aware that you've been using their software at a for profit event?
If you were continuing to develop this, then may I suggest looking at fftw (only intels math libs beat this) for fourier analysis, and RtAudio(windows, mac, and linux C++ audio) for streaming. That way you won't need to state FREEWARE home/personal use only on the licencing.

Segmentation fault under linux mint

Scenario:

  • Use linux mint latest version
  • Download source
  • add all dependencies

sudo apt install cmake clang libx11-dev libxrandr-dev libxnerama-dev libxcursor-dev

  • build using cmake and make
  • run
  • crash after MIDI::Open() failed, continuing anyway...

Call stack using lldb (nullptr passed to strlen):

frame #0: 0x00007ffff602c5a1 libc.so.6`__strlen_avx2 at strlen-avx2.S:62

Move away from SDL2 and use GLFW3 instead

On some platforms, SDL2 can be bothersome to accurately locate and link:
The structure of its include and the fact they chose the same name makes it conflict with v1.
Depending on the way it's installed, different files need to be included in the project (ex: SDLmain.m in case of framework install on OSX).

For all those reasons, a switch to GLFW3 would be easier. it can be built as a 3rdParty dependancy for every platform from the sources and bundled with the project.

"Slow" compilation

Compiling would be faster if scintilla didn't need to build every single lexer.

MIDI?

Might not be needed for the compo perspective, but could be fun otherwise.

Sync Mode for online only events

For a live shader showdown when we can't leave the house, it would be nice to have a sync mode where people can type and test at home, and a second instance replicates the same view over the internet, only synchronizing editing commands and view controls.
Allowing the second instance to decouple view controls and only follow source code updates might also help commentators to explain something.

Texture preview?

Texture thumbnails to the right side of the screen with the name overlaid on them. Could help the competitor switch between textures easier.

Feature request: GPU affinity (WGL_NV_gpu_affinity)

I am helping organize a Shader Showdown, and we may need to render on the dual-NVidia compo machine. If so, we will run two Bonzomatic processes concurrently, and drive them programmatically. Would you be willing to add WGL_NV_gpu_affinity support so we could be sure each process was only using one of the GPUs? I found an implemented example of querying, and a more complex example here that includes rendering. Thanks for considering this request!

[ubuntu] alsa sound dependency

Hello and thank you for this amazing tool!

Found a minor issue with compilation on Ubuntu 19.10

Bonzomatic/src/platform_x11/MIDI.cpp:4:10: fatal error: alsa/asoundlib.h: No such file or directory
    4 | #include <alsa/asoundlib.h>

It was solved by:

sudo apt install libasound2-dev

Cheers from Revision 2020 online party!

GLX: Failed to create context: GLXBadFBConfig

Build is successful, although when I try to run:

INFO: Initializing raylib 2.6-dev
WARNING: [GLFW3 Error] Code: 65543 Decription: GLX: Failed to create context: GLXBadFBConfig
WARNING: GLFW Failed to initialize Window
INFO: Target time per frame: 16.667 milliseconds
Segmentation fault (core dumped)

I built with CMake.
5.3.18-1-MANJARO x86_64 GNU/Linux OpenGL 2.1

DDS Mipmap Levels

Hey Gargaj,

using DX9 version.
Reading the code it looks like mipmap levels within DDS textures are read just as D3DXCreateTextureFromFileEx would load them with MipLevels == 0. But somehow using tex2Dlod and changing the second argument's ".w" manually doesn't make a difference.

Intended behaviour?

Cheers,
St0fF

P.S.: yes, don't use DDS. It was just for testing...

MacOS build fails

I'm getting strange errors when compiling on macOS:

/Users/vmark/dev/Bonzomatic/external/glfw/src/cocoa_init.m:77:5: error: use of undeclared identifier 'NSString'; did you mean 'cString'?
    NSString* appName = nil;
    ^~~~~~~~
    cString

Not sure what can cause this, so I leave the full build.log here.

System info:

  • macOS Catalina 10.15.7
  • Xcode 12.2, build version 12B45b
  • AppleClang 12.0.0.12000032

Download and install

Hey guys!
I've got some problems with installing bonzomatic on my windows 10. Can someone give me some instructions for what software I need else? Cause if I just download the zip folder, there is no application that I can start. Pls help me.
Greetings Lars

File access issues on macOS

Hey there,

I'm currently trying to set up Bonzomatic on a mac book running macOS Catalina 10.15.6, but it seems that the program is unable to access any of the additional included files. The font and config are not loaded and compiling the shader outputs a warning stating that it could not be saved. I also asked a friend running High Sierra 10.15.5 to test it and he has the same issues.

The problem does not occur when the executable (Bonzomatic.app/Contents/MacOS/Bonzomatic) is started directly instead of the app container. As a Windows user I'm not really familiar with the macOS app architecture, but to me this appears to be an issue with the deployed app container.

Long lines wrapping (or not)

When inputting long lines, the text in the editor decals to the left but starts to overlap the line number margins.
An option could be to opt for setting some forced wrapping.

Add an option to use neovim as an editor

One thing that makes me uncomfortable when using Bonzomatic is that it lacks vim mode ;).

Recently I discovered this neovim thing that states that it can be used as an embeddable text editor. It would be very cool to be able to use it as an optional text editor mode for those of us who strongly prefer vi-stuff to anything else.

I will be willing to implement that pull request myself if/when I find time to do it (not very soon though).

Unable to get FFT working on windows (GLFW)

I wonder how the FFT texture is supposed to work on windows.
Had no luck when just playing some music with Spotify, and mic input also doesn't seem to work.
I see "[FFT] MAL context initialized, backend is 'WASAPI'" string in the log.
This is the shader I've used for testing

#include

Hi,

I just found Mercury's SDF library at http://mercury.sexy/hg_sdf/ and thought wouldn't it be great if you can just have Bonzomatic silently include a source file such as this one (set in config.json) for helper methods or common variables (obviously can be banned or tightly controlled for actual demo party competition use) so I created a branch for doing so and I have managed to get it working but I'm not sure if you want this to be a feature of the main product or not. And if so, how do we go about finding the point to inject the include file into? You can't just inject it at the beginning or you get errors because the very top of the shader has to have all the setup like #version 410 core.

This feature would severely help people wanting to inject a lot of code and not have it clutter the text editor.

Not working on macOS 10.15 beta

On macOS 10.15 beta 1, bonzomatic opens, the resolution selection window is all fine, but when hitting 'ignition' it goes fullscreen then simply exits. No crash report, so it looks like the app is quitting gracefully. Have tested on both GPUs (I have 1 for each screen), also with windowed mode (the app just quits instantly in this case).

This might be fixed in macOS by release time, but I figured it'd be good to flag it early.

Shader crash in Bonzomatic (windows 10)

Release: Bonzomatic_W64_2019-03-26
exe: Bonzomatic_W64_GLFW.exe

Shader (attached to this ticket) produces crash at load on nvidia GTX 1060 (freeze on white screen on Intel HD5000).
When copy pasting this shader on a fresh bonzomatic session, it crash too.

crashshader.txt

Tell me if you need more information.
Thanks!

Accept config.json as first argument, standardized linux build script output

Would you consider merging these patches?
The second one probably needs to branch based on whether it's linux or not so I'll be back in an hour and add that then.

diff --git a/src/main.cpp b/src/main.cpp
index 97375c0..a9851f4 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -71,14 +71,14 @@ static void changeToAppsCurrentDirectory()
 }
 #endif

-int main()
+int main(int argc, char *argv[])
 {
 #ifdef __APPLE__
   changeToAppsCurrentDirectory();
 #endif

   jsonxx::Object options;
-  FILE * fConf = fopen("config.json","rb");
+  FILE * fConf = fopen((argc > 1)? argv[1] : "config.json","rb");
   if (fConf)
   {
     printf("Config file found, parsing...\n");
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8f70f27..058ee07 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -27,7 +27,6 @@ option(BONZOMATIC_NDI "Enable NDI?" OFF)
 set(BONZOMATIC_WINDOWS_FLAVOR "DX11" CACHE STRING "Windows renderer flavor selected at CMake configure time (DX11, DX9 or GLFW)")
 set_property(CACHE BONZOMATIC_WINDOWS_FLAVOR PROPERTY STRINGS DX11 DX9 GLFW)

-set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR})
 if (APPLE)
   set(CMAKE_FIND_FRAMEWORK LAST)
 endif ()
@@ -436,6 +436,7 @@ set(BZC_PROJECT_LIBS ${BZC_PROJECT_LIBS} ${PLATFORM_LIBS})

 # create the executable
 link_directories(${BZC_LINK_DIRS})
+set(CMAKE_INSTALL_RPATH "$ORIGIN/../lib")
 add_executable(${BZC_EXE_NAME} ${BZC_PROJECT_SRCS})
 if (APPLE AND GLFW_USE_RETINA)
   # Add special plist to enable Retina display support
@@ -472,4 +473,11 @@ if (MSVC)
     endif ()
   endif ()
 endif ()

+## install
+if (BONZOMATIC_64BIT)
+  install(FILES "${CMAKE_SOURCE_DIR}/external/bass/x64/libbass.so" DESTINATION lib)
+else ()
+  install(FILES "${CMAKE_SOURCE_DIR}/external/bass/x86/libbass.so" DESTINATION lib)
+endif ()
+install(TARGETS ${BZC_EXE_NAME} RUNTIME DESTINATION bin)

Support mouse scrolling

Currently the editor doesn't support either vertical or horizontal scroll.
It could be a nice feature to have.

Bonzomatic for Windows now instantly crashes

I don't know why, but Bonzomatic has suddenly stopped working entirely on Windows for me. I am using the latest version of the master branch. When I debug it I get this:

image

Could this be caused by a Windows update? I am in the Windows Insider program so I get early builds.

Windows GLFW crash

I just downloaded the latest CMake, Visual Studio and Nvidia driver and Bonzomatic crashes for me.
I built the Release version with Debug info and the exception is thrown in the mini_al.h init function at this line: mal_zero_object(pDevice);

Is there any workaround for this or some fix maybe?

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.