diff options
author | Juan Linietsky <reduzio@gmail.com> | 2016-10-03 16:33:42 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2016-10-03 21:35:16 +0200 |
commit | 22d83bc9f655d5ae7a1b49709c4c1b663725daf5 (patch) | |
tree | a817195c08d4713a70ca014a3f63f5937934fe36 /scene/resources/bit_mask.cpp | |
parent | 78d97b060a6873a454e710380cb9ef1bde5e4c65 (diff) |
Begining of GLES3 renderer:
-Most 2D drawing is implemented
-Missing shaders
-Missing all 3D
-Editor needs to be set on update always to be used, otherwise it does not refresh
-Large parts of editor not working
Diffstat (limited to 'scene/resources/bit_mask.cpp')
-rw-r--r-- | scene/resources/bit_mask.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/scene/resources/bit_mask.cpp b/scene/resources/bit_mask.cpp index f5bfce3ef8..57dc39138a 100644 --- a/scene/resources/bit_mask.cpp +++ b/scene/resources/bit_mask.cpp @@ -45,8 +45,8 @@ void BitMap::create_from_image_alpha(const Image& p_image){ ERR_FAIL_COND(p_image.empty()); Image img=p_image; - img.convert(Image::FORMAT_INTENSITY); - ERR_FAIL_COND(img.get_format()!=Image::FORMAT_INTENSITY); + img.convert(Image::FORMAT_LA8); + ERR_FAIL_COND(img.get_format()!=Image::FORMAT_LA8); create(Size2(img.get_width(),img.get_height())); @@ -58,7 +58,7 @@ void BitMap::create_from_image_alpha(const Image& p_image){ int bbyte = i/8; int bbit = i % 8; - if (r[i]) + if (r[i*2]) w[bbyte]|=(1<<bbit); } @@ -193,7 +193,6 @@ void BitMap::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::DICTIONARY,"data",PROPERTY_HINT_NONE,"",PROPERTY_USAGE_NOEDITOR),_SCS("_set_data"),_SCS("_get_data")); - } BitMap::BitMap() { |