summaryrefslogtreecommitdiff
path: root/indra/llrender
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2012-09-26 18:25:26 -0400
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2012-09-26 18:25:26 -0400
commita43d242d00ef06934f9473444297fffe50760f93 (patch)
tree6f557d2a183f626d7b53c4ecf0f9678439c90ce7 /indra/llrender
parent0bb1324a27d4dd94d6f8a9d445ab892127f48c5f (diff)
parent95f3fb45ae2f4fe199e34f35be1e46b3a598ca1a (diff)
merge
Diffstat (limited to 'indra/llrender')
-rw-r--r--indra/llrender/CMakeLists.txt30
-rw-r--r--indra/llrender/llfontregistry.cpp2
-rw-r--r--indra/llrender/llrender.cpp2
-rw-r--r--indra/llrender/llrendertarget.cpp2
-rw-r--r--indra/llrender/llrendertarget.h3
-rw-r--r--indra/llrender/llvertexbuffer.cpp8
6 files changed, 32 insertions, 15 deletions
diff --git a/indra/llrender/CMakeLists.txt b/indra/llrender/CMakeLists.txt
index fc38f56957..f31446924f 100644
--- a/indra/llrender/CMakeLists.txt
+++ b/indra/llrender/CMakeLists.txt
@@ -78,13 +78,17 @@ set_source_files_properties(${llrender_HEADER_FILES}
list(APPEND llrender_SOURCE_FILES ${llrender_HEADER_FILES})
-if (SERVER AND NOT WINDOWS AND NOT DARWIN)
+list(APPEND llrender_SOURCE_FILES
+ llgl.cpp
+ llrender.cpp
+ llrendertarget.cpp
+ )
+if ((SERVER OR BAKING) AND NOT WINDOWS AND NOT DARWIN)
copy_server_sources(
llgl
llrender
)
-
set_source_files_properties(
${server_SOURCE_FILES}
PROPERTIES
@@ -94,13 +98,20 @@ if (SERVER AND NOT WINDOWS AND NOT DARWIN)
${llrender_SOURCE_FILES}
${server_SOURCE_FILES}
)
-else (SERVER AND NOT WINDOWS AND NOT DARWIN)
- list(APPEND llrender_SOURCE_FILES
- llgl.cpp
- llrender.cpp
- llrendertarget.cpp
- )
-endif (SERVER AND NOT WINDOWS AND NOT DARWIN)
+
+target_link_libraries(llrenderheadless
+ ${LLCOMMON_LIBRARIES}
+ ${LLIMAGE_LIBRARIES}
+ ${LLMATH_LIBRARIES}
+ ${LLRENDER_LIBRARIES}
+ ${LLVFS_LIBRARIES}
+ ${LLXML_LIBRARIES}
+ ${LLVFS_LIBRARIES}
+ ${LLWINDOW_LIBRARIES}
+ ${OPENGL_LIBRARIES})
+
+endif ((SERVER OR BAKING) AND NOT WINDOWS AND NOT DARWIN)
+
add_library (llrender ${llrender_SOURCE_FILES})
# Libraries on which this library depends, needed for Linux builds
# Sort by high-level to low-level
@@ -115,3 +126,4 @@ target_link_libraries(llrender
${LLWINDOW_LIBRARIES}
${FREETYPE_LIBRARIES}
${OPENGL_LIBRARIES})
+
diff --git a/indra/llrender/llfontregistry.cpp b/indra/llrender/llfontregistry.cpp
index 4d22eba3d9..d0637f2546 100644
--- a/indra/llrender/llfontregistry.cpp
+++ b/indra/llrender/llfontregistry.cpp
@@ -225,7 +225,7 @@ std::string currentOsName()
return "Windows";
#elif LL_DARWIN
return "Mac";
-#elif LL_SDL
+#elif LL_SDL || LL_MESA_HEADLESS
return "Linux";
#else
return "";
diff --git a/indra/llrender/llrender.cpp b/indra/llrender/llrender.cpp
index 4597d06260..c60eb8d9d9 100644
--- a/indra/llrender/llrender.cpp
+++ b/indra/llrender/llrender.cpp
@@ -357,7 +357,6 @@ bool LLTexUnit::bind(LLCubeMap* cubeMap)
}
// LLRenderTarget is unavailible on the mapserver since it uses FBOs.
-#if !LL_MESA_HEADLESS
bool LLTexUnit::bind(LLRenderTarget* renderTarget, bool bindDepth)
{
if (mIndex < 0) return false;
@@ -380,7 +379,6 @@ bool LLTexUnit::bind(LLRenderTarget* renderTarget, bool bindDepth)
return true;
}
-#endif // LL_MESA_HEADLESS
bool LLTexUnit::bindManual(eTextureType type, U32 texture, bool hasMips)
{
diff --git a/indra/llrender/llrendertarget.cpp b/indra/llrender/llrendertarget.cpp
index cc5c232380..d87255f6ce 100644
--- a/indra/llrender/llrendertarget.cpp
+++ b/indra/llrender/llrendertarget.cpp
@@ -570,3 +570,5 @@ void LLRenderTarget::getViewport(S32* viewport)
viewport[3] = mResY;
}
+
+
diff --git a/indra/llrender/llrendertarget.h b/indra/llrender/llrendertarget.h
index e1a51304f1..b9ef666206 100644
--- a/indra/llrender/llrendertarget.h
+++ b/indra/llrender/llrendertarget.h
@@ -28,7 +28,6 @@
#define LL_LLRENDERTARGET_H
// LLRenderTarget is unavailible on the mapserver since it uses FBOs.
-#if !LL_MESA_HEADLESS
#include "llgl.h"
#include "llrender.h"
@@ -157,7 +156,5 @@ protected:
static LLRenderTarget* sBoundTarget;
};
-#endif //!LL_MESA_HEADLESS
-
#endif
diff --git a/indra/llrender/llvertexbuffer.cpp b/indra/llrender/llvertexbuffer.cpp
index 28a14b23b9..37a4649cb6 100644
--- a/indra/llrender/llvertexbuffer.cpp
+++ b/indra/llrender/llvertexbuffer.cpp
@@ -1574,8 +1574,10 @@ volatile U8* LLVertexBuffer::mapVertexBuffer(S32 type, S32 index, S32 count, boo
{
if (map_range)
{
+#ifndef LL_MESA_HEADLESS
glBufferParameteriAPPLE(GL_ARRAY_BUFFER_ARB, GL_BUFFER_SERIALIZED_MODIFY_APPLE, GL_FALSE);
glBufferParameteriAPPLE(GL_ARRAY_BUFFER_ARB, GL_BUFFER_FLUSHING_UNMAP_APPLE, GL_FALSE);
+#endif
src = (U8*) glMapBufferARB(GL_ARRAY_BUFFER_ARB, GL_WRITE_ONLY_ARB);
}
else
@@ -1752,8 +1754,10 @@ volatile U8* LLVertexBuffer::mapIndexBuffer(S32 index, S32 count, bool map_range
{
if (map_range)
{
+#ifndef LL_MESA_HEADLESS
glBufferParameteriAPPLE(GL_ELEMENT_ARRAY_BUFFER_ARB, GL_BUFFER_SERIALIZED_MODIFY_APPLE, GL_FALSE);
glBufferParameteriAPPLE(GL_ELEMENT_ARRAY_BUFFER_ARB, GL_BUFFER_FLUSHING_UNMAP_APPLE, GL_FALSE);
+#endif
src = (U8*) glMapBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB, GL_WRITE_ONLY_ARB);
}
else
@@ -1881,7 +1885,9 @@ void LLVertexBuffer::unmapBuffer()
}
else if (gGLManager.mHasFlushBufferRange)
{
+#ifndef LL_MESA_HEADLESS
glFlushMappedBufferRangeAPPLE(GL_ARRAY_BUFFER_ARB, offset, length);
+#endif
}
stop_glerror();
}
@@ -1947,8 +1953,10 @@ void LLVertexBuffer::unmapBuffer()
else if (gGLManager.mHasFlushBufferRange)
{
#ifdef GL_APPLE_flush_buffer_range
+#ifndef LL_MESA_HEADLESS
glFlushMappedBufferRangeAPPLE(GL_ELEMENT_ARRAY_BUFFER_ARB, offset, length);
#endif
+#endif
}
stop_glerror();
}