9 slice
This commit is contained in:
@@ -959,7 +959,7 @@ function calc_image_size(img)
|
||||
return [img.texture.width*img.rect.width, img.texture.height*img.rect.height];
|
||||
}
|
||||
|
||||
render.tile = function tile(image, rect = [0,0], color = Color.white)
|
||||
function tile(image, rect = [0,0], color = Color.white)
|
||||
{
|
||||
if (!image) throw Error ('Need an image to render.')
|
||||
if (typeof image === "string")
|
||||
|
||||
@@ -3454,6 +3454,7 @@ switch (sfmt) {
|
||||
case SDL_PIXELFORMAT_XRGB8888:
|
||||
case SDL_PIXELFORMAT_XBGR8888:
|
||||
chosen_format = SDL_GPU_TEXTUREFORMAT_R8G8B8A8_UNORM;
|
||||
break;
|
||||
|
||||
case SDL_PIXELFORMAT_RGBA4444:
|
||||
case SDL_PIXELFORMAT_ABGR4444:
|
||||
@@ -4209,7 +4210,7 @@ JSC_CCALL(gpu_upload,
|
||||
return JS_ThrowReferenceError(js, "Failed to begin copy pass");
|
||||
}
|
||||
|
||||
void *mapped_data = SDL_MapGPUTransferBuffer(gpu, transfer, true);
|
||||
void *mapped_data = SDL_MapGPUTransferBuffer(gpu, transfer, false);
|
||||
if (!mapped_data) {
|
||||
SDL_EndGPUCopyPass(copy_pass);
|
||||
free(items);
|
||||
@@ -4239,7 +4240,7 @@ JSC_CCALL(gpu_upload,
|
||||
.offset = 0,
|
||||
.size = items[i].size
|
||||
},
|
||||
true
|
||||
false
|
||||
);
|
||||
current_offset += items[i].size;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user