Possible fix for "4096 bug" affecting long Opensim teleports
Patch by Tonya Souther (Firestorm) Refereces: https://jira.secondlife.com/browse/SVC-2941 http://redmine.kokuaviewer.org/issues/465 http://jira.phoenixviewer.com/browse/FIRE-11593
This commit is contained in:
@@ -155,6 +155,10 @@ const U32 DEFERRED_VB_MASK = LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_TE
|
|||||||
// Max number of occluders to search for. JC
|
// Max number of occluders to search for. JC
|
||||||
const S32 MAX_OCCLUDER_COUNT = 2;
|
const S32 MAX_OCCLUDER_COUNT = 2;
|
||||||
|
|
||||||
|
//<FS:TS> FIRE-11593: Teleporting more than 4096 regions away clears screen
|
||||||
|
const F32 MAX_SHIFT_DISTANCE = 256.f * 4095; //maximum distance to shift spatial partitions
|
||||||
|
//</FS:TS> FIRE-11593
|
||||||
|
|
||||||
extern S32 gBoxFrame;
|
extern S32 gBoxFrame;
|
||||||
//extern BOOL gHideSelectedObjects;
|
//extern BOOL gHideSelectedObjects;
|
||||||
extern BOOL gDisplaySwapBuffers;
|
extern BOOL gDisplaySwapBuffers;
|
||||||
@@ -4004,6 +4008,17 @@ void LLPipeline::renderGeom(LLCamera& camera, BOOL forceVBOUpdate)
|
|||||||
//LLGLState::checkTextureChannels();
|
//LLGLState::checkTextureChannels();
|
||||||
//LLGLState::checkClientArrays();
|
//LLGLState::checkClientArrays();
|
||||||
|
|
||||||
|
//<FS:TS> FIRE-11593: Teleporting more than 4096 regions away clears screen
|
||||||
|
// The spatial partition octree shift code has problems with
|
||||||
|
// shifts of more than 4096 regions (1M meters). We shift just
|
||||||
|
// less than that distance, and let later processing deal with
|
||||||
|
// all the spatial partitions that are shifted far enough away
|
||||||
|
// that we'll never see them anyway.
|
||||||
|
if (offset.length() > MAX_SHIFT_DISTANCE)
|
||||||
|
{
|
||||||
|
offseta.splat(MAX_SHIFT_DISTANCE);
|
||||||
|
}
|
||||||
|
//</FS:TS> FIRE-11593
|
||||||
|
|
||||||
|
|
||||||
//stop_glerror();
|
//stop_glerror();
|
||||||
|
|||||||
Reference in New Issue
Block a user