Innitial commit of experimental v2 texture system port work. Compiles and runs on windows, at least. Fixing bugs as they come.
Need to test: localassetbrowser preview related floaters hgfloatertexteditor maps media textures! Currently very hacky web browser alpha masks on avatars bumpmaps Are all sky components appearing? LLViewerDynamicTexture (texture baking, browser, animated textures, anim previews, etc) Snapshot related features Customize avatar vfs floater UI textures in general Texture priority issues
This commit is contained in:
@@ -42,7 +42,6 @@
|
||||
#include "v4color.h"
|
||||
#include "llrender.h"
|
||||
#include "llrect.h"
|
||||
#include "llimagegl.h"
|
||||
#include "lldir.h"
|
||||
#include "llfontgl.h"
|
||||
|
||||
@@ -76,6 +75,7 @@ LLHtmlHelp* LLUI::sHtmlHelp = NULL;
|
||||
BOOL LLUI::sShowXUINames = FALSE;
|
||||
std::stack<LLRect> LLScreenClipRect::sClipRectStack;
|
||||
BOOL LLUI::sQAMode = FALSE;
|
||||
S32 LLUI::sDefaultIconPriority = 0;
|
||||
|
||||
//
|
||||
// Functions
|
||||
@@ -407,7 +407,7 @@ void gl_corners_2d(S32 left, S32 top, S32 right, S32 bottom, S32 length, F32 max
|
||||
}
|
||||
|
||||
|
||||
void gl_draw_image( S32 x, S32 y, LLImageGL* image, const LLColor4& color, const LLRectf& uv_rect )
|
||||
void gl_draw_image( S32 x, S32 y, LLTexture* image, const LLColor4& color, const LLRectf& uv_rect )
|
||||
{
|
||||
if (NULL == image)
|
||||
{
|
||||
@@ -417,7 +417,7 @@ void gl_draw_image( S32 x, S32 y, LLImageGL* image, const LLColor4& color, const
|
||||
gl_draw_scaled_rotated_image( x, y, image->getWidth(0), image->getHeight(0), 0.f, image, color, uv_rect );
|
||||
}
|
||||
|
||||
void gl_draw_scaled_image(S32 x, S32 y, S32 width, S32 height, LLImageGL* image, const LLColor4& color, const LLRectf& uv_rect)
|
||||
void gl_draw_scaled_image(S32 x, S32 y, S32 width, S32 height, LLTexture* image, const LLColor4& color, const LLRectf& uv_rect)
|
||||
{
|
||||
if (NULL == image)
|
||||
{
|
||||
@@ -427,7 +427,7 @@ void gl_draw_scaled_image(S32 x, S32 y, S32 width, S32 height, LLImageGL* image,
|
||||
gl_draw_scaled_rotated_image( x, y, width, height, 0.f, image, color, uv_rect );
|
||||
}
|
||||
|
||||
void gl_draw_scaled_image_with_border(S32 x, S32 y, S32 border_width, S32 border_height, S32 width, S32 height, LLImageGL* image, const LLColor4& color, BOOL solid_color, const LLRectf& uv_rect)
|
||||
void gl_draw_scaled_image_with_border(S32 x, S32 y, S32 border_width, S32 border_height, S32 width, S32 height, LLTexture* image, const LLColor4& color, BOOL solid_color, const LLRectf& uv_rect)
|
||||
{
|
||||
if (NULL == image)
|
||||
{
|
||||
@@ -443,7 +443,7 @@ void gl_draw_scaled_image_with_border(S32 x, S32 y, S32 border_width, S32 border
|
||||
gl_draw_scaled_image_with_border(x, y, width, height, image, color, solid_color, uv_rect, scale_rect);
|
||||
}
|
||||
|
||||
void gl_draw_scaled_image_with_border(S32 x, S32 y, S32 width, S32 height, LLImageGL* image, const LLColor4& color, BOOL solid_color, const LLRectf& uv_rect, const LLRectf& scale_rect)
|
||||
void gl_draw_scaled_image_with_border(S32 x, S32 y, S32 width, S32 height, LLTexture* image, const LLColor4& color, BOOL solid_color, const LLRectf& uv_rect, const LLRectf& scale_rect)
|
||||
{
|
||||
stop_glerror();
|
||||
|
||||
@@ -629,12 +629,12 @@ void gl_draw_scaled_image_with_border(S32 x, S32 y, S32 width, S32 height, LLIma
|
||||
}
|
||||
}
|
||||
|
||||
void gl_draw_rotated_image(S32 x, S32 y, F32 degrees, LLImageGL* image, const LLColor4& color, const LLRectf& uv_rect)
|
||||
void gl_draw_rotated_image(S32 x, S32 y, F32 degrees, LLTexture* image, const LLColor4& color, const LLRectf& uv_rect)
|
||||
{
|
||||
gl_draw_scaled_rotated_image( x, y, image->getWidth(0), image->getHeight(0), degrees, image, color, uv_rect );
|
||||
}
|
||||
|
||||
void gl_draw_scaled_rotated_image(S32 x, S32 y, S32 width, S32 height, F32 degrees, LLImageGL* image, const LLColor4& color, const LLRectf& uv_rect)
|
||||
void gl_draw_scaled_rotated_image(S32 x, S32 y, S32 width, S32 height, F32 degrees, LLTexture* image, const LLColor4& color, const LLRectf& uv_rect)
|
||||
{
|
||||
if (NULL == image)
|
||||
{
|
||||
@@ -680,7 +680,7 @@ void gl_draw_scaled_rotated_image(S32 x, S32 y, S32 width, S32 height, F32 degre
|
||||
}
|
||||
|
||||
|
||||
void gl_draw_scaled_image_inverted(S32 x, S32 y, S32 width, S32 height, LLImageGL* image, const LLColor4& color, const LLRectf& uv_rect)
|
||||
void gl_draw_scaled_image_inverted(S32 x, S32 y, S32 width, S32 height, LLTexture* image, const LLColor4& color, const LLRectf& uv_rect)
|
||||
{
|
||||
if (NULL == image)
|
||||
{
|
||||
@@ -1559,7 +1559,8 @@ void LLUI::initClass(LLControlGroup* config,
|
||||
LLImageProviderInterface* image_provider,
|
||||
LLUIAudioCallback audio_callback,
|
||||
const LLVector2* scale_factor,
|
||||
const std::string& language)
|
||||
const std::string& language,
|
||||
const S32 default_icon_priority)
|
||||
{
|
||||
sConfigGroup = config;
|
||||
sIgnoresGroup = ignores;
|
||||
@@ -1577,6 +1578,7 @@ void LLUI::initClass(LLControlGroup* config,
|
||||
sGLScaleFactor = (scale_factor == NULL) ? LLVector2(1.f, 1.f) : *scale_factor;
|
||||
sWindow = NULL; // set later in startup
|
||||
LLFontGL::sShadowColor = colors->getColor("ColorDropShadow");
|
||||
sDefaultIconPriority = default_icon_priority;
|
||||
|
||||
LLUI::sShowXUINames = LLUI::sConfigGroup->getBOOL("ShowXUINames");
|
||||
LLUI::sConfigGroup->getControl("ShowXUINames")->getSignal()->connect(&handleShowXUINamesChanged);
|
||||
@@ -1764,11 +1766,24 @@ void LLUI::glRectToScreen(const LLRect& gl, LLRect *screen)
|
||||
glPointToScreen(gl.mRight, gl.mBottom, &screen->mRight, &screen->mBottom);
|
||||
}
|
||||
|
||||
//static
|
||||
LLUIImage* LLUI::getUIImage(const std::string& name)
|
||||
//static
|
||||
LLPointer<LLUIImage> LLUI::getUIImageByID(const LLUUID& image_id, S32 priority)
|
||||
{
|
||||
if (!name.empty())
|
||||
return sImageProvider->getUIImage(name);
|
||||
if (sImageProvider)
|
||||
{
|
||||
return sImageProvider->getUIImageByID(image_id, priority);
|
||||
}
|
||||
else
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
//static
|
||||
LLPointer<LLUIImage> LLUI::getUIImage(const std::string& name, S32 priority)
|
||||
{
|
||||
if (!name.empty() && sImageProvider)
|
||||
return sImageProvider->getUIImage(name, priority);
|
||||
else
|
||||
return NULL;
|
||||
}
|
||||
@@ -1853,7 +1868,7 @@ LLLocalClipRect::LLLocalClipRect(const LLRect &rect, BOOL enabled)
|
||||
// LLUIImage
|
||||
//
|
||||
|
||||
LLUIImage::LLUIImage(const std::string& name, LLPointer<LLImageGL> image) :
|
||||
LLUIImage::LLUIImage(const std::string& name, LLPointer<LLTexture> image) :
|
||||
mName(name),
|
||||
mImage(image),
|
||||
mScaleRegion(0.f, 1.f, 1.f, 0.f),
|
||||
|
||||
Reference in New Issue
Block a user