Skip to content

aonorin/kaleido3d

 
 

Repository files navigation

Introduction

kaleido3d is a cross-platform graphics library.

Main Feature

  • Next Generation Graphics Library
  • Modern C++ Code
  • Modern Graphics Renderer (Metal, Vulkan, Direct3D 12, OpenGL|ES)
  • Maya Digital Content Creation Tools
  • Task-Oriented, support multi-thread rendering
  • Support Windows, Android, iOS, MacOS & Linux.

Prerequisites

Windows Android MacOS/iOS
CI Status Build status Circle CI Build Status
IDE VS2015+ Android Studio 2.2+ Xcode 8.1+
OS Requirements Win10 Android 7.+ MacOS Sierra
Dependency ThirdParty/CMake 3.4+ ThirdParty/NDK r12+/Gradle ThirdParty/CMake 3.4+

Build Instructions

  • Windows: make.bat
  • Mac OS X: ./make_macos.sh
  • Android: (./)gradlew build

Current Status

  • RHI(Render Hardware Interface)

    • Vulkan backend ready.
    • DirectX 12 backend WIP
    • Metal backend WIP
  • Core.Platform

    • Windows implementation ready.
    • Android RendererView.
    • iOS/MacOS WIP.
  • Tools

    • HLSL ShaderCompiler (D3DCompiler & GLSLANG)
    • Maya exporter.
  • Planned Samples

    • Triangle
    • Textured Cube
    • Compute Shader (WIP)
    • Physically Based Shading (Material Model)
    • Skinned Skeleton Animation
    • Shadow Mapping (Render To Texture, Z-Pass)
    • Deferred Shading (Multi-RenderTarget)
    • Tile-Based Cluster Lighting (Compute Shading)
    • Multi-Thread Rendering
    • Multi-GPU/CrossAdapter Rendering
    • Cross Shader Language Compiler
    • Hand-writing Recognition CNN Sample (GPGPU)

Current Architecture

arch


Documents

Note: This project is under MIT License.


RHI Sample Code

Draw a triangle

RHIDevices[Global Variable]
RHIQueues[Global]
-- PerThreadCode
rhi::PipelineDesc pipelineDesc = {shaders, raster, depthStencil...};
rhi::IPipelineState pState = device->NewPipelineState(pipelineDesc);
rhi::ICommandContext* gfxCmd = CommandContext::Begin(pDevice, pQueue);
	gfxCmd->Begin();
	gfxCmd->SetPipelineLayout(m_pl);
	rhi::Rect rect{ 0,0, (long)m_Viewport->GetWidth(), (long)m_Viewport->GetHeight() };
	gfxCmd->SetRenderTarget(pRT);
	gfxCmd->SetScissorRects(1, &rect);
	gfxCmd->SetViewport(rhi::ViewportDesc(m_Viewport->GetWidth(), m_Viewport->GetHeight()));
	gfxCmd->SetPipelineState(0, m_pPso);
	gfxCmd->SetIndexBuffer(m_TriMesh->IBO());
	gfxCmd->SetVertexBuffer(0, m_TriMesh->VBO());
	gfxCmd->DrawIndexedInstanced(rhi::DrawIndexedInstancedParam(3, 1));
	gfxCmd->EndRendering();
	gfxCmd->TransitionResourceBarrier(pRT->GetBackBuffer(), rhi::ERS_RenderTarget, rhi::ERS_Present);
	gfxCmd->End();
gfxCmd->FlushAndWait();
--
swapChain.Present(pQueue, pImage, pWindow[, semaphore])

Samples

1.Triangle(Basic)

Triangle Screenshot

2.TexturedCube(Basic)

Cube Screenshot


Contact

If you have any suggestion, please contact me via email .

Discuss Join the chat at https://gitter.im/TsinStudio/kaleido3d

Please join the gitter chat or QQ Group to discuss on this project. Framework development discussions and thorough bug reports are collected on Issues.

About

A Cross Platform 3D Renderer (DX12, Metal, Vulkan, OpenGL) ...branch still unstable, don't fork ME.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 70.3%
  • C 14.9%
  • CMake 4.3%
  • CSS 4.1%
  • Objective-C++ 2.1%
  • Objective-C 1.3%
  • Other 3.0%