0 votes

I really love this engine, the system and document are friendly.
I tried to create a new image and change the pixel on it, it ran well on pc and mac, but when I export it and ran on my iPhone6, it went crash. My godot engine version is 3.0.2-stable.
Here is my code.

Ref<Image> white = memnew(Image(datatextureW, datatextureH, 0, Image::FORMAT_RGB8, wt));
    datatexture = VS::get_singleton()->texture_create();
    VS::get_singleton()->texture_allocate(datatexture, datatextureW, datatextureH, Image::FORMAT_RGB8, 0);
    VS::get_singleton()->texture_set_data(datatexture, white);
    Ref<Image> white1 = VS::get_singleton()->texture_get_data(datatexture);
    white1->lock(); // went crash
    white1->unlock();

It went crash in lock() function.
Could you Please tell me how to fix it, thank you very much.

in Engine by (12 points)

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.