Skip to content

Commit c99f051

Browse files
committed
updating surface changes with upstream v24.0.0.1
1 parent af910fb commit c99f051

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/glfwWindows.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,18 +41,18 @@ function defaultCanvas(::Type{GLFWWinCanvas}, size::Tuple{Int, Int})
4141
hinstance = GetModuleHandle(C_NULL)
4242
winSurfaceRef =
4343
cStruct(
44-
WGPUSurfaceDescriptorFromWindowsHWND;
44+
WGPUSurfaceSourceWindowsHWND;
4545
chain = cStruct(
4646
WGPUChainedStruct;
4747
next = C_NULL,
48-
sType = WGPUSType_SurfaceDescriptorFromWindowsHWND,
48+
sType = WGPUSType_SurfaceSourceWindowsHWND,
4949
) |> concrete,
5050
hinstance = hinstance,
5151
hwnd = winHandleRef[]
5252
)
5353
surfaceDescriptorRef = cStruct(
5454
WGPUSurfaceDescriptor;
55-
label = C_NULL,
55+
label = WGPUStringView(C_NULL, 0),
5656
nextInChain = winSurfaceRef |> ptr,
5757
)
5858
instance = WGPUCore.getWGPUInstance()

src/offscreen.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ function getContext(gpuCanvas::OffscreenCanvas)
6666
nothing, # currentTexture::Any
6767
nothing, # currentTextureView::Any
6868
nothing, # format::WGPUTextureFormat
69-
WGPUCore.getEnum(WGPUTextureUsage, ["RenderAttachment"]), # usage::WGPUTextureUsage
69+
WGPUTextureUsage_RenderAttachment, # usage::WGPUTextureUsage
7070
nothing, # compositingAlphaMode::Any
7171
nothing, # size::Any
7272
(500, 500), # physicalSize::Any
@@ -144,7 +144,7 @@ function createNewTextureMaybe(canvasCntxt::GPUCanvasContextOffscreen)
144144
1,
145145
WGPUCore.getEnum(WGPUTextureDimension, "2D"),
146146
canvasCntxt.format,
147-
canvasCntxt.usage | WGPUCore.getEnum(WGPUTextureUsage, "CopySrc"),
147+
WGPUTextureUsage(canvasCntxt.usage | WGPUCore.getEnum(WGPUTextureUsage, "CopySrc")),
148148
)
149149
canvasCntxt.currentTextureView = WGPUCore.createView(canvasCntxt.currentTexture)
150150
end

0 commit comments

Comments
 (0)