Huge renderer update (WIP). Still plenty to do, especially pertaining to UI.

-Nametag bubble visbility is oddly inconsistent. May vanish with future planned UI merges...
-VBOs are PAINFULLY slow on ATI hardware. This repos self-compiled davep/shining-fixes branch, so I'll leave the ball in LL's court for now regarding that.
This commit is contained in:
Shyotl
2011-12-09 14:02:29 -06:00
parent 8e7733b2ce
commit ffb285c6ff
499 changed files with 22321 additions and 12356 deletions

View File

@@ -33,6 +33,7 @@
#include "llviewborder.h"
#include "llrender.h"
#include "llfocusmgr.h"
#include "lluiimage.h"
static LLRegisterWidget<LLViewBorder> r("view_border");
@@ -96,18 +97,9 @@ void LLViewBorder::draw()
llassert( FALSE ); // not implemented
}
}
else
if( STYLE_TEXTURE == mStyle )
{
if( mTexture )
{
drawTextures();
}
}
// draw the children
LLView::draw();
}
void LLViewBorder::drawOnePixelLines()
@@ -223,56 +215,6 @@ void LLViewBorder::drawTwoPixelLines()
gl_line_2d(left+1, bottom+1, right-1, bottom+1);
}
void LLViewBorder::drawTextures()
{
//LLGLSUIDefault gls_ui;
//llassert( FALSE ); // TODO: finish implementing
//gGL.color4fv(UI_VERTEX_COLOR.mV);
//gGL.getTexUnit(0)->bind(mTexture);
//gGL.getTexUnit(0)->setTextureAddressMode(LLTexUnit::TAM_WRAP);
//drawTextureTrapezoid( 0.f, mBorderWidth, getRect().getWidth(), 0, 0 );
//drawTextureTrapezoid( 90.f, mBorderWidth, getRect().getHeight(), (F32)getRect().getWidth(),0 );
//drawTextureTrapezoid( 180.f, mBorderWidth, getRect().getWidth(), (F32)getRect().getWidth(),(F32)getRect().getHeight() );
//drawTextureTrapezoid( 270.f, mBorderWidth, getRect().getHeight(), 0, (F32)getRect().getHeight() );
}
void LLViewBorder::drawTextureTrapezoid( F32 degrees, S32 width, S32 length, F32 start_x, F32 start_y )
{
gGL.pushMatrix();
{
gGL.translatef(start_x, start_y, 0.f);
gGL.rotatef( degrees, 0, 0, 1 );
gGL.begin(LLRender::QUADS);
{
// width, width /---------\ length-width, width //
// / \ //
// / \ //
// /---------------\ //
// 0,0 length, 0 //
gGL.texCoord2f( 0, 0 );
gGL.vertex2i( 0, 0 );
gGL.texCoord2f( (GLfloat)length, 0 );
gGL.vertex2i( length, 0 );
gGL.texCoord2f( (GLfloat)(length - width), (GLfloat)width );
gGL.vertex2i( length - width, width );
gGL.texCoord2f( (GLfloat)width, (GLfloat)width );
gGL.vertex2i( width, width );
}
gGL.end();
}
gGL.popMatrix();
}
BOOL LLViewBorder::getBevelFromAttribute(LLXMLNodePtr node, LLViewBorder::EBevel& bevel_style)
{
if (node->hasAttribute("bevel_style"))