You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-07 12:30:27 +00:00
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
This commit is contained in:
@@ -787,10 +787,10 @@ bool CurvePreviewGenerator::handles(const String &p_type) const {
|
||||
return p_type == "Curve";
|
||||
}
|
||||
|
||||
Ref<Texture> CurvePreviewGenerator::generate(const Ref<Resource> &p_from, const Size2 &p_size) const {
|
||||
Ref<Texture2D> CurvePreviewGenerator::generate(const Ref<Resource> &p_from, const Size2 &p_size) const {
|
||||
|
||||
Ref<Curve> curve_ref = p_from;
|
||||
ERR_FAIL_COND_V_MSG(curve_ref.is_null(), Ref<Texture>(), "It's not a reference to a valid Resource object.");
|
||||
ERR_FAIL_COND_V_MSG(curve_ref.is_null(), Ref<Texture2D>(), "It's not a reference to a valid Resource object.");
|
||||
Curve &curve = **curve_ref;
|
||||
|
||||
// FIXME: Should be ported to use p_size as done in b2633a97
|
||||
@@ -848,6 +848,6 @@ Ref<Texture> CurvePreviewGenerator::generate(const Ref<Resource> &p_from, const
|
||||
|
||||
Ref<ImageTexture> ptex = Ref<ImageTexture>(memnew(ImageTexture));
|
||||
|
||||
ptex->create_from_image(img_ref, 0);
|
||||
ptex->create_from_image(img_ref);
|
||||
return ptex;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user