Hi. I wish set cursor icon from sprite frame. It worked, but cursor pixels is mixed. Where is my bug?
Code:
clan::Texture2D texture = pointer.get_frame_texture(0).get_texture();
clan::PixelBuffer buffer = texture.get_pixeldata(canvas.get_gc());
buffer.lock(canvas.get_gc(), clan::BufferAccess::access_read_only);
clan::CursorDescription description;
description.add_frame(buffer);
clan::Cursor cursor = clan::Cursor(window, description);
window.set_cursor(cursor);
clan::Image created in this way is drawn correctly
Bookmarks