Custom material support seems complete.
This commit is contained in:
parent
8bbbb97336
commit
0586e18449
53 changed files with 1339 additions and 205 deletions
|
|
@ -1215,7 +1215,7 @@ void Image::flip_x() {
|
|||
}
|
||||
}
|
||||
|
||||
int Image::_get_dst_image_size(int p_width, int p_height, Format p_format, int &r_mipmaps, int p_mipmaps) {
|
||||
int Image::_get_dst_image_size(int p_width, int p_height, Format p_format, int &r_mipmaps, int p_mipmaps, int *r_mm_width, int *r_mm_height) {
|
||||
|
||||
int size = 0;
|
||||
int w = p_width;
|
||||
|
|
@ -1242,6 +1242,13 @@ int Image::_get_dst_image_size(int p_width, int p_height, Format p_format, int &
|
|||
|
||||
size += s;
|
||||
|
||||
if (r_mm_width) {
|
||||
*r_mm_width = bw;
|
||||
}
|
||||
if (r_mm_height) {
|
||||
*r_mm_height = bh;
|
||||
}
|
||||
|
||||
if (p_mipmaps >= 0 && mm == p_mipmaps)
|
||||
break;
|
||||
|
||||
|
|
@ -1914,6 +1921,13 @@ int Image::get_image_required_mipmaps(int p_width, int p_height, Format p_format
|
|||
return mm;
|
||||
}
|
||||
|
||||
Size2i Image::get_image_mipmap_size(int p_width, int p_height, Format p_format, int p_mipmap) {
|
||||
int mm;
|
||||
Size2i ret;
|
||||
_get_dst_image_size(p_width, p_height, p_format, mm, p_mipmap, &ret.x, &ret.y);
|
||||
return ret;
|
||||
}
|
||||
|
||||
int Image::get_image_mipmap_offset(int p_width, int p_height, Format p_format, int p_mipmap) {
|
||||
|
||||
if (p_mipmap <= 0) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue