summaryrefslogtreecommitdiff
path: root/indra/newview/llmediactrl.cpp
diff options
context:
space:
mode:
authorAnsariel Hiller <Ansariel@users.noreply.github.com>2024-09-18 16:09:51 +0200
committerGitHub <noreply@github.com>2024-09-18 17:09:51 +0300
commitd9da5bbb33ce70e3bc799ba6696c8b10de0e5f04 (patch)
tree7ac1243cb80d1d11b228508607073b01dce0f88f /indra/newview/llmediactrl.cpp
parent83cf25af8d05897986cfbcf27224bf69fe7544c6 (diff)
Remove quads rendering mode entirely (#2593)
Diffstat (limited to 'indra/newview/llmediactrl.cpp')
-rw-r--r--indra/newview/llmediactrl.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/indra/newview/llmediactrl.cpp b/indra/newview/llmediactrl.cpp
index b39a976ebd..202008f7f9 100644
--- a/indra/newview/llmediactrl.cpp
+++ b/indra/newview/llmediactrl.cpp
@@ -843,7 +843,7 @@ void LLMediaCtrl::draw()
calcOffsetsAndSize(&x_offset, &y_offset, &width, &height);
// draw the browser
- gGL.begin( LLRender::QUADS );
+ gGL.begin(LLRender::TRIANGLES);
if (! media_plugin->getTextureCoordsOpenGL())
{
// render using web browser reported width and height, instead of trying to invert GL scale
@@ -856,6 +856,12 @@ void LLMediaCtrl::draw()
gGL.texCoord2f( 0.f, max_v );
gGL.vertex2i( x_offset, y_offset );
+ gGL.texCoord2f(max_u, 0.f);
+ gGL.vertex2i(x_offset + width, y_offset + height);
+
+ gGL.texCoord2f(0.f, max_v);
+ gGL.vertex2i(x_offset, y_offset);
+
gGL.texCoord2f( max_u, max_v );
gGL.vertex2i( x_offset + width, y_offset );
}
@@ -871,6 +877,12 @@ void LLMediaCtrl::draw()
gGL.texCoord2f( 0.f, 0.f );
gGL.vertex2i( x_offset, y_offset );
+ gGL.texCoord2f(max_u, max_v);
+ gGL.vertex2i(x_offset + width, y_offset + height);
+
+ gGL.texCoord2f(0.f, 0.f);
+ gGL.vertex2i(x_offset, y_offset);
+
gGL.texCoord2f( max_u, 0.f );
gGL.vertex2i( x_offset + width, y_offset );
}