GithubHelp home page GithubHelp logo

smorgasbord's Introduction

Smorgasbord graphics library (Version NaN)

Smorgasbord is a C++ library for quick to setup, quick to modify real-time graphics. It tries to provide a thin, concise layer over standard graphics APIs (Vulkan, OpenGL, DirectX) with reasonable overhead abstractions.

In its current state, I would not recommend using this library. I expect frequent API breaking changes until it becomes more feature complete.

Some key design choices:

  • Not overbearing: will not turn your app into a Smorgasbord app. It doesn't ask for your argc, argv.
  • Can be used on the side: can be utilized in an existing codebase without much disruption.
  • Shader source generation over parsing: massively simplifies dealing with shaders, interface changes can be implemented much quicker. Interface code generation results in a more concise codebase, and eliminates any need for shader reflection.
  • Declarative geometry specification: in my experience describing the geometry instead of selecting a drawing function is more intuitive and results in quicker code changes.
  • Modern perspective, terminology: even OpengGL is abstracted through queues, command buffers and pipelines. It might be superfluous for OpenGL, but helps maintaining the proper mindset, and helps newcomers to familiarize with the modern terminology.
  • Transparent abstraction: you can always reach the underlying APIs if you need something that isn't covered, or is more straightforward doing manually.

Shortcomings:

  • The current API does not promote ahead of time pipeline state preparation, because it somewhat opposes the quick to modify attitude. Unless I find way to reconcile the two behind the API, I will try to provide a way to gradually transition away from on demand pipeline state compilation.

Compiling the source

This project uses the CMake build scripts.

You have to either install GLM, FMT, and SDL2 system wide or set CMAKE_PREFIX_PATH when you invoke CMake.

The build scripts are tested under VS2019/MSVC14.

Running the sample under VS2019

The native CMake support in VS2019 as of version 16.11.5 seems to ignore the VS_DEBUGGER_WORKING_DIRECTORY CMake target property when the program is run locally. (This could be intentional. It probably works when a VS solution is generated via CMake, but I haven't verified it.)

To set the working directory for running the sample in VS:

  • Set the solution explorer to "CMake Targets View"
  • Right click on the sample's executable target and click "Add Debug Configuration"
  • To the resulting "launch.vs.json", add "currentDir": "<relative_path_from_the_root_cmakelists_txt>" for each configuration

For example:

{
  "version": "0.2.1",
  "defaults": {},
  "configurations": [
    {
      "type": "default",
      "project": "CMakeLists.txt",
      "projectTarget": "liltown.exe (liltown_sample\\liltown.exe)",
      "name": "liltown.exe (liltown_sample\\liltown.exe)",
      "currentDir": "samples/liltown"
    }
  ]
}

Contributions

I reserve the right to relicense the library for any purpose in its entirety, with or without third-party contributions. Even if it means a closed source and/or commercial license. Only contribute changes to the library if you're OK with that.

License

Copyright 2018-2021 Gábor Könyvesi

This project is licensed under the MIT License See the LICENSE file for licensing terms

smorgasbord's People

Contributors

altvanguard avatar

Watchers

 avatar

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.