Skip to content

Getting Started

gallickgunner edited this page Mar 29, 2020 · 6 revisions

Yune doesn't currently support a build system like Cmake or any makefile. If you are still interested in compiling it, you'll have to either compile GLFW yourself or get pre-compiled binaries from the repo and hook up everything inside an IDE. I've listed some steps down below, hope you'll find it useful.

  1. The program has 6 main dependencies. These are GLFW, GLAD, GLM, Dear-ImGui (which is provided automatically), stb_image_write and OpenCL. Get GLFW from the official repo and either compile it through Cmake or use the precompiled binaries provided. Next generate a glad loader from the webservice (link given on their site). You need the loader for OpenGL version 3.3, compatibility profile and make sure not to check Omit KHR. Next get stb_image_write and glm which are both header only.
    Lastly you need OpenCL. Get headers either from your GPU's SDK or from the original repo. and place them in a folder named CL. The binaries are provided by the SDK though. For me, the relevant file was OpenCL.lib and the rest of the headers.

    • GLFW, for window and input managment.
    • GLAD for OpenGL 3.x and higher windows.
    • GLM for basic Vector types and math.
    • STB Image for saving screenshots.
    • Dear-ImGui for GUI and basic widgets.
    • OpenCL for OpenCL headers.
  2. Now you just need to include paths to these dependencies in your IDE. If you are using CodeBlocks, include these paths Search Directories -> Compiler from Project->Build Options. Care should be taken when including so that these specific libraries can be accessed from within the project as

    • #include "GLFW/glfw3.h"
    • #include "glad/glad.h"
    • #include "KHR/khrplatform.h" (khrplatform.h comes with glad)
    • #include "glm/vec4.hpp"
    • #include "CL/cl.h"

    The rest of the files should be accessed directly with no specific folder to look into. For example, #include "imgui.h"

  3. Now add the paths to libglfw3dll.a and OpenCL.lib to your linker paths and select these files in linker settings. And add -lopengl32 to your linker options.

  4. You can add these global defines (optional).

    • CL_MINIMUM_OPENCL_VERSION=xxx ( Should be 110 or higher, default 120)
    • CL_TARGET_OPENCL_VERSION=xxx ( Should be 110 or higher, default 120)
    • GLFW_DLL (If using GLFW as a dynamic library)

That's it you are done. The project should compile now. If you still got any issues, you can open an issue here.

Clone this wiki locally