Remove duplicate code
This commit is contained in:
@@ -567,6 +567,14 @@ export function set_current_texture(texture: GPUTexture) {
|
||||
current_texture = texture;
|
||||
}
|
||||
|
||||
// draws with texture from now on, flushing what was batched with another one first
|
||||
export function use_texture(texture: GPUTexture) {
|
||||
if (current_texture !== texture) {
|
||||
flush_batch();
|
||||
current_texture = texture;
|
||||
}
|
||||
}
|
||||
|
||||
export function create_texture(width: number, height: number): GPUTexture {
|
||||
return device.createTexture({
|
||||
size: [width, height],
|
||||
|
||||
Reference in New Issue
Block a user