More Compile SERVER_ONLY, still not fully working.
This commit is contained in:
parent
ddcddf4a0a
commit
61a3d10e10
@ -375,10 +375,12 @@ target_link_libraries(supertuxkart
|
||||
${FREETYPE_LIBRARIES}
|
||||
)
|
||||
|
||||
if(NOT USE_GLES2)
|
||||
target_link_libraries(supertuxkart ${OPENGL_LIBRARIES} glew)
|
||||
else()
|
||||
target_link_libraries(supertuxkart EGL GLESv2)
|
||||
if(NOT SERVER_ONLY)
|
||||
if(NOT USE_GLES2)
|
||||
target_link_libraries(supertuxkart ${OPENGL_LIBRARIES} glew)
|
||||
else()
|
||||
target_link_libraries(supertuxkart EGL GLESv2)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(UNIX AND NOT APPLE)
|
||||
|
@ -596,7 +596,6 @@ static GLXContext getMeAGLContext(Display *display, GLXFBConfig glxFBConfig, boo
|
||||
Context = glXCreateNewContext(display, glxFBConfig, GLX_RGBA_TYPE, NULL, True);
|
||||
return Context;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -15,6 +15,8 @@
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
#ifndef SERVER_ONLY
|
||||
|
||||
#include "graphics/command_buffer.hpp"
|
||||
#include "graphics/central_settings.hpp"
|
||||
#include "utils/cpp2011.hpp"
|
||||
@ -252,4 +254,6 @@ void GlowCommandBuffer::fill(OtherMeshMap *mesh_map)
|
||||
glUnmapBuffer(GL_DRAW_INDIRECT_BUFFER);
|
||||
|
||||
} //GlowCommandBuffer::fill
|
||||
#endif // !defined(USE_GLES2)
|
||||
#endif // !defined(USE_GLES2)
|
||||
|
||||
#endif // !SERVER_ONLY
|
@ -18,6 +18,8 @@
|
||||
#ifndef HEADER_COMMAND_BUFFER_HPP
|
||||
#define HEADER_COMMAND_BUFFER_HPP
|
||||
|
||||
#ifndef SERVER_ONLY
|
||||
|
||||
#include "graphics/draw_tools.hpp"
|
||||
#include "graphics/gl_headers.hpp"
|
||||
#include "graphics/material.hpp"
|
||||
@ -665,5 +667,6 @@ public:
|
||||
}
|
||||
} // multidraw
|
||||
};
|
||||
#endif // !defined(USE_GLES2)
|
||||
#endif //HEADER_COMMAND_BUFFER_HPP
|
||||
#endif // !defined(USE_GLES2)
|
||||
#endif // !SERVER_ONLY
|
||||
#endif // HEADER_COMMAND_BUFFER_HPP
|
||||
|
@ -15,7 +15,9 @@
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
#ifndef SERVER_ONLY
|
||||
#include "graphics/draw_calls.hpp"
|
||||
|
||||
#include "config/user_config.hpp"
|
||||
#include "graphics/draw_tools.hpp"
|
||||
#include "graphics/gpu_particles.hpp"
|
||||
@ -845,3 +847,5 @@ void DrawCalls::multidrawGlow() const
|
||||
m_glow_cmd_buffer->multidraw();
|
||||
}
|
||||
#endif // !defined(USE_GLES2)
|
||||
|
||||
#endif // !SERVER_ONLY
|
@ -18,6 +18,7 @@
|
||||
#ifndef HEADER_DRAW_CALLS_HPP
|
||||
#define HEADER_DRAW_CALLS_HPP
|
||||
|
||||
#ifndef SERVER_ONLY
|
||||
#include "graphics/command_buffer.hpp"
|
||||
#include <irrlicht.h>
|
||||
#include <unordered_map>
|
||||
@ -106,4 +107,5 @@ public:
|
||||
|
||||
};
|
||||
|
||||
#endif // !SERVER_ONLY
|
||||
#endif //HEADER_DRAW_CALLS_HPP
|
||||
|
@ -15,6 +15,8 @@
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
#ifndef SERVER_ONLY
|
||||
|
||||
#include "graphics/draw_policies.hpp"
|
||||
#include "graphics/draw_tools.hpp"
|
||||
#include "graphics/materials.hpp"
|
||||
@ -336,3 +338,5 @@ void MultidrawPolicy::drawReflectiveShadowMap(const DrawCalls& draw_calls,
|
||||
draw_calls.multidrawReflectiveShadowMaps(rsm_matrix);
|
||||
#endif //!defined(USE_GLES2)
|
||||
}
|
||||
|
||||
#endif // !SERVER_ONLY
|
@ -18,6 +18,8 @@
|
||||
#ifndef HEADER_DRAW_POLICIES_HPP
|
||||
#define HEADER_DRAW_POLICIES_HPP
|
||||
|
||||
#ifndef SERVER_ONLY
|
||||
|
||||
#include "graphics/draw_calls.hpp"
|
||||
|
||||
|
||||
@ -91,5 +93,5 @@ public:
|
||||
const core::matrix4 &rsm_matrix ) const;
|
||||
};
|
||||
|
||||
|
||||
#endif //HEADER_DRAW_POLICIES_HPP
|
||||
#endif // !SERVER_ONLY
|
||||
#endif // HEADER_DRAW_POLICIES_HPP
|
||||
|
@ -15,6 +15,8 @@
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
#ifndef SERVER_ONLY
|
||||
|
||||
#include "graphics/geometry_passes.hpp"
|
||||
#include "graphics/callbacks.hpp"
|
||||
#include "graphics/draw_tools.hpp"
|
||||
@ -385,5 +387,4 @@ void AbstractGeometryPasses::renderTransparent(const DrawCalls& draw_calls,
|
||||
|
||||
} // renderTransparent
|
||||
|
||||
|
||||
|
||||
#endif // !SERVER_ONLY
|
@ -15,6 +15,8 @@
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
#ifndef SERVER_ONLY
|
||||
|
||||
#ifndef HEADER_GEOMETRY_PASSES_HPP
|
||||
#define HEADER_GEOMETRY_PASSES_HPP
|
||||
|
||||
@ -170,4 +172,5 @@ public:
|
||||
};
|
||||
|
||||
|
||||
#endif //HEADER_GEOMETRY_PASSES_HPP
|
||||
#endif // !SERVER_ONLY
|
||||
#endif // HEADER_GEOMETRY_PASSES_HPP
|
||||
|
@ -75,9 +75,9 @@
|
||||
IRRLICHT_VERSION_MINOR < 7 || \
|
||||
_IRR_MATERIAL_MAX_TEXTURES_ < 8 || \
|
||||
( !defined(_IRR_COMPILE_WITH_OPENGL_) && \
|
||||
!defined(SERVER_ONLY) ) && \
|
||||
!defined(SERVER_ONLY) && \
|
||||
!defined(_IRR_COMPILE_WITH_OGLES2_) ) || \
|
||||
!defined(_IRR_COMPILE_WITH_B3D_LOADER_))
|
||||
!defined(_IRR_COMPILE_WITH_B3D_LOADER_) )
|
||||
#error "Building against an incompatible Irrlicht. Distros, \
|
||||
please use the included version."
|
||||
#endif
|
||||
@ -556,11 +556,13 @@ void IrrDriver::initDevice()
|
||||
m_video_driver = m_device->getVideoDriver();
|
||||
|
||||
m_actual_screen_size = m_video_driver->getCurrentRenderTargetSize();
|
||||
|
||||
|
||||
#ifndef SERVER_ONLY
|
||||
if(CVS->isGLSL())
|
||||
m_renderer = new ShaderBasedRenderer();
|
||||
else
|
||||
m_renderer = new FixedPipelineRenderer();
|
||||
#endif
|
||||
|
||||
if (UserConfigParams::m_shadows_resolution != 0 &&
|
||||
(UserConfigParams::m_shadows_resolution < 512 ||
|
||||
|
@ -17,6 +17,8 @@
|
||||
|
||||
#include "graphics/materials.hpp"
|
||||
|
||||
#ifndef SERVER_ONLY
|
||||
|
||||
const STK::Tuple<size_t> DefaultMaterial::FirstPassTextures
|
||||
= STK::Tuple<size_t>(1);
|
||||
const STK::Tuple<size_t, size_t, size_t> DefaultMaterial::SecondPassTextures
|
||||
@ -76,3 +78,5 @@ const STK::Tuple<size_t, size_t, size_t, size_t, size_t>
|
||||
const STK::Tuple<> SplattingMat::ShadowTextures;
|
||||
const STK::Tuple<size_t, size_t, size_t, size_t, size_t> SplattingMat::RSMTextures
|
||||
= STK::Tuple<size_t, size_t, size_t, size_t, size_t>(1, 2, 3, 4, 5);
|
||||
|
||||
#endif
|
@ -18,6 +18,8 @@
|
||||
#ifndef HEADER_MATERIAL_TYPE_HPP
|
||||
#define HEADER_MATERIAL_TYPE_HPP
|
||||
|
||||
#ifndef SERVER_ONLY
|
||||
|
||||
#include "graphics/shader.hpp"
|
||||
#include "graphics/shaders.hpp"
|
||||
#include "graphics/stk_mesh.hpp"
|
||||
@ -796,4 +798,5 @@ struct SplattingMat
|
||||
}; // SplattingMat
|
||||
|
||||
|
||||
#endif //HEADER_MATERIAL_TYPE_HPP
|
||||
#endif // !SERVER_ONLY
|
||||
#endif // HEADER_MATERIAL_TYPE_HPP
|
||||
|
@ -15,6 +15,7 @@
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
#ifndef SERVER_ONLY
|
||||
#include "graphics/render_target.hpp"
|
||||
|
||||
#include "graphics/2dutils.hpp"
|
||||
@ -151,3 +152,5 @@ void GL3RenderTarget::draw2DImage(const irr::core::rect<s32>& dest_rect,
|
||||
glDisable(GL_FRAMEBUFFER_SRGB);
|
||||
|
||||
} // draw2DImage
|
||||
|
||||
#endif // !SERVER_ONLY
|
@ -15,6 +15,8 @@
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
#ifndef SERVER_ONLY
|
||||
|
||||
#include "graphics/shader_based_renderer.hpp"
|
||||
|
||||
#include "config/user_config.hpp"
|
||||
@ -973,3 +975,5 @@ void ShaderBasedRenderer::renderToTexture(GL3RenderTarget *render_target,
|
||||
irr_driver->getSceneManager()->setActiveCamera(NULL);
|
||||
|
||||
} //renderToTexture
|
||||
|
||||
#endif // !SERVER_ONLY
|
||||
|
@ -18,6 +18,8 @@
|
||||
#ifndef HEADER_SHADER_BASED_RENDERER_HPP
|
||||
#define HEADER_SHADER_BASED_RENDERER_HPP
|
||||
|
||||
#ifndef SERVER_ONLY
|
||||
|
||||
#include "graphics/abstract_renderer.hpp"
|
||||
#include "graphics/draw_calls.hpp"
|
||||
#include "graphics/lighting_passes.hpp"
|
||||
@ -126,4 +128,5 @@ public:
|
||||
|
||||
};
|
||||
|
||||
#endif //HEADER_SHADER_BASED_RENDERER_HPP
|
||||
#endif // !SERVER_ONLY
|
||||
#endif // HEADER_SHADER_BASED_RENDERER_HPP
|
||||
|
@ -1210,9 +1210,10 @@ namespace GUIEngine
|
||||
y_from - count*text_height),
|
||||
core::dimension2d<s32>(screen_size.Width,
|
||||
text_height) );
|
||||
|
||||
#ifndef SERVER_ONLY
|
||||
GL32_draw2DRectangle(SColor(255,252,248,230),
|
||||
msgRect);
|
||||
#endif
|
||||
Private::g_font->draw((*it).m_message.c_str(),
|
||||
msgRect,
|
||||
video::SColor(255, 255, 0, 0),
|
||||
@ -1254,6 +1255,7 @@ namespace GUIEngine
|
||||
|
||||
void renderLoading(bool clearIcons)
|
||||
{
|
||||
#ifndef SERVER_ONLY
|
||||
if (clearIcons) g_loading_icons.clear();
|
||||
|
||||
g_skin->drawBgImage();
|
||||
@ -1317,7 +1319,7 @@ namespace GUIEngine
|
||||
x = ICON_MARGIN;
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
} // renderLoading
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user