Git Product home page Git Product logo

llgi's Introduction

LLGI

How to build

Windows

$ git clone https://github.com/altseed/LLGI.git
$ cd LLGI
$ git submodule update --init
$ cmake -S . -B build -DBUILD_TEST=ON
$ cmake --build build

macOS

$ git clone https://github.com/altseed/LLGI.git
$ cd LLGI
$ git submodule update --init
$ cmake -S . -B build -G "Xcode" -DBUILD_TEST=ON
$ cmake --build build

Vulkan(Window, Linux)

$ git clone https://github.com/altseed/LLGI.git
$ cd LLGI
$ git submodule update --init
$ cmake -S . -B build -DBUILD_VULKAN=ON -DBUILD_TEST=ON
$ cmake --build build

Test

Run with Vulkan

./LLGI_Test --vulkan

Run with single test

./LLGI_Test --filter=<TestName*>

llgi's People

Contributors

argonism avatar darreney avatar durswd avatar gon6109 avatar lriki avatar luncliff avatar sunaemon avatar ueshita avatar wistnki avatar wraikny 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

llgi's Issues

Swapchain の backbuffer を LLGI.Texture でラップして公開する

キャプチャの API で任意のバッファから読み取れるようにするため、Swapchain の backbuffer を、LLGI.Texture でラップして公開するような API を実装する。

次のように使えるようにしたい。

auto renderPass = graphics->GetCurrentScreen(color, true);
auto texture = renderPass->GetColorBuffer(0);
auto data = graphics->CaptureRenderTarget(texture);

how to build tools (ShaderTranspiler, glslangValidator)

Build ShaderTranspiler on Windows

cmake -S . -B build -DBUILD_TEST=ON -DBUILD_TOOLS=ON
cmake --build build

Build glslangValidator on Windows

cd thirdparty/glslang
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX="$(pwd)/install"
cmake --build . --config Release --target install
cp StandAlone/Release/glslangValidator.exe ../../../scripts/.

Implement CreateTexture with new args

implement these functions

Texture* Graphics::CreateTexture(const TextureInitializationParameter& parameter);

Texture* Graphics::CreateRenderTexture(const RenderTextureInitializationParameter& parameter) ;

Texture* Graphics::CreateDepthTexture(const DepthTextureInitializationParameter& parameter);

Graphics からSwapchain 関係の処理とデータを分離する

Unity 組み込みなどを見据えて、Swapchain 関係を Graphics から分離する。
GetCurrentBuffer は Platform に持たせる。

現状:

auto renderPass = graphics->GetCurrentScreen(color, true);
...
platform->Present();

変更後:

auto renderPass = platform->GetCurrentScreen(color, true);
...
platform->Present();

support new specifications

Screenshot

It is not implemented on all backends.

CreateCommandList with args

except Metal

Support SendTextureFromCPUToGPU

?

CommandListのDispatchを同期実行できるようにする。

DX12 と Vulkan では、CommandList の Dispatchが同期実行されない。そのため、一度に複数のDispatchを行うと、複数のComputeShaderが並列に実行されてしまって意図しない出力になる可能性がある。そのため、Dispatch する際に 各 ComputeBuffer に対してResource Barrier を 行い、同期的に実行されるようにする。

separate Swapchain functions and data from CommandList

I want to remove data of multiple swapbuffer from LLGI.CommandList.
CommandList should be created by a swapbuffer

Current version

auto platform = LLGI::CreatePlatform(LLGI::DeviceType::Default);
auto graphics = platform->CreateGraphics();
auto sfMemoryPool = graphics->CreateSingleFrameMemoryPool(1024 * 1024, 128);
auto commandList = graphics->CreateCommandList(sfMemoryPool);

while ()
{
    platform->NewFrame();
    sfMemoryPool->NewFrame();
    
    commandList->Begin();
    ・・・
    commandList->End();

    graphics->Execute(commandList);

    platform->Present();
}

Ideal vesion

auto platform = LLGI::CreatePlatform(LLGI::DeviceType::Default);
auto graphics = platform->CreateGraphics();
auto commandListPool = graphics->CreateCommandListPool(1024 * 1024, 128, the number of swap chain);    // including MemoryPool

while ()
{
    platform->NewFrame();
    
    auto commandList = commandListPool->get();    // Wait to finish execution of command list 
    
    commandList->Begin();
    ・・・
    commandList->End();

    graphics->Execute(commandList);

    platform->Present();
}

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.