Code Monkey home page Code Monkey logo

refresh's Introduction

Build Status

This is Refresh, an XNA-inspired 3D graphics library with modern capabilities.

License

Refresh is licensed under the zlib license. See LICENSE for details.

About Refresh

Refresh is directly inspired by FNA3D and intended to be a replacement for XNA's Graphics namespace. XNA 4.0 is a powerful API, but its shader system is outdated and certain restrictions are awkward to handle in a modern context. In the way that XNA was "one step above" DX9, Refresh intends to be "one step above" Vulkan. It should map nicely to modern graphics APIs. Refresh will initially have a Vulkan runtime implementation. Support for other APIs like DX12 may come later. For shaders, we consume SPIR-V bytecode.

Dependencies

Refresh depends on SDL2 for portability. Refresh never explicitly uses the C runtime.

Building Refresh

For *nix platforms, use CMake:

$ mkdir build/
$ cd build/
$ cmake ../
$ make

For Windows, use the Refresh.sln in the "visualc" folder.

Want to contribute?

Issues can be reported and patches contributed via Github:

https://github.com/thatcosmonaut/Refresh

refresh's People

Contributors

dawilly avatar glairedaggers avatar thatcosmonaut avatar thespydog avatar

Stargazers

 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

refresh's Issues

standalone example

hi, is there any chance of a basic example in c using refresh straight up in an sdl2 app?

thank you

API Design

Tracking nice-to-haves for figuring out the shape of the new API.

  • Map render objects directly (pipelines, render passes, etc)
  • Separate color and depth buffers
  • Individual RT clears on MRT
  • Specify load/store ops on RTs
  • 3D RTs
  • Surface-to-surface copies
  • Transfer pipeline (async copies, etc)
  • Compute shader support
  • Combined TextureSampler convenience structure
  • Sampler clamp to edge/border

Expose Command Pools/Buffers

We want to let the user take advantage of parallelism by exposing command pools/buffers and changing all draw-related API calls to be command-buffer local.

TODO:

  • Allocate command pools per-thread
  • Rework API for exposed command buffers
  • Thread safety on resources

Cross-Instance Texture Sharing

Figure out how to share texture memory cross-Vulkan instance so we can interface with existing FNA graphics implementations.

Compute Shaders

An oft-requested feature. We will need some way of building compute pipelines and integrating them into the submission.

Vulkan Driver

Documenting the functions we have to implement.

Many of these are low-hanging fruit for contributions! The FNA3D Vulkan Driver will be a great reference for much of this.

If you want to contribute, please drop a reply in this thread or mention cosmonaut on the FNA Discord chat to claim a function.

  • CreateDevice
  • DestroyDevice
  • Clear
  • DrawIndexedPrimitives
  • DrawInstancedPrimitives
  • DrawPrimitives
  • CreateRenderPass
  • CreateGraphicsPipeline
  • CreateSampler
  • CreateFramebuffer
  • CreateShaderModule
  • CreateTexture2D
  • CreateTexture3D
  • CreateTextureCube
  • CreateTextureDepthStencil
  • CreateColorTarget
  • CreateDepthStencilTarget
  • CreateVertexBuffer
  • CreateIndexBuffer
  • SetTextureData2D
  • SetTextureData3D
  • SetTextureDataCube
  • SetTextureDataYUV
  • SetVertexBufferData
  • SetIndexBufferData
  • PushVertexShaderParams
  • PushFragmentShaderParams
  • SetVertexSamplers
  • SetFragmentSamplers
  • GetTextureData2D
  • GetTextureDataCube
  • AddDisposeTexture
  • AddDisposeSampler
  • AddDisposeVertexBuffer
  • AddDisposeIndexBuffer
  • AddDisposeColorTarget
  • AddDisposeDepthStencilTarget
  • AddDisposeFramebuffer
  • AddDisposeShaderModule
  • AddDisposeRenderPass
  • AddDisposeGraphicsPipeline
  • BeginRenderPass
  • EndRenderPass
  • BindGraphicsPipeline
  • BindIndexBuffer
  • BindVertexBuffers
  • QueuePresent
  • Submit

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.