Jump to content

Texture::SetPixels doesn't work in Windows in Leadwerks 4.6


Recommended Posts

Texture::SetPixels doesn't work in windows:

Linux Screenshot:

linux.thumb.png.e33fafee9e15199fb3562f13357a02f5.png

 

Windows Screenshot:

 

windows.thumb.png.1872bfcead531ee8cf96d9ab37ab8245.png

imageproxy.php?img=&key=93667c899a2c8479imageproxy.php?img=&key=93667c899a2c8479Code:
 

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

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.
 

  • Haha 1
Link to comment
Share on other sites

  • Josh locked this topic
Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...