Fix build

This commit is contained in:
Benau 2016-10-28 23:46:24 +08:00
parent 2f0252be98
commit 0165469301
5 changed files with 36 additions and 28 deletions

View File

@ -60,7 +60,7 @@ template<>
void expandTexSecondPass<GrassMat>(const GLMesh &mesh,
const std::vector<GLuint> &prefilled_tex)
{
TexExpander<typename GrassMat::InstancedSecondPassShader>::template
TexExpander<typename GrassMat::InstancedSecondPassShader>::
expandTex(mesh, GrassMat::SecondPassTextures, prefilled_tex[0],
prefilled_tex[1], prefilled_tex[2], prefilled_tex[3]);
}
@ -70,7 +70,7 @@ template<>
void expandHandlesSecondPass<GrassMat>(const std::vector<uint64_t> &handles)
{
uint64_t nulltex[10] = {};
HandleExpander<GrassMat::InstancedSecondPassShader>::template
HandleExpander<GrassMat::InstancedSecondPassShader>::
expand(nulltex, GrassMat::SecondPassTextures,
handles[0], handles[1], handles[2], handles[3]);
}

View File

@ -475,6 +475,12 @@ void DrawCalls::parseSceneManager(core::list<scene::ISceneNode*> &List,
// ----------------------------------------------------------------------------
DrawCalls::DrawCalls()
{
m_sync = 0;
m_solid_cmd_buffer = NULL;
m_shadow_cmd_buffer = NULL;
m_reflective_shadow_map_cmd_buffer = NULL;
m_glow_cmd_buffer = NULL;
#if !defined(USE_GLES2)
if(CVS->supportsIndirectInstancingRendering())
{
@ -488,6 +494,7 @@ DrawCalls::DrawCalls()
DrawCalls::~DrawCalls()
{
#if !defined(USE_GLES2)
delete m_solid_cmd_buffer;
delete m_shadow_cmd_buffer;

View File

@ -30,7 +30,7 @@ class DrawCalls
private:
std::vector<STKMeshCommon *> m_deferred_update;
irr::core::vector3df m_wind_dir;
GLsync m_sync = 0;
GLsync m_sync;
std::vector<irr::scene::ISceneNode *> m_immediate_draw_list;
std::vector<STKBillboard *> m_billboard_list;
@ -44,10 +44,10 @@ private:
#if !defined(USE_GLES2)
/** meshes data in VRAM */
SolidCommandBuffer *m_solid_cmd_buffer = NULL;
ShadowCommandBuffer *m_shadow_cmd_buffer = NULL;
ReflectiveShadowMapCommandBuffer *m_reflective_shadow_map_cmd_buffer = NULL;
GlowCommandBuffer *m_glow_cmd_buffer = NULL;
SolidCommandBuffer *m_solid_cmd_buffer;
ShadowCommandBuffer *m_shadow_cmd_buffer;
ReflectiveShadowMapCommandBuffer *m_reflective_shadow_map_cmd_buffer;
GlowCommandBuffer *m_glow_cmd_buffer;
#endif // !defined(USE_GLES2)
void clearLists();

View File

@ -22,6 +22,7 @@
#include "graphics/draw_calls.hpp"
#include "graphics/lighting_passes.hpp"
#include "graphics/shadow_matrices.hpp"
#include "utils/cpp2011.hpp"
#include <map>
#include <string>
@ -90,33 +91,33 @@ public:
ShaderBasedRenderer();
~ShaderBasedRenderer();
void onLoadWorld() ;
void onUnloadWorld();
void onLoadWorld() OVERRIDE;
void onUnloadWorld() OVERRIDE;
void resetPostProcessing() override;
void giveBoost(unsigned int cam_index) override;
void resetPostProcessing() OVERRIDE;
void giveBoost(unsigned int cam_index) OVERRIDE;
void addSkyBox(const std::vector<irr::video::ITexture*> &texture,
const std::vector<irr::video::ITexture*> &spherical_harmonics_textures) override;
void removeSkyBox() override;
const SHCoefficients* getSHCoefficients() const override;
GLuint getRenderTargetTexture(TypeRTT which) const override;
GLuint getDepthStencilTexture() const override;
const std::vector<irr::video::ITexture*> &spherical_harmonics_textures) OVERRIDE;
void removeSkyBox() OVERRIDE;
const SHCoefficients* getSHCoefficients() const OVERRIDE;
GLuint getRenderTargetTexture(TypeRTT which) const OVERRIDE;
GLuint getDepthStencilTexture() const OVERRIDE;
void setAmbientLight(const irr::video::SColorf &light,
bool force_SH_computation = true) override;
bool force_SH_computation = true) OVERRIDE;
void addSunLight(const irr::core::vector3df &pos) override;
void addSunLight(const irr::core::vector3df &pos) OVERRIDE;
void addGlowingNode(scene::ISceneNode *n,
float r = 1.0f, float g = 1.0f, float b = 1.0f) override;
float r = 1.0f, float g = 1.0f, float b = 1.0f) OVERRIDE;
void clearGlowingNodes() override;
void clearGlowingNodes() OVERRIDE;
void render(float dt);
void render(float dt) OVERRIDE;
std::unique_ptr<RenderTarget> createRenderTarget(const irr::core::dimension2du &dimension,
const std::string &name);
const std::string &name) OVERRIDE;
void renderToTexture(GL3RenderTarget *render_target,
irr::scene::ICameraSceneNode* camera,