For some reason Urho3D’s image loader is unable to load my .png file, so I used lodePNG. It worked fine but I’m having a hard to creating a texture over it.
I Make an Urho3D::Image Set the image’s pixels based on the unsigned char array (lodePNG repeats array as RGBARGBARGBA)
This works fine as I have some pixel colors logged and they seem to be unique.
I then make a new Texture2D and set it’s data to the image.
This is where it breaks I believe.
In the logs it says
ERROR: No texture created, can not set data
and if it’s concerning this is how I make the texture (Seems right)
ur::Texture2D *tex = new ur::Texture2D(context_);
tex->SetNumLevels(1);
tex->SetData(0,0,0, width, height, image->GetData());
Am I doing it wrong possibly?