Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Alchemy Viewer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Silent mode is enabled
All outbound communications are blocked.
Learn more
.
Show more breadcrumbs
Alchemy Viewer
Alchemy Viewer
Commits
22b877e7
"README.md" did not exist on "01c236df47c2bc48af26e96d2a7bde8d32cf3514"
Commit
22b877e7
authored
13 years ago
by
prep
Browse files
Options
Downloads
Patches
Plain Diff
WIP: Navmesh vbos rendering fixes (added normal and color maps).
parent
e2fd0266
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
indra/llrender/llrendernavprim.cpp
+16
-5
16 additions, 5 deletions
indra/llrender/llrendernavprim.cpp
indra/newview/llviewerdisplay.cpp
+2
-11
2 additions, 11 deletions
indra/newview/llviewerdisplay.cpp
with
18 additions
and
16 deletions
indra/llrender/llrendernavprim.cpp
+
16
−
5
View file @
22b877e7
...
...
@@ -67,7 +67,7 @@ void LLRenderNavPrim::renderTri( const LLVector3& a, const LLVector3& b, const L
}
LLGLDisable
cull
(
GL_CULL_FACE
);
LLColor4
colorA
(
color
);
colorA
*=
1.5
f
;
colorA
*=
1.
2
5
f
;
gGL
.
color4fv
(
colorA
.
mV
);
LLGLSLShader
::
sNoFixedFunction
=
false
;
gGL
.
begin
(
LLRender
::
TRIANGLES
);
...
...
@@ -86,11 +86,22 @@ void LLRenderNavPrim::renderTri( const LLVector3& a, const LLVector3& b, const L
void
LLRenderNavPrim
::
renderNavMeshVB
(
LLVertexBuffer
*
pVBO
,
int
vertCnt
)
{
glLineWidth
(
1.5
f
);
glPolygonMode
(
GL_FRONT_AND_BACK
,
GL_FILL
);
LLGLDisable
cull
(
GL_CULL_FACE
);
LLGLSLShader
::
sNoFixedFunction
=
false
;
pVBO
->
setBuffer
(
LLVertexBuffer
::
MAP_VERTEX
);
pVBO
->
drawArrays
(
LLRender
::
TRIANGLES
,
0
,
vertCnt
);
LLGLEnable
depth
(
GL_DEPTH_TEST
);
glPolygonMode
(
GL_FRONT_AND_BACK
,
GL_FILL
);
LLGLEnable
cull
(
GL_CULL_FACE
);
//pass 1 filled
pVBO
->
setBuffer
(
LLVertexBuffer
::
MAP_VERTEX
|
LLVertexBuffer
::
MAP_COLOR
|
LLVertexBuffer
::
MAP_NORMAL
);
pVBO
->
drawArrays
(
LLRender
::
TRIANGLES
,
0
,
vertCnt
);
//glPolygonMode( GL_FRONT_AND_BACK, GL_LINE );
//static GLubyte red[]= { 255.0f, 0.0f, 0.0f, 255.0f };
//glColor4ubv( red );
//pass 2 outlined
//pVBO->drawArrays( LLRender::TRIANGLES, 0, vertCnt );
LLGLSLShader
::
sNoFixedFunction
=
true
;
glLineWidth
(
1.0
f
);
glPolygonMode
(
GL_FRONT_AND_BACK
,
GL_FILL
);
}
//=============================================================================
This diff is collapsed.
Click to expand it.
indra/newview/llviewerdisplay.cpp
+
2
−
11
View file @
22b877e7
...
...
@@ -915,24 +915,15 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
//Navmesh
if
(
LLPathingLib
::
getInstance
()
->
getRenderNavMeshState
()
)
{
glClearColor
(
0.0
f
,
0.0
f
,
0.0
f
,
0.5
f
);
glClearColor
(
0.0
f
,
0.0
f
,
0.0
f
,
0.5
f
);
glEnable
(
GL_DEPTH_TEST
);
gGL
.
setSceneBlendType
(
LLRender
::
BT_ALPHA
);
gGL
.
setAmbientLightColor
(
LLColor4
::
white
);
LLPathingLib
::
getInstance
()
->
renderNavMesh
(
allowRenderables
);
exclusiveDraw
=
true
;
}
//physics/exclusion shapes
if
(
LLPathingLib
::
getInstance
()
->
getRenderShapeState
()
)
{
glEnable
(
GL_DEPTH_TEST
);
gGL
.
setSceneBlendType
(
LLRender
::
BT_REPLACE
);
GLfloat
LightAmbient
[]
=
{
0.5
f
,
0.5
f
,
0.5
f
,
1.0
f
};
glLightfv
(
GL_LIGHT1
,
GL_AMBIENT
,
LightAmbient
);
LLGLSUIDefault
texture_state
;
LLGLDepthTest
gls_depth
(
GL_TRUE
);
gGL
.
getTexUnit
(
0
)
->
unbind
(
LLTexUnit
::
TT_TEXTURE
);
{
LLPathingLib
::
getInstance
()
->
renderNavMeshShapesVBO
();
exclusiveDraw
=
true
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment