History

Fix for billboards.

Andrzej Kapolka committed 12 years ago

Commit aeb424c1 parent 034870e6 files · +66 −55Browse files

Showing the changes to interface/src/Application.cpp (1 of 6 files). Show all

Unified · Split

interface/src/Application.cpp+4−3
@@ -2730,7 +2730,8 @@ void Application::setupWorldLight() { · 2729 unmodified lines
2730QImage Application::renderAvatarBillboard() {2730QImage Application::renderAvatarBillboard() {
2731 _textureCache.getPrimaryFramebufferObject()->bind();2731 _textureCache.getPrimaryFramebufferObject()->bind();
2732 2732
2733 glDisable(GL_BLEND);2733 // the "glow" here causes an alpha of one
2734 Glower glower;
2734 2735
2735 const int BILLBOARD_SIZE = 64;2736 const int BILLBOARD_SIZE = 64;
2736 renderRearViewMirror(QRect(0, _glWidget->getDeviceHeight() - BILLBOARD_SIZE, BILLBOARD_SIZE, BILLBOARD_SIZE), true);2737 renderRearViewMirror(QRect(0, _glWidget->getDeviceHeight() - BILLBOARD_SIZE, BILLBOARD_SIZE, BILLBOARD_SIZE), true);
@@ -2738,10 +2739,10 @@ QImage Application::renderAvatarBillboard() { · 1 unmodified line
2738 QImage image(BILLBOARD_SIZE, BILLBOARD_SIZE, QImage::Format_ARGB32);2739 QImage image(BILLBOARD_SIZE, BILLBOARD_SIZE, QImage::Format_ARGB32);
2739 glReadPixels(0, 0, BILLBOARD_SIZE, BILLBOARD_SIZE, GL_BGRA, GL_UNSIGNED_BYTE, image.bits());2740 glReadPixels(0, 0, BILLBOARD_SIZE, BILLBOARD_SIZE, GL_BGRA, GL_UNSIGNED_BYTE, image.bits());
2740 2741
2741 glEnable(GL_BLEND);
2742
2743 _textureCache.getPrimaryFramebufferObject()->release();2742 _textureCache.getPrimaryFramebufferObject()->release();
2744 2743
2744 image.save("billboard.png");
2745
2745 return image;2746 return image;
2746}2747}
2747 2748

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t