Giter Club home page Giter Club logo

qquickbgfx's Introduction

QQuickBgfx

This repository implements BGFX renderering abstraction library to work under QML/QQuick for Qt6.

A QQuickBgfxItem can be instantiated in QML with a given bgfx::viewId. The content of the framebuffer associated to the viewId will be visualized inside the QML BgfxItem.


Why having Qt/QML with an external renderer?

Despite the new technology trends and approaches, Qt/QML is still largely used. Over the last years, by using this framework, I noticed that the 3d rendering engine made in qt was under documented, difficult to use, and with poor performances due to the high level abstraction. And still, you might have to write some platform specific rendering code, which makes it even harder to use for crossplatform 3d application.

Probably Qt6 will improve all that, but I want to offer BGFX as an easy alternative that works great out of the box. The BGFX examples show how to use the library and the different features. If you are familiar with the general GPU pipeline, it'll be fairly easy to start pushing some pixels :D


Metal and D3D11 backend are currently implemented.

TO DO:

  • OpenGL backend
  • Vulkan backend

DONE:

  • Metal backend
  • D3D11 backend

Clone:

The usual suspects

  • $ git clone [email protected]:dashandslash/BgfxQQuickItem.git
  • $ cd BgfxQQuickItem
  • $ git submodule update --init --recursive

Build:

Add Qt to the PATH

  • $ export PATH=$PATH:/path/to/Qt/6.0.0/clang_64/lib/cmake

From the cloned folder

  • $ mkdir .build && cd .build

Mac:

  • $ cmake .. -G Xcode -DCMAKE_BUILD_TYPE=Debug (Release for release mode) Win:

  • $ cmake .. -G "Visual Studio 16 2019" -A x64 -DCMAKE_BUILD_TYPE=Debug (Release for release mode)

I suggest to use XCode to build and debug on Mac (the XCode GPU capture feature is very handy for debugging the Metal rendering pipeline).

qquickbgfx's People

Contributors

dashandslash 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

Watchers

 avatar  avatar  avatar  avatar  avatar  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.