≈ the.bay.news

Proper way to assign to *anyopaque

Ziggit
Proper way to assign to *anyopaque
I’m trying to assign to a void * handed to me from sdl. Assigning to the dereferenced pointer is a type mismatch. @memset expects dest to be a slice. Is there an idiomatic way to do this kind of assignment? Can I cast *anyopaque to a slice with a runtime-known size? Thanks in advance const mappedTransferBuffer = sdl.SDL_MapGPUTransferBuffer(device, vertexTransferBuffer, false); if(mappedTransferBuffer == null) sdl_err(); //@memset(mappedTransferBuffer.?, vertexData); mappedTransferBuffer.?.* = ...

0 comments

Sign in to join the discussion — your thebay.events account works here.

No comments yet.