All Projects → nimgl → Nimgl

nimgl / Nimgl

Licence: mit
NimGL is a Nim library that offers bindings for popular libraries used in computer graphics

Programming Languages

nim
578 projects

Projects that are alternatives of or similar to Nimgl

Lwjgl3
LWJGL is a Java library that enables cross-platform access to popular native APIs useful in the development of graphics (OpenGL, Vulkan), audio (OpenAL), parallel computing (OpenCL, CUDA) and XR (OpenVR, LibOVR) applications.
Stars: ✭ 3,540 (+1523.85%)
Mutual labels:  opengl, vulkan, glfw, bindings
Magnum
Lightweight and modular C++11 graphics middleware for games and data visualization
Stars: ✭ 3,728 (+1610.09%)
Mutual labels:  opengl, vulkan, glfw
Lumos
Cross-Platform C++ 2D/3D game engine
Stars: ✭ 343 (+57.34%)
Mutual labels:  opengl, vulkan, imgui
Flextgl
OpenGL and Vulkan header and loader generator.
Stars: ✭ 180 (-17.43%)
Mutual labels:  opengl, vulkan, glfw
Bgfx
Cross-platform, graphics API agnostic, "Bring Your Own Engine/Framework" style rendering library.
Stars: ✭ 10,252 (+4602.75%)
Mutual labels:  opengl, vulkan, glfw
Ludo
A libretro frontend written in golang
Stars: ✭ 366 (+67.89%)
Mutual labels:  opengl, glfw, bindings
Oreon Engine
OpenGL/Vulkan Java 3D Engine
Stars: ✭ 431 (+97.71%)
Mutual labels:  opengl, vulkan, glfw
Imguizmo.quat
ImGui GIZMO widget - 3D object manipulator / orientator
Stars: ✭ 187 (-14.22%)
Mutual labels:  opengl, vulkan, imgui
Silk.net
The high-speed OpenAL, OpenGL, Vulkan, and GLFW bindings library your mother warned you about.
Stars: ✭ 534 (+144.95%)
Mutual labels:  opengl, vulkan, glfw
Vxr
General purpose engine written in C++ with emphasis on materials rendering (PBR, clear coat, anisotropy, iridescence)
Stars: ✭ 181 (-16.97%)
Mutual labels:  opengl, glfw, imgui
Innocenceengine
Cross-platform modern game engine.
Stars: ✭ 149 (-31.65%)
Mutual labels:  opengl, vulkan
Bimpy
imgui for python
Stars: ✭ 144 (-33.94%)
Mutual labels:  glfw, imgui
Gl vk threaded cadscene
OpenGL and Vulkan comparison on rendering a CAD scene using various techniques
Stars: ✭ 143 (-34.4%)
Mutual labels:  opengl, vulkan
Serpent
Cross-platform gaming kit in the D programming language
Stars: ✭ 140 (-35.78%)
Mutual labels:  opengl, vulkan
Reshade
A generic post-processing injector for games and video software.
Stars: ✭ 2,285 (+948.17%)
Mutual labels:  opengl, vulkan
Commandbuffer
A lock-free CommandBuffer implementation designed for multi-threaded rendering applications.
Stars: ✭ 151 (-30.73%)
Mutual labels:  opengl, vulkan
Glad
Multi-Language Vulkan/GL/GLES/EGL/GLX/WGL Loader-Generator based on the official specs.
Stars: ✭ 2,296 (+953.21%)
Mutual labels:  opengl, vulkan
Diligentsamples
Sample projects demonstrating the usage of Diligent Engine
Stars: ✭ 138 (-36.7%)
Mutual labels:  opengl, vulkan
Gpu performance api
GPU Performance API for AMD GPUs
Stars: ✭ 170 (-22.02%)
Mutual labels:  opengl, vulkan
Awesome Vulkan
Awesome Vulkan ecosystem
Stars: ✭ 2,322 (+965.14%)
Mutual labels:  opengl, vulkan

Nim Game Library

A collection of bindings for popular libraries
Mostly used in computer graphics
Explore the docs »

Table of Contents

About

NimGL (Nim Game Library) is a collection of bindings for popular libraries, mostly used in computer graphics. A library of libraries.

This collection of bindings is heavily inspired by LWJGL3. It enables low level access and it is not a framework, so we highly encourage you to use a game engine if you do not have experience in working with low level graphics development. These bindings contain several optional helper procedures to help with development and to better suit it to the language.

Getting Started

We highly recommend using a Nimble project to easily add requirements such as NimGL.

Installation

With Nimble file (recommended)

  1. Install Nimble, it comes preinstalled with Nim.
  2. Add it to your .nimble file.
requires "nimgl >= 1.0.0"
  1. Build with nimble.
nimble build

With Nimble install

  1. Install Nimble, it comes preinstalled with Nim.
  2. Install NimGL with Nimble.
nimble install nimgl
  1. Build with Nim.
nim c -r main.nim

Develop with Nimble

  1. Install Nimble, it comes preinstalled with Nim.
  2. Clone and link with Nimble in another directory.
nimble develop nimgl
  1. Build with either Nim or Nimble.

It is currently being developed and tested on

  • Windows 10
  • MacOS Catalina
  • Linux Ubuntu 18.10

Usage

Please refer to each binding documentation to further understand its usage.

Green Window Example

import nimgl/[glfw, opengl]

proc keyProc(window: GLFWWindow, key: int32, scancode: int32,
             action: int32, mods: int32): void {.cdecl.} =
  if key == GLFWKey.ESCAPE and action == GLFWPress:
    window.setWindowShouldClose(true)

proc main() =
  assert glfwInit()

  glfwWindowHint(GLFWContextVersionMajor, 3)
  glfwWindowHint(GLFWContextVersionMinor, 3)
  glfwWindowHint(GLFWOpenglForwardCompat, GLFW_TRUE) # Used for Mac
  glfwWindowHint(GLFWOpenglProfile, GLFW_OPENGL_CORE_PROFILE)
  glfwWindowHint(GLFWResizable, GLFW_FALSE)

  let w: GLFWWindow = glfwCreateWindow(800, 600, "NimGL")
  if w == nil:
    quit(-1)

  discard w.setKeyCallback(keyProc)
  w.makeContextCurrent()

  assert glInit()

  while not w.windowShouldClose:
    glfwPollEvents()
    glClearColor(0.68f, 1f, 0.34f, 1f)
    glClear(GL_COLOR_BUFFER_BIT)
    w.swapBuffers()

  w.destroyWindow()
  glfwTerminate()

main()

Contribute

Your contributions truly mean the world to this project. If you are missing some procedures, bindings or functionality feel free to open an Issue with the specification and some example on how to properly implement it. For the adventurous also feel free to open a Pull Request which will be greatly appreciated.
Thank you so much 🎉

Read the Contribution Guide for more information.

Supported Bindings

Library Description
GLFW Create multiple windows, handle user input (keyboard, mouse, gaming peripherals) and manage contexts. Also features multi-monitor support, clipboard access, file drag-n-drop, and much more.
Vulkan A new generation graphics and compute API that provides high-efficiency, cross-platform access to modern GPUs used in a wide variety of devices from PCs and consoles to mobile phones and embedded platforms.
OpenGL Open Graphics Library is a cross-language, cross-platform application programming interface for rendering 2D and 3D vector graphics. NimGL only supports modern OpenGL.
ImGUI Dear ImGui is a bloat-free graphical user interface library for C++. It outputs optimized vertex buffers that you can render anytime in your 3D-pipeline enabled application.

Gallery

Please let me know if you want to be showcased or removed from here.

chip-8 emulator by @kraptor

Credits

Developed by Leonardo Mariscal and all the amazing contributors in GitHub.

Heavily inspired by LWJGL3 and GLAD.

Each binding contains a small credits comment at the top of the file, but in general thank you to every contributor of each individual library used in this project 🌹.

License

MIT License.

NimGL is open source and is under the MIT License, we highly encourage every developer that uses it to make improvements and fork them here.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].