From d8595ce01c106b734b07388360caab57b15478f0 Mon Sep 17 00:00:00 2001 From: Tristan Cacqueray Date: Sun, 21 Feb 2021 19:04:25 +0000 Subject: [PATCH] Initial summon --- .gitmodules | 6 ++++++ LICENSE | 29 +++++++++++++++++++++++++++++ Main.hs | 4 ++++ README.md | 2 ++ cabal.project | 2 ++ dear-implot.cabal | 38 ++++++++++++++++++++++++++++++++++++++ imgui | 1 + implot | 1 + src/DearImGui/Plot.hs | 2 ++ 9 files changed, 85 insertions(+) create mode 100644 .gitmodules create mode 100644 LICENSE create mode 100644 Main.hs create mode 100644 README.md create mode 100644 cabal.project create mode 100644 dear-implot.cabal create mode 160000 imgui create mode 160000 implot create mode 100644 src/DearImGui/Plot.hs diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..1ff6718 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,6 @@ +[submodule "implot"] + path = implot + url = https://github.com/epezent/implot +[submodule "imgui"] + path = imgui + url = https://github.com/ocornut/imgui diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..a23ef53 --- /dev/null +++ b/LICENSE @@ -0,0 +1,29 @@ +BSD 3-Clause License + +Copyright (c) 2021, Haskell Game +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Main.hs b/Main.hs new file mode 100644 index 0000000..a789dd9 --- /dev/null +++ b/Main.hs @@ -0,0 +1,4 @@ +module Main (main) where + +main :: IO () +main = putStrLn "go!" diff --git a/README.md b/README.md new file mode 100644 index 0000000..ad5b98f --- /dev/null +++ b/README.md @@ -0,0 +1,2 @@ +# implot binding + diff --git a/cabal.project b/cabal.project new file mode 100644 index 0000000..a8c2ee9 --- /dev/null +++ b/cabal.project @@ -0,0 +1,2 @@ +packages: . ../../haskell-game/dear-imgui.hs/ +flags: +sdl +opengl2 -vulkan diff --git a/dear-implot.cabal b/dear-implot.cabal new file mode 100644 index 0000000..5973069 --- /dev/null +++ b/dear-implot.cabal @@ -0,0 +1,38 @@ +cabal-version: 3.0 +name: dear-implot +version: 1.0.0 +build-type: Simple + +library + exposed-modules: + DearImGui.Plot + hs-source-dirs: + src + default-language: + Haskell2010 + ghc-options: + -Wall + cxx-sources: + implot/implot.cpp + implot/implot_items.cpp + cxx-options: + -std=c++11 + extra-libraries: + stdc++ + include-dirs: + implot + imgui + build-depends: + base + , containers + , managed + , inline-c + , inline-c-cpp + , StateVar + , dear-imgui + +executable test + main-is: Main.hs + default-language: Haskell2010 + build-depends: base, sdl2, gl, dear-imgui, dear-implot, managed + ghc-options: -Wall diff --git a/imgui b/imgui new file mode 160000 index 0000000..a8f76c2 --- /dev/null +++ b/imgui @@ -0,0 +1 @@ +Subproject commit a8f76c23a481162c69e462a52ea7d6f4ade96b32 diff --git a/implot b/implot new file mode 160000 index 0000000..7234801 --- /dev/null +++ b/implot @@ -0,0 +1 @@ +Subproject commit 72348018687b9cc5cd509ea97188714d8aa93ef7 diff --git a/src/DearImGui/Plot.hs b/src/DearImGui/Plot.hs new file mode 100644 index 0000000..01f7783 --- /dev/null +++ b/src/DearImGui/Plot.hs @@ -0,0 +1,2 @@ +-- | DearImGui bindings for https://github.com/epezent/implot +module DearImGui.Plot where