mirror of
https://github.com/edubart/otclient.git
synced 2025-10-18 21:43:26 +02:00
...
This commit is contained in:
@@ -145,7 +145,7 @@ std::vector<uint8> Texture::getPixels()
|
||||
// NOTE: this can be slow, but its the only way to get pixels from a texture in OpenGL ES
|
||||
FrameBufferPtr fb(new FrameBuffer(m_size));
|
||||
fb->bind();
|
||||
fb->clear(Fw::alpha);
|
||||
fb->clear(Color::alpha);
|
||||
g_painter.saveAndResetState();
|
||||
g_painter.drawTexturedRect(Rect(0,0,m_size), shared_from_this());
|
||||
glReadPixels(0, 0, m_size.width(), m_size.height(), GL_RGBA, GL_UNSIGNED_BYTE, &pixels[0]);
|
||||
|
Reference in New Issue
Block a user