Removed glh_linear and glu dependencies from viewer.
This commit is contained in:
@@ -1383,6 +1383,35 @@ void flush_glerror()
|
|||||||
glGetError();
|
glGetError();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const std::string getGLErrorString(GLenum error)
|
||||||
|
{
|
||||||
|
switch(error)
|
||||||
|
{
|
||||||
|
case GL_NO_ERROR:
|
||||||
|
return "No Error";
|
||||||
|
case GL_INVALID_ENUM:
|
||||||
|
return "Invalid Enum";
|
||||||
|
case GL_INVALID_VALUE:
|
||||||
|
return "Invalid Value";
|
||||||
|
case GL_INVALID_OPERATION:
|
||||||
|
return "Invalid Operation";
|
||||||
|
case GL_INVALID_FRAMEBUFFER_OPERATION:
|
||||||
|
return "Invalid Framebuffer Operation";
|
||||||
|
case GL_OUT_OF_MEMORY:
|
||||||
|
return "Out of Memory";
|
||||||
|
case GL_STACK_UNDERFLOW:
|
||||||
|
return "Stack Underflow";
|
||||||
|
case GL_STACK_OVERFLOW:
|
||||||
|
return "Stack Overflow";
|
||||||
|
#ifdef GL_TABLE_TOO_LARGE
|
||||||
|
case GL_TABLE_TOO_LARGE:
|
||||||
|
return "Table too large";
|
||||||
|
#endif
|
||||||
|
default:
|
||||||
|
return "UNKNOWN ERROR";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//this function outputs gl error to the log file, does not crash the code.
|
//this function outputs gl error to the log file, does not crash the code.
|
||||||
void log_glerror()
|
void log_glerror()
|
||||||
{
|
{
|
||||||
@@ -1395,17 +1424,8 @@ void log_glerror()
|
|||||||
error = glGetError();
|
error = glGetError();
|
||||||
while (LL_UNLIKELY(error))
|
while (LL_UNLIKELY(error))
|
||||||
{
|
{
|
||||||
GLubyte const * gl_error_msg = gluErrorString(error);
|
std::string gl_error_msg = getGLErrorString(error);
|
||||||
if (NULL != gl_error_msg)
|
llwarns << "GL Error: 0x" << std::hex << error << std::dec << " GL Error String: " << gl_error_msg << llendl;
|
||||||
{
|
|
||||||
llwarns << "GL Error: " << error << " GL Error String: " << gl_error_msg << llendl ;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// gluErrorString returns NULL for some extensions' error codes.
|
|
||||||
// you'll probably have to grep for the number in glext.h.
|
|
||||||
llwarns << "GL Error: UNKNOWN 0x" << std::hex << error << std::dec << llendl;
|
|
||||||
}
|
|
||||||
error = glGetError();
|
error = glGetError();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1419,27 +1439,13 @@ void do_assert_glerror()
|
|||||||
while (LL_UNLIKELY(error))
|
while (LL_UNLIKELY(error))
|
||||||
{
|
{
|
||||||
quit = TRUE;
|
quit = TRUE;
|
||||||
GLubyte const * gl_error_msg = gluErrorString(error);
|
|
||||||
if (NULL != gl_error_msg)
|
|
||||||
{
|
|
||||||
LL_WARNS("RenderState") << "GL Error:" << error<< LL_ENDL;
|
|
||||||
LL_WARNS("RenderState") << "GL Error String:" << gl_error_msg << LL_ENDL;
|
|
||||||
|
|
||||||
if (gDebugSession)
|
std::string gl_error_msg = getGLErrorString(error);
|
||||||
{
|
LL_WARNS("RenderState") << "GL Error: 0x" << std::hex << error << std::dec << LL_ENDL;
|
||||||
gFailLog << "GL Error:" << gl_error_msg << std::endl;
|
LL_WARNS("RenderState") << "GL Error String: " << gl_error_msg << LL_ENDL;
|
||||||
}
|
if (gDebugSession)
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
// gluErrorString returns NULL for some extensions' error codes.
|
gFailLog << "GL Error: 0x" << std::hex << error << std::dec << " GL Error String: " << gl_error_msg << std::endl;
|
||||||
// you'll probably have to grep for the number in glext.h.
|
|
||||||
LL_WARNS("RenderState") << "GL Error: UNKNOWN 0x" << std::hex << error << std::dec << LL_ENDL;
|
|
||||||
|
|
||||||
if (gDebugSession)
|
|
||||||
{
|
|
||||||
gFailLog << "GL Error: UNKNOWN 0x" << std::hex << error << std::dec << std::endl;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
error = glGetError();
|
error = glGetError();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -44,7 +44,6 @@
|
|||||||
#include "llinstancetracker.h"
|
#include "llinstancetracker.h"
|
||||||
|
|
||||||
#include "llglheaders.h"
|
#include "llglheaders.h"
|
||||||
#include "glh/glh_linear.h"
|
|
||||||
|
|
||||||
extern BOOL gDebugGL;
|
extern BOOL gDebugGL;
|
||||||
extern BOOL gDebugSession;
|
extern BOOL gDebugSession;
|
||||||
|
|||||||
@@ -41,7 +41,6 @@
|
|||||||
# include "GL/glx.h"
|
# include "GL/glx.h"
|
||||||
# define GL_GLEXT_PROTOTYPES 1
|
# define GL_GLEXT_PROTOTYPES 1
|
||||||
# include "GL/glext.h"
|
# include "GL/glext.h"
|
||||||
# include "GL/glu.h"
|
|
||||||
# include "GL/glx.h"
|
# include "GL/glx.h"
|
||||||
# define GLX_GLXEXT_PROTOTYPES 1
|
# define GLX_GLXEXT_PROTOTYPES 1
|
||||||
# include "GL/glxext.h"
|
# include "GL/glxext.h"
|
||||||
@@ -266,7 +265,6 @@ extern PFNGLGENERATEMIPMAPEXTPROC glGenerateMipmapEXT;
|
|||||||
#define GL_GLEXT_PROTOTYPES 1
|
#define GL_GLEXT_PROTOTYPES 1
|
||||||
#include "GL/gl.h"
|
#include "GL/gl.h"
|
||||||
#include "GL/glext.h"
|
#include "GL/glext.h"
|
||||||
#include "GL/glu.h"
|
|
||||||
|
|
||||||
// The __APPLE__ kludge is to make glh_extensions.h not symbol-clash horribly
|
// The __APPLE__ kludge is to make glh_extensions.h not symbol-clash horribly
|
||||||
# define __APPLE__
|
# define __APPLE__
|
||||||
@@ -282,7 +280,6 @@ extern PFNGLGENERATEMIPMAPEXTPROC glGenerateMipmapEXT;
|
|||||||
// quotes so we get libraries/.../GL/ version
|
// quotes so we get libraries/.../GL/ version
|
||||||
#include "GL/gl.h"
|
#include "GL/gl.h"
|
||||||
#include "GL/glext.h"
|
#include "GL/glext.h"
|
||||||
#include "GL/glu.h"
|
|
||||||
|
|
||||||
|
|
||||||
#if LL_LINUX && !LL_MESA_HEADLESS
|
#if LL_LINUX && !LL_MESA_HEADLESS
|
||||||
@@ -551,7 +548,6 @@ extern PFNGLBINDBUFFERRANGEPROC glBindBufferRange;
|
|||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
#include <GL/gl.h>
|
#include <GL/gl.h>
|
||||||
#include <GL/glu.h>
|
|
||||||
|
|
||||||
// quotes so we get libraries/.../GL/ version
|
// quotes so we get libraries/.../GL/ version
|
||||||
#include "GL/glext.h"
|
#include "GL/glext.h"
|
||||||
@@ -789,7 +785,6 @@ extern PFNGLGETDEBUGMESSAGELOGARBPROC glGetDebugMessageLogARB;
|
|||||||
// LL_DARWIN
|
// LL_DARWIN
|
||||||
|
|
||||||
#include <OpenGL/gl.h>
|
#include <OpenGL/gl.h>
|
||||||
#include <OpenGL/glu.h>
|
|
||||||
|
|
||||||
#define GL_EXT_separate_specular_color 1
|
#define GL_EXT_separate_specular_color 1
|
||||||
#include <OpenGL/glext.h>
|
#include <OpenGL/glext.h>
|
||||||
|
|||||||
@@ -43,7 +43,6 @@
|
|||||||
#include "llstrider.h"
|
#include "llstrider.h"
|
||||||
#include "llpointer.h"
|
#include "llpointer.h"
|
||||||
#include "llglheaders.h"
|
#include "llglheaders.h"
|
||||||
#include "glh/glh_linear.h"
|
|
||||||
#include "llrect.h"
|
#include "llrect.h"
|
||||||
|
|
||||||
class LLVertexBuffer;
|
class LLVertexBuffer;
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -30,7 +30,6 @@
|
|||||||
#if LL_MESA_HEADLESS
|
#if LL_MESA_HEADLESS
|
||||||
|
|
||||||
#include "llwindow.h"
|
#include "llwindow.h"
|
||||||
#include "GL/glu.h"
|
|
||||||
#include "GL/osmesa.h"
|
#include "GL/osmesa.h"
|
||||||
|
|
||||||
class LLWindowMesaHeadless : public LLWindow
|
class LLWindowMesaHeadless : public LLWindow
|
||||||
|
|||||||
@@ -1578,9 +1578,11 @@ bool LLModelLoader::doLoadModel()
|
|||||||
mesh_scale *= normalized_transformation;
|
mesh_scale *= normalized_transformation;
|
||||||
normalized_transformation = mesh_scale;
|
normalized_transformation = mesh_scale;
|
||||||
|
|
||||||
glh::matrix4f inv_mat((F32*) normalized_transformation.mMatrix);
|
LLMatrix4a inv_mat;
|
||||||
inv_mat = inv_mat.inverse();
|
inv_mat.loadu(normalized_transformation);
|
||||||
LLMatrix4 inverse_normalized_transformation(inv_mat.m);
|
inv_mat.invert();
|
||||||
|
|
||||||
|
LLMatrix4 inverse_normalized_transformation(inv_mat.getF32ptr());
|
||||||
|
|
||||||
domSkin::domBind_shape_matrix* bind_mat = skin->getBind_shape_matrix();
|
domSkin::domBind_shape_matrix* bind_mat = skin->getBind_shape_matrix();
|
||||||
|
|
||||||
|
|||||||
@@ -73,7 +73,7 @@
|
|||||||
const LLMatrix4a& glh_get_current_modelview();
|
const LLMatrix4a& glh_get_current_modelview();
|
||||||
const LLMatrix4a& glh_get_current_projection();
|
const LLMatrix4a& glh_get_current_projection();
|
||||||
// Functions pulled from llviewerdisplay.cpp
|
// Functions pulled from llviewerdisplay.cpp
|
||||||
bool get_hud_matrices(glh::matrix4f &proj, glh::matrix4f &model);
|
bool get_hud_matrices(LLMatrix4a &proj, LLMatrix4a &model);
|
||||||
|
|
||||||
// Warning: make sure these two match!
|
// Warning: make sure these two match!
|
||||||
const LLPanelPrimMediaControls::EZoomLevel LLPanelPrimMediaControls::kZoomLevels[] = { ZOOM_NONE, ZOOM_MEDIUM };
|
const LLPanelPrimMediaControls::EZoomLevel LLPanelPrimMediaControls::kZoomLevels[] = { ZOOM_NONE, ZOOM_MEDIUM };
|
||||||
@@ -615,15 +615,11 @@ void LLPanelPrimMediaControls::updateShape()
|
|||||||
mat.setMul(glh_get_current_projection(),glh_get_current_modelview());
|
mat.setMul(glh_get_current_projection(),glh_get_current_modelview());
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
glh::matrix4f proj, modelview;
|
LLMatrix4a proj, modelview;
|
||||||
if (get_hud_matrices(proj, modelview))
|
if (get_hud_matrices(proj, modelview))
|
||||||
{
|
{
|
||||||
//mat = proj * modelview;
|
//mat = proj * modelview;
|
||||||
LLMatrix4a P;
|
mat.setMul(proj,modelview);
|
||||||
P.loadu(proj.m);
|
|
||||||
LLMatrix4a M;
|
|
||||||
M.loadu(modelview.m);
|
|
||||||
mat.setMul(P,M);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
LLVector4a min;
|
LLVector4a min;
|
||||||
|
|||||||
@@ -55,28 +55,6 @@
|
|||||||
|
|
||||||
U32 LLViewerCamera::sCurCameraID = LLViewerCamera::CAMERA_WORLD;
|
U32 LLViewerCamera::sCurCameraID = LLViewerCamera::CAMERA_WORLD;
|
||||||
|
|
||||||
//glu pick matrix implementation borrowed from Mesa3D
|
|
||||||
glh::matrix4f gl_pick_matrix(GLfloat x, GLfloat y, GLfloat width, GLfloat height, GLint* viewport)
|
|
||||||
{
|
|
||||||
GLfloat m[16];
|
|
||||||
GLfloat sx, sy;
|
|
||||||
GLfloat tx, ty;
|
|
||||||
|
|
||||||
sx = viewport[2] / width;
|
|
||||||
sy = viewport[3] / height;
|
|
||||||
tx = (viewport[2] + 2.f * (viewport[0] - x)) / width;
|
|
||||||
ty = (viewport[3] + 2.f * (viewport[1] - y)) / height;
|
|
||||||
|
|
||||||
#define M(row,col) m[col*4+row]
|
|
||||||
M(0,0) = sx; M(0,1) = 0.f; M(0,2) = 0.f; M(0,3) = tx;
|
|
||||||
M(1,0) = 0.f; M(1,1) = sy; M(1,2) = 0.f; M(1,3) = ty;
|
|
||||||
M(2,0) = 0.f; M(2,1) = 0.f; M(2,2) = 1.f; M(2,3) = 0.f;
|
|
||||||
M(3,0) = 0.f; M(3,1) = 0.f; M(3,2) = 0.f; M(3,3) = 1.f;
|
|
||||||
#undef M
|
|
||||||
|
|
||||||
return glh::matrix4f(m);
|
|
||||||
}
|
|
||||||
|
|
||||||
LLViewerCamera::LLViewerCamera() : LLCamera()
|
LLViewerCamera::LLViewerCamera() : LLCamera()
|
||||||
{
|
{
|
||||||
calcProjection(getFar());
|
calcProjection(getFar());
|
||||||
@@ -263,20 +241,24 @@ void LLViewerCamera::setPerspective(BOOL for_selection,
|
|||||||
gGL.matrixMode( LLRender::MM_PROJECTION );
|
gGL.matrixMode( LLRender::MM_PROJECTION );
|
||||||
gGL.loadIdentity();
|
gGL.loadIdentity();
|
||||||
|
|
||||||
glh::matrix4f proj_mat;
|
LLMatrix4a proj_mat;
|
||||||
|
proj_mat.setIdentity();
|
||||||
|
|
||||||
if (for_selection)
|
if (for_selection)
|
||||||
{
|
{
|
||||||
// make a tiny little viewport
|
// make a tiny little viewport
|
||||||
// anything drawn into this viewport will be "selected"
|
// anything drawn into this viewport will be "selected"
|
||||||
|
|
||||||
GLint viewport[4];
|
const LLRect& rect = gViewerWindow->getWorldViewRectRaw();
|
||||||
viewport[0] = gViewerWindow->getWorldViewRectRaw().mLeft;
|
|
||||||
viewport[1] = gViewerWindow->getWorldViewRectRaw().mBottom;
|
|
||||||
viewport[2] = gViewerWindow->getWorldViewRectRaw().getWidth();
|
|
||||||
viewport[3] = gViewerWindow->getWorldViewRectRaw().getHeight();
|
|
||||||
|
|
||||||
proj_mat = gl_pick_matrix(x+width/2.f, y_from_bot+height/2.f, (GLfloat) width, (GLfloat) height, viewport);
|
const F32 scale_x = rect.getWidth() / F32(width);
|
||||||
|
const F32 scale_y = rect.getHeight() / F32(height);
|
||||||
|
const F32 trans_x = scale_x + (2.f * (rect.mLeft - x)) / F32(width) - 1.f;
|
||||||
|
const F32 trans_y = scale_y + (2.f * (rect.mBottom - y_from_bot)) / F32(height) - 1.f;
|
||||||
|
|
||||||
|
//Generate a pick matrix
|
||||||
|
proj_mat.applyScale_affine(scale_x, scale_y, 1.f);
|
||||||
|
proj_mat.setTranslate_affine(LLVector3(trans_x, trans_y, 0.f));
|
||||||
|
|
||||||
if (limit_select_distance)
|
if (limit_select_distance)
|
||||||
{
|
{
|
||||||
@@ -310,24 +292,18 @@ void LLViewerCamera::setPerspective(BOOL for_selection,
|
|||||||
float offset = mZoomFactor - 1.f;
|
float offset = mZoomFactor - 1.f;
|
||||||
int pos_y = mZoomSubregion / llceil(mZoomFactor);
|
int pos_y = mZoomSubregion / llceil(mZoomFactor);
|
||||||
int pos_x = mZoomSubregion - (pos_y*llceil(mZoomFactor));
|
int pos_x = mZoomSubregion - (pos_y*llceil(mZoomFactor));
|
||||||
glh::matrix4f translate;
|
|
||||||
translate.set_translate(glh::vec3f(offset - (F32)pos_x * 2.f, offset - (F32)pos_y * 2.f, 0.f));
|
|
||||||
glh::matrix4f scale;
|
|
||||||
scale.set_scale(glh::vec3f(mZoomFactor, mZoomFactor, 1.f));
|
|
||||||
|
|
||||||
proj_mat = scale*proj_mat;
|
proj_mat.applyScale_affine(mZoomFactor,mZoomFactor,1.f);
|
||||||
proj_mat = translate*proj_mat;
|
proj_mat.applyTranslation_affine(offset - (F32)pos_x * 2.f, offset - (F32)pos_y * 2.f, 0.f);
|
||||||
}
|
}
|
||||||
|
|
||||||
calcProjection(z_far); // Update the projection matrix cache
|
calcProjection(z_far); // Update the projection matrix cache
|
||||||
|
|
||||||
LLMatrix4a proj_mata;
|
proj_mat.mul(gGL.genPersp(fov_y,aspect,z_near,z_far));
|
||||||
proj_mata.loadu(proj_mat.m);
|
|
||||||
proj_mata.mul(gGL.genPersp(fov_y,aspect,z_near,z_far));
|
|
||||||
|
|
||||||
gGL.loadMatrix(proj_mata);
|
gGL.loadMatrix(proj_mat);
|
||||||
|
|
||||||
gGLProjection = proj_mata;
|
gGLProjection = proj_mat;
|
||||||
|
|
||||||
gGL.matrixMode(LLRender::MM_MODELVIEW );
|
gGL.matrixMode(LLRender::MM_MODELVIEW );
|
||||||
|
|
||||||
|
|||||||
@@ -1264,7 +1264,7 @@ LLRect get_whole_screen_region()
|
|||||||
return whole_screen;
|
return whole_screen;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool get_hud_matrices(const LLRect& screen_region, glh::matrix4f &proj, glh::matrix4f &model)
|
bool get_hud_matrices(const LLRect& screen_region, LLMatrix4a &proj, LLMatrix4a &model)
|
||||||
{
|
{
|
||||||
if (isAgentAvatarValid() && gAgentAvatarp->hasHUDAttachment())
|
if (isAgentAvatarValid() && gAgentAvatarp->hasHUDAttachment())
|
||||||
{
|
{
|
||||||
@@ -1272,28 +1272,24 @@ bool get_hud_matrices(const LLRect& screen_region, glh::matrix4f &proj, glh::mat
|
|||||||
LLBBox hud_bbox = gAgentAvatarp->getHUDBBox();
|
LLBBox hud_bbox = gAgentAvatarp->getHUDBBox();
|
||||||
|
|
||||||
F32 hud_depth = llmax(1.f, hud_bbox.getExtentLocal().mV[VX] * 1.1f);
|
F32 hud_depth = llmax(1.f, hud_bbox.getExtentLocal().mV[VX] * 1.1f);
|
||||||
proj.set_value(gGL.genOrtho(-0.5f * LLViewerCamera::getInstance()->getAspect(), 0.5f * LLViewerCamera::getInstance()->getAspect(), -0.5f, 0.5f, 0.f, hud_depth).getF32ptr());
|
proj = gGL.genOrtho(-0.5f * LLViewerCamera::getInstance()->getAspect(), 0.5f * LLViewerCamera::getInstance()->getAspect(), -0.5f, 0.5f, 0.f, hud_depth);
|
||||||
proj.element(2,2) = -0.01f;
|
proj.getRow<2>().copyComponent<2>(LLVector4a(-0.01f));
|
||||||
|
|
||||||
F32 aspect_ratio = LLViewerCamera::getInstance()->getAspect();
|
F32 aspect_ratio = LLViewerCamera::getInstance()->getAspect();
|
||||||
|
|
||||||
glh::matrix4f mat;
|
|
||||||
F32 scale_x = (F32)gViewerWindow->getWorldViewWidthScaled() / (F32)screen_region.getWidth();
|
F32 scale_x = (F32)gViewerWindow->getWorldViewWidthScaled() / (F32)screen_region.getWidth();
|
||||||
F32 scale_y = (F32)gViewerWindow->getWorldViewHeightScaled() / (F32)screen_region.getHeight();
|
F32 scale_y = (F32)gViewerWindow->getWorldViewHeightScaled() / (F32)screen_region.getHeight();
|
||||||
mat.set_scale(glh::vec3f(scale_x, scale_y, 1.f));
|
|
||||||
mat.set_translate(
|
|
||||||
glh::vec3f(clamp_rescale((F32)(screen_region.getCenterX() - screen_region.mLeft), 0.f, (F32)gViewerWindow->getWorldViewWidthScaled(), 0.5f * scale_x * aspect_ratio, -0.5f * scale_x * aspect_ratio),
|
|
||||||
clamp_rescale((F32)(screen_region.getCenterY() - screen_region.mBottom), 0.f, (F32)gViewerWindow->getWorldViewHeightScaled(), 0.5f * scale_y, -0.5f * scale_y),
|
|
||||||
0.f));
|
|
||||||
proj *= mat;
|
|
||||||
|
|
||||||
glh::matrix4f tmp_model((GLfloat*) OGL_TO_CFR_ROTATION.getF32ptr());
|
proj.applyTranslation_affine(
|
||||||
|
clamp_rescale((F32)(screen_region.getCenterX() - screen_region.mLeft), 0.f, (F32)gViewerWindow->getWorldViewWidthScaled(), 0.5f * scale_x * aspect_ratio, -0.5f * scale_x * aspect_ratio),
|
||||||
|
clamp_rescale((F32)(screen_region.getCenterY() - screen_region.mBottom), 0.f, (F32)gViewerWindow->getWorldViewHeightScaled(), 0.5f * scale_y, -0.5f * scale_y),
|
||||||
|
0.f);
|
||||||
|
proj.applyScale_affine(scale_x, scale_y, 1.f);
|
||||||
|
|
||||||
mat.set_scale(glh::vec3f(zoom_level, zoom_level, zoom_level));
|
model = OGL_TO_CFR_ROTATION;
|
||||||
mat.set_translate(glh::vec3f(-hud_bbox.getCenterLocal().mV[VX] + (hud_depth * 0.5f), 0.f, 0.f));
|
model.applyTranslation_affine(LLVector3(-hud_bbox.getCenterLocal().mV[VX] + (hud_depth * 0.5f), 0.f, 0.f));
|
||||||
|
model.applyScale_affine(zoom_level);
|
||||||
|
|
||||||
tmp_model *= mat;
|
|
||||||
model = tmp_model;
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -1302,7 +1298,7 @@ bool get_hud_matrices(const LLRect& screen_region, glh::matrix4f &proj, glh::mat
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool get_hud_matrices(glh::matrix4f &proj, glh::matrix4f &model)
|
bool get_hud_matrices(LLMatrix4a &proj, LLMatrix4a &model)
|
||||||
{
|
{
|
||||||
LLRect whole_screen = get_whole_screen_region();
|
LLRect whole_screen = get_whole_screen_region();
|
||||||
return get_hud_matrices(whole_screen, proj, model);
|
return get_hud_matrices(whole_screen, proj, model);
|
||||||
@@ -1316,15 +1312,10 @@ BOOL setup_hud_matrices()
|
|||||||
|
|
||||||
BOOL setup_hud_matrices(const LLRect& screen_region)
|
BOOL setup_hud_matrices(const LLRect& screen_region)
|
||||||
{
|
{
|
||||||
glh::matrix4f P, M;
|
LLMatrix4a proj, model;
|
||||||
bool result = get_hud_matrices(screen_region, P, M);
|
bool result = get_hud_matrices(screen_region, proj, model);
|
||||||
if (!result) return result;
|
if (!result) return result;
|
||||||
|
|
||||||
LLMatrix4a proj;
|
|
||||||
proj.loadu(P.m);
|
|
||||||
LLMatrix4a model;
|
|
||||||
model.loadu(M.m);
|
|
||||||
|
|
||||||
// set up transform to keep HUD objects in front of camera
|
// set up transform to keep HUD objects in front of camera
|
||||||
gGL.matrixMode(LLRender::MM_PROJECTION);
|
gGL.matrixMode(LLRender::MM_PROJECTION);
|
||||||
gGL.loadMatrix(proj);
|
gGL.loadMatrix(proj);
|
||||||
|
|||||||
102
install.xml
102
install.xml
@@ -473,32 +473,6 @@
|
|||||||
</map>
|
</map>
|
||||||
</map>
|
</map>
|
||||||
</map>
|
</map>
|
||||||
<key>freeglut</key>
|
|
||||||
<map>
|
|
||||||
<key>copyright</key>
|
|
||||||
<string>Copyright (c) 1999-2000 Pawel W. Olszta.</string>
|
|
||||||
<key>description</key>
|
|
||||||
<string>OpenSource alternative to OpenGL Utility Toolkit</string>
|
|
||||||
<key>license</key>
|
|
||||||
<string>freeglut</string>
|
|
||||||
<key>packages</key>
|
|
||||||
<map>
|
|
||||||
<key>windows</key>
|
|
||||||
<map>
|
|
||||||
<key>md5sum</key>
|
|
||||||
<string>74758efd7fc6246f704ea702c4b3e310</string>
|
|
||||||
<key>url</key>
|
|
||||||
<uri>https://bitbucket.org/SingularityViewer/libraries/downloads/freeglut-2.6.0-windows-20110214.tar.bz2</uri>
|
|
||||||
</map>
|
|
||||||
<key>windows64</key>
|
|
||||||
<map>
|
|
||||||
<key>md5sum</key>
|
|
||||||
<string>74758efd7fc6246f704ea702c4b3e310</string>
|
|
||||||
<key>url</key>
|
|
||||||
<uri>https://bitbucket.org/SingularityViewer/libraries/downloads/freeglut-2.6.0-windows-20110214.tar.bz2</uri>
|
|
||||||
</map>
|
|
||||||
</map>
|
|
||||||
</map>
|
|
||||||
<key>freetype</key>
|
<key>freetype</key>
|
||||||
<map>
|
<map>
|
||||||
<key>copyright</key>
|
<key>copyright</key>
|
||||||
@@ -1735,37 +1709,6 @@ your work.
|
|||||||
<key>url</key>
|
<key>url</key>
|
||||||
<string>http://www.fmod.org/ifmodlicense.html</string>
|
<string>http://www.fmod.org/ifmodlicense.html</string>
|
||||||
</map>
|
</map>
|
||||||
<key>freeglut</key>
|
|
||||||
<map>
|
|
||||||
<key>text</key>
|
|
||||||
<string>Freeglut Copyright
|
|
||||||
------------------
|
|
||||||
|
|
||||||
Freeglut code without an explicit copyright is covered by the following
|
|
||||||
copyright:
|
|
||||||
|
|
||||||
Copyright (c) 1999-2000 Pawel W. Olszta. All Rights Reserved.
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in
|
|
||||||
all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
|
||||||
PAWEL W. OLSZTA BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
||||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
||||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
|
|
||||||
Except as contained in this notice, the name of Pawel W. Olszta shall not be
|
|
||||||
used in advertising or otherwise to promote the sale, use or other dealings
|
|
||||||
in this Software without prior written authorization from Pawel W. Olszta.
|
|
||||||
</string>
|
|
||||||
</map>
|
|
||||||
<key>freetype</key>
|
<key>freetype</key>
|
||||||
<map>
|
<map>
|
||||||
<key>url</key>
|
<key>url</key>
|
||||||
@@ -1796,51 +1739,6 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|||||||
MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||||
</string>
|
</string>
|
||||||
</map>
|
</map>
|
||||||
<key>glh_linear</key>
|
|
||||||
<map>
|
|
||||||
<key>text</key>
|
|
||||||
<string>glh - is a platform-indepenedent C++ OpenGL helper library
|
|
||||||
|
|
||||||
Copyright (c) 2000 Cass Everitt
|
|
||||||
Copyright (c) 2000 NVIDIA Corporation
|
|
||||||
All rights reserved.
|
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or
|
|
||||||
without modification, are permitted provided that the following
|
|
||||||
conditions are met:
|
|
||||||
|
|
||||||
Redistributions of source code must retain the above
|
|
||||||
copyright notice, this list of conditions and the following
|
|
||||||
disclaimer.
|
|
||||||
Redistributions in binary form must reproduce the above
|
|
||||||
copyright notice, this list of conditions and the following
|
|
||||||
disclaimer in the documentation and/or other materials
|
|
||||||
provided with the distribution.
|
|
||||||
The names of contributors to this software may not be used
|
|
||||||
to endorse or promote products derived from this software
|
|
||||||
without specific prior written permission.
|
|
||||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
||||||
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
||||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
|
||||||
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
|
||||||
REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
||||||
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
|
||||||
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
||||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
||||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
||||||
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
|
||||||
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
||||||
POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
|
|
||||||
Cass Everitt - cass@r3.nu
|
|
||||||
|
|
||||||
</string>
|
|
||||||
</map>
|
|
||||||
<key>glut</key>
|
|
||||||
<map>
|
|
||||||
<key>url</key>
|
|
||||||
<string>http://www.xmission.com/~nate/glut/README-win32.txt</string>
|
|
||||||
</map>
|
|
||||||
<key>gpl</key>
|
<key>gpl</key>
|
||||||
<map>
|
<map>
|
||||||
<key>url</key>
|
<key>url</key>
|
||||||
|
|||||||
Reference in New Issue
Block a user