mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-16 08:27:05 +00:00
Rename nxt -> dawn for dawn_wsi.h declarations
Also does the initial complete formatting of files in src/include
This commit is contained in:
committed by
Corentin Wallez
parent
3e371b146d
commit
05c90ee4cb
@@ -16,8 +16,8 @@
|
||||
#define COMMON_SWAPCHAINUTILS_H_
|
||||
|
||||
template <typename T>
|
||||
nxtSwapChainImplementation CreateSwapChainImplementation(T* swapChain) {
|
||||
nxtSwapChainImplementation impl = {};
|
||||
dawnSwapChainImplementation CreateSwapChainImplementation(T* swapChain) {
|
||||
dawnSwapChainImplementation impl = {};
|
||||
impl.userData = swapChain;
|
||||
impl.Init = [](void* userData, void* wsiContext) {
|
||||
auto* ctx = reinterpret_cast<typename T::WSIContext*>(wsiContext);
|
||||
@@ -28,7 +28,7 @@ nxtSwapChainImplementation CreateSwapChainImplementation(T* swapChain) {
|
||||
uint32_t width, uint32_t height) {
|
||||
return reinterpret_cast<T*>(userData)->Configure(format, allowedUsage, width, height);
|
||||
};
|
||||
impl.GetNextTexture = [](void* userData, nxtSwapChainNextTexture* nextTexture) {
|
||||
impl.GetNextTexture = [](void* userData, dawnSwapChainNextTexture* nextTexture) {
|
||||
return reinterpret_cast<T*>(userData)->GetNextTexture(nextTexture);
|
||||
};
|
||||
impl.Present = [](void* userData) { return reinterpret_cast<T*>(userData)->Present(); };
|
||||
|
||||
Reference in New Issue
Block a user