Skip to content

lineCode/LLGL

 
 

Repository files navigation

Build status

Low Level Graphics Library (LLGL)

License

3-Clause BSD License

Documentation

Progress

 Renderer  Progress  Remarks
OpenGL ~90%
Direct3D 11 ~85% Depth-textures are incomplete
Direct3D 12 ~15% Experimental state; Tutorials working: 01, 02, (03), 06, 07, (10)
Vulkan ~30% Experimental state; Tutorials working: 01, 02, 03, 06, 07, 10
 Platform  Progress  Remarks
Windows 100% Tested on Windows 10
Linux 50% Tested on Kubuntu 16; Anti-aliasing is currently not supported
macOS 50% Tested on macOS Sierra; Not all tutorials are running
iOS 1% Currently not compilable

Thin Abstraction Layer

// Unified Interface:
CommandBuffer::DrawIndexed(std::uint32_t numIndices, std::uint32_t firstIndex);

// OpenGL Implementation:
void GLCommandBuffer::DrawIndexed(std::uint32_t numIndices, std::uint32_t firstIndex)
{
    const GLsizeiptr indices = firstIndex * renderState_.indexBufferStride;
    glDrawElements(
        renderState_.drawMode,
        static_cast<GLsizei>(numIndices),
        renderState_.indexBufferDataType,
        reinterpret_cast<const GLvoid*>(indices)
    );
}

// Direct3D 11 Implementation
void D3D11CommandBuffer::DrawIndexed(std::uint32_t numIndices, std::uint32_t firstIndex)
{
    context_->DrawIndexed(numIndices, firstIndex, 0);
}

// Direct3D 12 Implementation
void D3D12CommandBuffer::DrawIndexed(std::uint32_t numIndices, std::uint32_t firstIndex)
{
    commandList_->DrawIndexedInstanced(numIndices, 1, firstIndex, 0, 0);
}

// Vulkan Implementation
void VKCommandBuffer::DrawIndexed(std::uint32_t numIndices, std::uint32_t firstIndex)
{
    vkCmdDrawIndexed(commandBuffer_, numIndices, 1, firstIndex, 0, 0);
}

About

Low Level Graphics Library (LLGL) is a thin abstraction layer for modern graphics APIs such as OpenGL, Direct3D, and Vulkan

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • C++ 83.7%
  • C 10.0%
  • CMake 1.9%
  • TeX 1.7%
  • Objective-C++ 1.1%
  • GLSL 0.9%
  • Other 0.7%