mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 08:37:19 +02:00
Enable/Disable texture for avatar billboards
This commit is contained in:
parent
d3eaa4755c
commit
8eeb5e435c
1 changed files with 2 additions and 0 deletions
|
@ -613,6 +613,7 @@ void Avatar::renderBillboard(RenderArgs* renderArgs) {
|
|||
float size = getBillboardSize();
|
||||
|
||||
gpu::Batch& batch = *renderArgs->_batch;
|
||||
batch._glEnable(GL_TEXTURE_2D);
|
||||
batch._glBindTexture(GL_TEXTURE_2D, _billboardTexture->getID());
|
||||
|
||||
Transform transform;
|
||||
|
@ -628,6 +629,7 @@ void Avatar::renderBillboard(RenderArgs* renderArgs) {
|
|||
DependencyManager::get<GeometryCache>()->renderQuad(topLeft, bottomRight, texCoordTopLeft, texCoordBottomRight,
|
||||
glm::vec4(1.0f, 1.0f, 1.0f, 1.0f));
|
||||
batch._glBindTexture(GL_TEXTURE_2D, 0);
|
||||
batch._glDisable(GL_TEXTURE_2D);
|
||||
}
|
||||
|
||||
float Avatar::getBillboardSize() const {
|
||||
|
|
Loading…
Reference in a new issue