aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llbox.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/newview/llbox.cpp')
-rw-r--r--linden/indra/newview/llbox.cpp28
1 files changed, 15 insertions, 13 deletions
diff --git a/linden/indra/newview/llbox.cpp b/linden/indra/newview/llbox.cpp
index bbab7c4..49dacc1 100644
--- a/linden/indra/newview/llbox.cpp
+++ b/linden/indra/newview/llbox.cpp
@@ -34,6 +34,7 @@
34#include "llbox.h" 34#include "llbox.h"
35 35
36#include "llgl.h" 36#include "llgl.h"
37#include "llglimmediate.h"
37#include "llglheaders.h" 38#include "llglheaders.h"
38 39
39LLBox gBox; 40LLBox gBox;
@@ -61,7 +62,7 @@ void LLBox::cleanupGL()
61 62
62void LLBox::renderface(S32 which_face) 63void LLBox::renderface(S32 which_face)
63{ 64{
64 static F32 normals[6][3] = 65 /*static F32 normals[6][3] =
65 { 66 {
66 {-1.0f, 0.0f, 0.0f}, 67 {-1.0f, 0.0f, 0.0f},
67 { 0.0f, 1.0f, 0.0f}, 68 { 0.0f, 1.0f, 0.0f},
@@ -69,7 +70,7 @@ void LLBox::renderface(S32 which_face)
69 { 0.0f, -1.0f, 0.0f}, 70 { 0.0f, -1.0f, 0.0f},
70 { 0.0f, 0.0f, 1.0f}, 71 { 0.0f, 0.0f, 1.0f},
71 { 0.0f, 0.0f, -1.0f} 72 { 0.0f, 0.0f, -1.0f}
72 }; 73 };*/
73 static S32 faces[6][4] = 74 static S32 faces[6][4] =
74 { 75 {
75 {0, 1, 2, 3}, 76 {0, 1, 2, 3},
@@ -80,17 +81,17 @@ void LLBox::renderface(S32 which_face)
80 {7, 4, 0, 3} 81 {7, 4, 0, 3}
81 }; 82 };
82 83
83 glBegin(GL_QUADS); 84 gGL.begin(GL_QUADS);
84 glNormal3fv(&normals[which_face][0]); 85 //gGL.normal3fv(&normals[which_face][0]);
85 glTexCoord2f(1,0); 86 gGL.texCoord2f(1,0);
86 glVertex3fv(&mVertex[ faces[which_face][0] ][0]); 87 gGL.vertex3fv(&mVertex[ faces[which_face][0] ][0]);
87 glTexCoord2f(1,1); 88 gGL.texCoord2f(1,1);
88 glVertex3fv(&mVertex[ faces[which_face][1] ][0]); 89 gGL.vertex3fv(&mVertex[ faces[which_face][1] ][0]);
89 glTexCoord2f(0,1); 90 gGL.texCoord2f(0,1);
90 glVertex3fv(&mVertex[ faces[which_face][2] ][0]); 91 gGL.vertex3fv(&mVertex[ faces[which_face][2] ][0]);
91 glTexCoord2f(0,0); 92 gGL.texCoord2f(0,0);
92 glVertex3fv(&mVertex[ faces[which_face][3] ][0]); 93 gGL.vertex3fv(&mVertex[ faces[which_face][3] ][0]);
93 glEnd(); 94 gGL.end();
94} 95}
95 96
96void LLBox::render() 97void LLBox::render()
@@ -125,4 +126,5 @@ void LLBox::render()
125 renderface(2); 126 renderface(2);
126 renderface(1); 127 renderface(1);
127 renderface(0); 128 renderface(0);
129 gGL.flush();
128} 130}