diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index bae2df1..8edd240 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -18,8 +18,8 @@ jobs: fail-fast: false matrix: version: - - '1.9' - - 'nightly' + - '1.10' + - '1.11' os: - ubuntu-latest arch: diff --git a/src/WGPUCanvas.jl b/src/WGPUCanvas.jl index e0884d6..7b1ed90 100644 --- a/src/WGPUCanvas.jl +++ b/src/WGPUCanvas.jl @@ -33,7 +33,7 @@ end struct ErrorCanvas <: AbstractWGPUCanvas end -function WGPUCore.getCanvas(s::Symbol, size::Tuple{Int, Int} = (500,500)) +function WGPUCore.getCanvas(s::Symbol, size::Tuple{Int, Int} = (1080, 900)) canv = if s==:OFFSCREEN OffscreenCanvas elseif s==:GLFW diff --git a/src/glfwWindows.jl b/src/glfwWindows.jl index d245554..534ac62 100644 --- a/src/glfwWindows.jl +++ b/src/glfwWindows.jl @@ -41,18 +41,18 @@ function defaultCanvas(::Type{GLFWWinCanvas}, size::Tuple{Int, Int}) hinstance = GetModuleHandle(C_NULL) winSurfaceRef = cStruct( - WGPUSurfaceDescriptorFromWindowsHWND; + WGPUSurfaceSourceWindowsHWND; chain = cStruct( WGPUChainedStruct; next = C_NULL, - sType = WGPUSType_SurfaceDescriptorFromWindowsHWND, + sType = WGPUSType_SurfaceSourceWindowsHWND, ) |> concrete, hinstance = hinstance, hwnd = winHandleRef[] ) surfaceDescriptorRef = cStruct( WGPUSurfaceDescriptor; - label = C_NULL, + label = WGPUStringView(C_NULL, 0), nextInChain = winSurfaceRef |> ptr, ) instance = WGPUCore.getWGPUInstance() diff --git a/src/metalglfw.jl b/src/metalglfw.jl index 7bfdcdc..766826e 100644 --- a/src/metalglfw.jl +++ b/src/metalglfw.jl @@ -68,17 +68,17 @@ function defaultCanvas(::Type{GLFWMacCanvas}, size::Tuple{Int, Int}) setMetalLayer(nswindow[], metalLayer[]) metalSurfaceRef = cStruct( - WGPUSurfaceDescriptorFromMetalLayer; + WGPUSurfaceSourceMetalLayer; chain = cStruct( WGPUChainedStruct; next = C_NULL, - sType = WGPUSType_SurfaceDescriptorFromMetalLayer, + sType = WGPUSType_SurfaceSourceMetalLayer, ) |> concrete, layer = metalLayer[], ) surfaceDescriptorRef = cStruct( WGPUSurfaceDescriptor; - label = C_NULL, + label = WGPUStringView(C_NULL, 0), nextInChain = metalSurfaceRef |> ptr, ) instance = WGPUCore.getWGPUInstance() diff --git a/src/offscreen.jl b/src/offscreen.jl index 350deb8..21c6a28 100644 --- a/src/offscreen.jl +++ b/src/offscreen.jl @@ -66,7 +66,7 @@ function getContext(gpuCanvas::OffscreenCanvas) nothing, # currentTexture::Any nothing, # currentTextureView::Any nothing, # format::WGPUTextureFormat - WGPUCore.getEnum(WGPUTextureUsage, ["RenderAttachment"]), # usage::WGPUTextureUsage + WGPUTextureUsage_RenderAttachment, # usage::WGPUTextureUsage nothing, # compositingAlphaMode::Any nothing, # size::Any (500, 500), # physicalSize::Any @@ -144,7 +144,7 @@ function createNewTextureMaybe(canvasCntxt::GPUCanvasContextOffscreen) 1, WGPUCore.getEnum(WGPUTextureDimension, "2D"), canvasCntxt.format, - canvasCntxt.usage | WGPUCore.getEnum(WGPUTextureUsage, "CopySrc"), + WGPUTextureUsage(canvasCntxt.usage | WGPUCore.getEnum(WGPUTextureUsage, "CopySrc")), ) canvasCntxt.currentTextureView = WGPUCore.createView(canvasCntxt.currentTexture) end