martyj Posted July 21, 2019 Share Posted July 21, 2019 Texture::SetPixels doesn't work in windows: Linux Screenshot: Windows Screenshot: Code: virtual void RenderBuffer(unsigned char* buffData, int width, int height) { this->texture->SetPixels((const char*)buffData, 0, 0, 0); } I can get Windows to work by manually setting each pixel, but it's hella slow performance. Here is a TGA of what I am trying to render in Linux. (Raw BGRA image format with first 36 bytes being a header) linux_render_21_36.tga TGA for Windows: render_windows2.tga Link to comment Share on other sites More sharing options...
gamecreator Posted July 21, 2019 Share Posted July 21, 2019 The example was flat out crashing for me, as reported in this bug report: https://www.leadwerks.com/community/topic/19037-setpixels-example-crashes/ There definitely seems to be something wrong. Link to comment Share on other sites More sharing options...
martyj Posted July 22, 2019 Author Share Posted July 22, 2019 Please close this topic. I found the issue. It was my mistake. In Windows, Context->GetWidth() is not the same as Window->GetWidth() This caused my texture to be rendered weird. As far as why this worked in Linux compared to Windows, who knows. 1 Link to comment Share on other sites More sharing options...
Recommended Posts