summaryrefslogtreecommitdiff
path: root/modules/assimp
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2019-06-11 15:43:37 -0300
committerJuan Linietsky <reduzio@gmail.com>2020-02-11 11:53:26 +0100
commit3f335ce3d446372eeb9ed87f7e117099c4d2dd6a (patch)
tree669db7ddb21f328215a9c26e9bdaf2565db8c853 /modules/assimp
parent9ffe57a10eecf79ab8df2f0497d0387383755df3 (diff)
Texture refactor
-Texture renamed to Texture2D -TextureLayered as base now inherits 2Darray, cubemap and cubemap array -Removed all references to flags in textures (they will go in the shader) -Texture3D gone for now (will come back later done properly) -Create base rasterizer for RenderDevice, RasterizerRD
Diffstat (limited to 'modules/assimp')
-rw-r--r--modules/assimp/import_utils.h16
1 files changed, 10 insertions, 6 deletions
diff --git a/modules/assimp/import_utils.h b/modules/assimp/import_utils.h
index c522b01727..0eb055956b 100644
--- a/modules/assimp/import_utils.h
+++ b/modules/assimp/import_utils.h
@@ -189,7 +189,7 @@ public:
}
/**
- * Converts aiMatrix4x4 to godot Transform
+ * Converts aiMatrix4x4 to godot Transform
*/
static const Transform assimp_matrix_transform(const aiMatrix4x4 p_matrix) {
aiMatrix4x4 matrix = p_matrix;
@@ -322,15 +322,18 @@ public:
ERR_FAIL_COND(map_mode == NULL);
aiTextureMapMode tex_mode = map_mode[0];
- int32_t flags = Texture::FLAGS_DEFAULT;
+ // FIXME: Commented out during Vulkan port.
+ /*
+ int32_t flags = Texture2D::FLAGS_DEFAULT;
if (tex_mode == aiTextureMapMode_Wrap) {
//Default
} else if (tex_mode == aiTextureMapMode_Clamp) {
- flags = flags & ~Texture::FLAG_REPEAT;
+ flags = flags & ~Texture2D::FLAG_REPEAT;
} else if (tex_mode == aiTextureMapMode_Mirror) {
- flags = flags | Texture::FLAG_MIRRORED_REPEAT;
+ flags = flags | Texture2D::FLAG_MIRRORED_REPEAT;
}
texture->set_flags(flags);
+ */
}
/**
@@ -391,7 +394,7 @@ public:
}
return Ref<Image>();
} else {
- Ref<Texture> texture = ResourceLoader::load(p_path);
+ Ref<Texture2D> texture = ResourceLoader::load(p_path);
ERR_FAIL_COND_V(texture.is_null(), Ref<Image>());
Ref<Image> image = texture->get_data();
ERR_FAIL_COND_V(image.is_null(), Ref<Image>());
@@ -418,7 +421,8 @@ public:
if (image_state.raw_image.is_valid()) {
image_state.texture.instance();
image_state.texture->create_from_image(image_state.raw_image);
- image_state.texture->set_storage(ImageTexture::STORAGE_COMPRESS_LOSSY);
+ // FIXME: Commented out during Vulkan port.
+ //image_state.texture->set_storage(ImageTexture::STORAGE_COMPRESS_LOSSY);
return true;
}
}