Fixed draw final pass with shided objects having to many if-statments.
Shields is working with transparancy Player cameras should have nearclip fater away and far clip nearer. Defaultconfig push
This commit is contained in:
@@ -38,12 +38,6 @@ private:
|
|||||||
void DrawShieldedModelRenderQueue(std::list<std::shared_ptr<RenderJob>>& jobs, RenderScene& scene);
|
void DrawShieldedModelRenderQueue(std::list<std::shared_ptr<RenderJob>>& jobs, RenderScene& scene);
|
||||||
void DrawToDepthStencilBuffer(std::list<std::shared_ptr<RenderJob>>& jobs, RenderScene& scene);
|
void DrawToDepthStencilBuffer(std::list<std::shared_ptr<RenderJob>>& jobs, RenderScene& scene);
|
||||||
|
|
||||||
void DrawExplosionSetup(ShaderProgram* shader, GLuint shaderHandle, std::shared_ptr<ExplosionEffectJob>& job, RenderScene& scene);
|
|
||||||
void DrawSkinnedExplosionSetup(ShaderProgram* shader, GLuint shaderHandle, std::shared_ptr<ExplosionEffectJob>& job, RenderScene& scene);
|
|
||||||
|
|
||||||
void DrawModelSetup(ShaderProgram* shader, GLuint shaderHandle, std::shared_ptr<ModelJob>& job, RenderScene& scene);
|
|
||||||
void DrawSkinnedModelSetup(ShaderProgram* shader, GLuint shaderHandle, std::shared_ptr<ModelJob>& job, RenderScene& scene);
|
|
||||||
|
|
||||||
void BindExplosionUniforms(GLuint shaderHandle, std::shared_ptr<ExplosionEffectJob>& job, RenderScene& scene);
|
void BindExplosionUniforms(GLuint shaderHandle, std::shared_ptr<ExplosionEffectJob>& job, RenderScene& scene);
|
||||||
void BindModelUniforms(GLuint shaderHandle, std::shared_ptr<ModelJob>& job, RenderScene& scene);
|
void BindModelUniforms(GLuint shaderHandle, std::shared_ptr<ModelJob>& job, RenderScene& scene);
|
||||||
|
|
||||||
|
|||||||
@@ -68,5 +68,17 @@ Contrast=1.5
|
|||||||
Intensity=1.0
|
Intensity=1.0
|
||||||
NumSamples=24
|
NumSamples=24
|
||||||
NumTurns=17
|
NumTurns=17
|
||||||
NumIterations=13
|
NumIterations=9
|
||||||
TextureQuality=0
|
TextureQuality=0
|
||||||
|
|
||||||
|
[GLOW]
|
||||||
|
Quality=3;
|
||||||
|
|
||||||
|
[GLOW1]
|
||||||
|
NumIterations=5
|
||||||
|
|
||||||
|
[GLOW2]
|
||||||
|
NumIterations=9
|
||||||
|
|
||||||
|
[GLOW3]
|
||||||
|
NumIterations=13
|
||||||
@@ -13,7 +13,7 @@
|
|||||||
</c:AssaultWeapon>
|
</c:AssaultWeapon>
|
||||||
<c:Collidable/>
|
<c:Collidable/>
|
||||||
<c:DefenderWeapon>
|
<c:DefenderWeapon>
|
||||||
<TimeSinceLastFire>1.6944730461160304</TimeSinceLastFire>
|
<TimeSinceLastFire>52.867678870419283</TimeSinceLastFire>
|
||||||
</c:DefenderWeapon>
|
</c:DefenderWeapon>
|
||||||
<c:DoubleJump/>
|
<c:DoubleJump/>
|
||||||
<c:Health/>
|
<c:Health/>
|
||||||
@@ -37,7 +37,10 @@
|
|||||||
<Children>
|
<Children>
|
||||||
<Entity name="Camera">
|
<Entity name="Camera">
|
||||||
<Components>
|
<Components>
|
||||||
<c:Camera/>
|
<c:Camera>
|
||||||
|
<NearClip>0.10000000149011612</NearClip>
|
||||||
|
<FarClip>300</FarClip>
|
||||||
|
</c:Camera>
|
||||||
<c:Transform>
|
<c:Transform>
|
||||||
<Position X="0" Y="1.27700007" Z="0"/>
|
<Position X="0" Y="1.27700007" Z="0"/>
|
||||||
</c:Transform>
|
</c:Transform>
|
||||||
@@ -372,7 +375,7 @@
|
|||||||
<Components>
|
<Components>
|
||||||
<c:Animation>
|
<c:Animation>
|
||||||
<AnimationName1>Idle</AnimationName1>
|
<AnimationName1>Idle</AnimationName1>
|
||||||
<Time1>0.67172915251515519</Time1>
|
<Time1>1.9408570429715581</Time1>
|
||||||
<Speed1>1</Speed1>
|
<Speed1>1</Speed1>
|
||||||
<AnimationName2></AnimationName2>
|
<AnimationName2></AnimationName2>
|
||||||
<AnimationName3></AnimationName3>
|
<AnimationName3></AnimationName3>
|
||||||
@@ -386,25 +389,25 @@
|
|||||||
<Children>
|
<Children>
|
||||||
<Entity name="PrimaryAttachment">
|
<Entity name="PrimaryAttachment">
|
||||||
<Components>
|
<Components>
|
||||||
|
<c:WeaponAttachment>
|
||||||
|
<Weapon>DefenderWeapon</Weapon>
|
||||||
|
</c:WeaponAttachment>
|
||||||
<c:Spawner>
|
<c:Spawner>
|
||||||
<EntityFile>Schema/Entities/DefenderWeaponView.xml</EntityFile>
|
<EntityFile>Schema/Entities/DefenderWeaponView.xml</EntityFile>
|
||||||
</c:Spawner>
|
</c:Spawner>
|
||||||
<c:Transform/>
|
<c:Transform/>
|
||||||
<c:WeaponAttachment>
|
|
||||||
<Weapon>DefenderWeapon</Weapon>
|
|
||||||
</c:WeaponAttachment>
|
|
||||||
</Components>
|
</Components>
|
||||||
<Children/>
|
<Children/>
|
||||||
</Entity>
|
</Entity>
|
||||||
<Entity name="SecondaryAttachment">
|
<Entity name="SecondaryAttachment">
|
||||||
<Components>
|
<Components>
|
||||||
|
<c:WeaponAttachment>
|
||||||
|
<Weapon>AssaultWeapon</Weapon>
|
||||||
|
</c:WeaponAttachment>
|
||||||
<c:Spawner>
|
<c:Spawner>
|
||||||
<EntityFile>Schema/Entities/AssaultWeaponView.xml</EntityFile>
|
<EntityFile>Schema/Entities/AssaultWeaponView.xml</EntityFile>
|
||||||
</c:Spawner>
|
</c:Spawner>
|
||||||
<c:Transform/>
|
<c:Transform/>
|
||||||
<c:WeaponAttachment>
|
|
||||||
<Weapon>AssaultWeapon</Weapon>
|
|
||||||
</c:WeaponAttachment>
|
|
||||||
</Components>
|
</Components>
|
||||||
<Children/>
|
<Children/>
|
||||||
</Entity>
|
</Entity>
|
||||||
@@ -414,7 +417,10 @@
|
|||||||
</Entity>
|
</Entity>
|
||||||
<Entity name="ThirdPersonCamera">
|
<Entity name="ThirdPersonCamera">
|
||||||
<Components>
|
<Components>
|
||||||
<c:Camera/>
|
<c:Camera>
|
||||||
|
<NearClip>0.10000000149011612</NearClip>
|
||||||
|
<FarClip>300</FarClip>
|
||||||
|
</c:Camera>
|
||||||
<c:Model>
|
<c:Model>
|
||||||
<Resource>Models/Widgets/Camera.mesh</Resource>
|
<Resource>Models/Widgets/Camera.mesh</Resource>
|
||||||
<Visible>false</Visible>
|
<Visible>false</Visible>
|
||||||
@@ -430,6 +436,7 @@
|
|||||||
<Components>
|
<Components>
|
||||||
<c:Animation>
|
<c:Animation>
|
||||||
<AnimationName1>Idle</AnimationName1>
|
<AnimationName1>Idle</AnimationName1>
|
||||||
|
<Time1>1.5631122524686134</Time1>
|
||||||
<Speed1>1</Speed1>
|
<Speed1>1</Speed1>
|
||||||
<AnimationName2></AnimationName2>
|
<AnimationName2></AnimationName2>
|
||||||
<AnimationName3></AnimationName3>
|
<AnimationName3></AnimationName3>
|
||||||
@@ -449,31 +456,31 @@
|
|||||||
<Children>
|
<Children>
|
||||||
<Entity name="PrimaryAttachment">
|
<Entity name="PrimaryAttachment">
|
||||||
<Components>
|
<Components>
|
||||||
<c:Spawner>
|
|
||||||
<EntityFile>Schema/Entities/DefenderWeaponWorld.xml</EntityFile>
|
|
||||||
</c:Spawner>
|
|
||||||
<c:Transform/>
|
|
||||||
<c:WeaponAttachment>
|
<c:WeaponAttachment>
|
||||||
<Weapon>DefenderWeapon</Weapon>
|
<Weapon>DefenderWeapon</Weapon>
|
||||||
<Person>
|
<Person>
|
||||||
<ThirdPerson/>
|
<ThirdPerson/>
|
||||||
</Person>
|
</Person>
|
||||||
</c:WeaponAttachment>
|
</c:WeaponAttachment>
|
||||||
|
<c:Spawner>
|
||||||
|
<EntityFile>Schema/Entities/DefenderWeaponWorld.xml</EntityFile>
|
||||||
|
</c:Spawner>
|
||||||
|
<c:Transform/>
|
||||||
</Components>
|
</Components>
|
||||||
<Children/>
|
<Children/>
|
||||||
</Entity>
|
</Entity>
|
||||||
<Entity name="SecondaryAttachment">
|
<Entity name="SecondaryAttachment">
|
||||||
<Components>
|
<Components>
|
||||||
<c:Spawner>
|
|
||||||
<EntityFile>Schema/Entities/AssaultWeaponWorld.xml</EntityFile>
|
|
||||||
</c:Spawner>
|
|
||||||
<c:Transform/>
|
|
||||||
<c:WeaponAttachment>
|
<c:WeaponAttachment>
|
||||||
<Weapon>AssaultWeapon</Weapon>
|
<Weapon>AssaultWeapon</Weapon>
|
||||||
<Person>
|
<Person>
|
||||||
<ThirdPerson/>
|
<ThirdPerson/>
|
||||||
</Person>
|
</Person>
|
||||||
</c:WeaponAttachment>
|
</c:WeaponAttachment>
|
||||||
|
<c:Spawner>
|
||||||
|
<EntityFile>Schema/Entities/AssaultWeaponWorld.xml</EntityFile>
|
||||||
|
</c:Spawner>
|
||||||
|
<c:Transform/>
|
||||||
</Components>
|
</Components>
|
||||||
<Children/>
|
<Children/>
|
||||||
</Entity>
|
</Entity>
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
</c:AssaultWeapon>
|
</c:AssaultWeapon>
|
||||||
<c:Collidable/>
|
<c:Collidable/>
|
||||||
<c:DefenderWeapon>
|
<c:DefenderWeapon>
|
||||||
<TimeSinceLastFire>1.6944730461160304</TimeSinceLastFire>
|
<TimeSinceLastFire>22.22055262342397</TimeSinceLastFire>
|
||||||
</c:DefenderWeapon>
|
</c:DefenderWeapon>
|
||||||
<c:DoubleJump/>
|
<c:DoubleJump/>
|
||||||
<c:Health/>
|
<c:Health/>
|
||||||
@@ -37,7 +37,10 @@
|
|||||||
<Children>
|
<Children>
|
||||||
<Entity name="Camera">
|
<Entity name="Camera">
|
||||||
<Components>
|
<Components>
|
||||||
<c:Camera/>
|
<c:Camera>
|
||||||
|
<NearClip>0.10000000149011612</NearClip>
|
||||||
|
<FarClip>300</FarClip>
|
||||||
|
</c:Camera>
|
||||||
<c:Transform>
|
<c:Transform>
|
||||||
<Position X="0" Y="1.27700007" Z="0"/>
|
<Position X="0" Y="1.27700007" Z="0"/>
|
||||||
</c:Transform>
|
</c:Transform>
|
||||||
@@ -372,7 +375,7 @@
|
|||||||
<Components>
|
<Components>
|
||||||
<c:Animation>
|
<c:Animation>
|
||||||
<AnimationName1>Idle</AnimationName1>
|
<AnimationName1>Idle</AnimationName1>
|
||||||
<Time1>0.67172915251515519</Time1>
|
<Time1>1.1978087298230946</Time1>
|
||||||
<Speed1>1</Speed1>
|
<Speed1>1</Speed1>
|
||||||
<AnimationName2></AnimationName2>
|
<AnimationName2></AnimationName2>
|
||||||
<AnimationName3></AnimationName3>
|
<AnimationName3></AnimationName3>
|
||||||
@@ -386,25 +389,25 @@
|
|||||||
<Children>
|
<Children>
|
||||||
<Entity name="PrimaryAttachment">
|
<Entity name="PrimaryAttachment">
|
||||||
<Components>
|
<Components>
|
||||||
|
<c:WeaponAttachment>
|
||||||
|
<Weapon>DefenderWeapon</Weapon>
|
||||||
|
</c:WeaponAttachment>
|
||||||
<c:Spawner>
|
<c:Spawner>
|
||||||
<EntityFile>Schema/Entities/DefenderWeaponViewRed.xml</EntityFile>
|
<EntityFile>Schema/Entities/DefenderWeaponViewRed.xml</EntityFile>
|
||||||
</c:Spawner>
|
</c:Spawner>
|
||||||
<c:Transform/>
|
<c:Transform/>
|
||||||
<c:WeaponAttachment>
|
|
||||||
<Weapon>DefenderWeapon</Weapon>
|
|
||||||
</c:WeaponAttachment>
|
|
||||||
</Components>
|
</Components>
|
||||||
<Children/>
|
<Children/>
|
||||||
</Entity>
|
</Entity>
|
||||||
<Entity name="SecondaryAttachment">
|
<Entity name="SecondaryAttachment">
|
||||||
<Components>
|
<Components>
|
||||||
|
<c:WeaponAttachment>
|
||||||
|
<Weapon>AssaultWeapon</Weapon>
|
||||||
|
</c:WeaponAttachment>
|
||||||
<c:Spawner>
|
<c:Spawner>
|
||||||
<EntityFile>Schema/Entities/AssaultWeaponView.xml</EntityFile>
|
<EntityFile>Schema/Entities/AssaultWeaponView.xml</EntityFile>
|
||||||
</c:Spawner>
|
</c:Spawner>
|
||||||
<c:Transform/>
|
<c:Transform/>
|
||||||
<c:WeaponAttachment>
|
|
||||||
<Weapon>AssaultWeapon</Weapon>
|
|
||||||
</c:WeaponAttachment>
|
|
||||||
</Components>
|
</Components>
|
||||||
<Children/>
|
<Children/>
|
||||||
</Entity>
|
</Entity>
|
||||||
@@ -414,7 +417,10 @@
|
|||||||
</Entity>
|
</Entity>
|
||||||
<Entity name="ThirdPersonCamera">
|
<Entity name="ThirdPersonCamera">
|
||||||
<Components>
|
<Components>
|
||||||
<c:Camera/>
|
<c:Camera>
|
||||||
|
<NearClip>0.10000000149011612</NearClip>
|
||||||
|
<FarClip>300</FarClip>
|
||||||
|
</c:Camera>
|
||||||
<c:Model>
|
<c:Model>
|
||||||
<Resource>Models/Widgets/Camera.mesh</Resource>
|
<Resource>Models/Widgets/Camera.mesh</Resource>
|
||||||
<Visible>false</Visible>
|
<Visible>false</Visible>
|
||||||
@@ -430,6 +436,7 @@
|
|||||||
<Components>
|
<Components>
|
||||||
<c:Animation>
|
<c:Animation>
|
||||||
<AnimationName1>Idle</AnimationName1>
|
<AnimationName1>Idle</AnimationName1>
|
||||||
|
<Time1>0.69274608502888668</Time1>
|
||||||
<Speed1>1</Speed1>
|
<Speed1>1</Speed1>
|
||||||
<AnimationName2></AnimationName2>
|
<AnimationName2></AnimationName2>
|
||||||
<AnimationName3></AnimationName3>
|
<AnimationName3></AnimationName3>
|
||||||
@@ -449,31 +456,31 @@
|
|||||||
<Children>
|
<Children>
|
||||||
<Entity name="PrimaryAttachment">
|
<Entity name="PrimaryAttachment">
|
||||||
<Components>
|
<Components>
|
||||||
<c:Spawner>
|
|
||||||
<EntityFile>Schema/Entities/DefenderWeaponWorldRed.xml</EntityFile>
|
|
||||||
</c:Spawner>
|
|
||||||
<c:Transform/>
|
|
||||||
<c:WeaponAttachment>
|
<c:WeaponAttachment>
|
||||||
<Weapon>DefenderWeapon</Weapon>
|
<Weapon>DefenderWeapon</Weapon>
|
||||||
<Person>
|
<Person>
|
||||||
<ThirdPerson/>
|
<ThirdPerson/>
|
||||||
</Person>
|
</Person>
|
||||||
</c:WeaponAttachment>
|
</c:WeaponAttachment>
|
||||||
|
<c:Spawner>
|
||||||
|
<EntityFile>Schema/Entities/DefenderWeaponWorldRed.xml</EntityFile>
|
||||||
|
</c:Spawner>
|
||||||
|
<c:Transform/>
|
||||||
</Components>
|
</Components>
|
||||||
<Children/>
|
<Children/>
|
||||||
</Entity>
|
</Entity>
|
||||||
<Entity name="SecondaryAttachment">
|
<Entity name="SecondaryAttachment">
|
||||||
<Components>
|
<Components>
|
||||||
<c:Spawner>
|
|
||||||
<EntityFile>Schema/Entities/AssaultWeaponWorld.xml</EntityFile>
|
|
||||||
</c:Spawner>
|
|
||||||
<c:Transform/>
|
|
||||||
<c:WeaponAttachment>
|
<c:WeaponAttachment>
|
||||||
<Weapon>AssaultWeapon</Weapon>
|
<Weapon>AssaultWeapon</Weapon>
|
||||||
<Person>
|
<Person>
|
||||||
<ThirdPerson/>
|
<ThirdPerson/>
|
||||||
</Person>
|
</Person>
|
||||||
</c:WeaponAttachment>
|
</c:WeaponAttachment>
|
||||||
|
<c:Spawner>
|
||||||
|
<EntityFile>Schema/Entities/AssaultWeaponWorld.xml</EntityFile>
|
||||||
|
</c:Spawner>
|
||||||
|
<c:Transform/>
|
||||||
</Components>
|
</Components>
|
||||||
<Children/>
|
<Children/>
|
||||||
</Entity>
|
</Entity>
|
||||||
|
|||||||
@@ -236,7 +236,7 @@ void DrawFinalPass::InitializeShaderPrograms()
|
|||||||
void DrawFinalPass::Draw(RenderScene& scene)
|
void DrawFinalPass::Draw(RenderScene& scene)
|
||||||
{
|
{
|
||||||
GLERROR("Pre");
|
GLERROR("Pre");
|
||||||
DrawStencilState* stateDethp = new DrawStencilState(m_ShieldDepthFrameBuffer.GetHandle());
|
DrawFinalPassState* stateDethp = new DrawFinalPassState(m_ShieldDepthFrameBuffer.GetHandle());
|
||||||
//Draw shields to stencil
|
//Draw shields to stencil
|
||||||
DrawToDepthStencilBuffer(scene.Jobs.ShieldObjects, scene);
|
DrawToDepthStencilBuffer(scene.Jobs.ShieldObjects, scene);
|
||||||
GLERROR("StencilPass");
|
GLERROR("StencilPass");
|
||||||
@@ -276,13 +276,13 @@ void DrawFinalPass::Draw(RenderScene& scene)
|
|||||||
|
|
||||||
//state->Disable(GL_STENCIL_TEST);
|
//state->Disable(GL_STENCIL_TEST);
|
||||||
//Draw Transparen Shielded objects
|
//Draw Transparen Shielded objects
|
||||||
|
state->BlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||||
DrawModelRenderQueuesWithShieldCheck(scene.Jobs.TransparentObjects, scene); //might need changing
|
DrawModelRenderQueuesWithShieldCheck(scene.Jobs.TransparentObjects, scene); //might need changing
|
||||||
GLERROR("Shielded Transparent objects");
|
GLERROR("Shielded Transparent objects");
|
||||||
|
|
||||||
//Draw Transparen objects
|
//Draw Transparen objects
|
||||||
//state->BlendFunc(GL_ONE, GL_ONE);
|
//state->BlendFunc(GL_ONE, GL_ONE);
|
||||||
//state->StencilFunc(GL_EQUAL, 1, 0xFF);
|
//state->StencilFunc(GL_EQUAL, 1, 0xFF);
|
||||||
state->BlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
|
||||||
//DrawModelRenderQueues(scene.Jobs.TransparentObjects, scene);
|
//DrawModelRenderQueues(scene.Jobs.TransparentObjects, scene);
|
||||||
GLERROR("TransparentObjects");
|
GLERROR("TransparentObjects");
|
||||||
//state->BlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
//state->BlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||||
@@ -349,78 +349,72 @@ void DrawFinalPass::DrawModelRenderQueues(std::list<std::shared_ptr<RenderJob>>&
|
|||||||
switch (explosionEffectJob->Type) {
|
switch (explosionEffectJob->Type) {
|
||||||
case RawModel::MaterialType::Basic:
|
case RawModel::MaterialType::Basic:
|
||||||
case RawModel::MaterialType::SingleTextures:
|
case RawModel::MaterialType::SingleTextures:
|
||||||
{
|
{
|
||||||
if (explosionEffectJob->Model->IsSkinned()) {
|
if (explosionEffectJob->Model->IsSkinned()) {
|
||||||
|
|
||||||
m_ExplosionEffectSkinnedProgram->Bind();
|
m_ExplosionEffectSkinnedProgram->Bind();
|
||||||
GLERROR("Bind ExplosionEffectSkinned program");
|
GLERROR("Bind ExplosionEffectSkinned program");
|
||||||
//bind uniforms
|
//bind uniforms
|
||||||
BindExplosionUniforms(explosionSkinnedHandle, explosionEffectJob, scene);
|
BindExplosionUniforms(explosionSkinnedHandle, explosionEffectJob, scene);
|
||||||
//bind textures
|
//bind textures
|
||||||
BindExplosionTextures(explosionSkinnedHandle, explosionEffectJob);
|
BindExplosionTextures(explosionSkinnedHandle, explosionEffectJob);
|
||||||
glActiveTexture(GL_TEXTURE5);
|
glActiveTexture(GL_TEXTURE5);
|
||||||
glBindTexture(GL_TEXTURE_CUBE_MAP, m_CubeMapPass->m_CubeMapTexture);
|
glBindTexture(GL_TEXTURE_CUBE_MAP, m_CubeMapPass->m_CubeMapTexture);
|
||||||
glUniform3fv(glGetUniformLocation(explosionSkinnedHandle, "CameraPosition"), 1, glm::value_ptr(scene.Camera->Position()));
|
glUniform3fv(glGetUniformLocation(explosionSkinnedHandle, "CameraPosition"), 1, glm::value_ptr(scene.Camera->Position()));
|
||||||
|
|
||||||
std::vector<glm::mat4> frameBones;
|
std::vector<glm::mat4> frameBones;
|
||||||
if (explosionEffectJob->AnimationOffset.animation != nullptr) {
|
if (explosionEffectJob->AnimationOffset.animation != nullptr) {
|
||||||
frameBones = explosionEffectJob->Skeleton->GetFrameBones(explosionEffectJob->Animations, explosionEffectJob->AnimationOffset);
|
frameBones = explosionEffectJob->Skeleton->GetFrameBones(explosionEffectJob->Animations, explosionEffectJob->AnimationOffset);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
frameBones = explosionEffectJob->Skeleton->GetFrameBones(explosionEffectJob->Animations);
|
||||||
|
}
|
||||||
|
glUniformMatrix4fv(glGetUniformLocation(explosionSkinnedHandle, "Bones"), frameBones.size(), GL_FALSE, glm::value_ptr(frameBones[0]));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
frameBones = explosionEffectJob->Skeleton->GetFrameBones(explosionEffectJob->Animations);
|
m_ExplosionEffectProgram->Bind();
|
||||||
|
GLERROR("Bind ExplosionEffect program");
|
||||||
|
//bind uniforms
|
||||||
|
BindExplosionUniforms(explosionHandle, explosionEffectJob, scene);
|
||||||
|
//bind textures
|
||||||
|
BindExplosionTextures(explosionHandle, explosionEffectJob);
|
||||||
|
glActiveTexture(GL_TEXTURE5);
|
||||||
|
glBindTexture(GL_TEXTURE_CUBE_MAP, m_CubeMapPass->m_CubeMapTexture);
|
||||||
|
glUniform3fv(glGetUniformLocation(explosionHandle, "CameraPosition"), 1, glm::value_ptr(scene.Camera->Position()));
|
||||||
}
|
}
|
||||||
glUniformMatrix4fv(glGetUniformLocation(explosionSkinnedHandle, "Bones"), frameBones.size(), GL_FALSE, glm::value_ptr(frameBones[0]));
|
break;
|
||||||
DrawSkinnedExplosionSetup(m_ExplosionEffectSkinnedProgram, explosionSkinnedHandle, explosionEffectJob, scene);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
m_ExplosionEffectProgram->Bind();
|
|
||||||
GLERROR("Bind ExplosionEffect program");
|
|
||||||
//bind uniforms
|
|
||||||
BindExplosionUniforms(explosionHandle, explosionEffectJob, scene);
|
|
||||||
//bind textures
|
|
||||||
BindExplosionTextures(explosionHandle, explosionEffectJob);
|
|
||||||
glActiveTexture(GL_TEXTURE5);
|
|
||||||
glBindTexture(GL_TEXTURE_CUBE_MAP, m_CubeMapPass->m_CubeMapTexture);
|
|
||||||
glUniform3fv(glGetUniformLocation(explosionHandle, "CameraPosition"), 1, glm::value_ptr(scene.Camera->Position()));
|
|
||||||
|
|
||||||
DrawExplosionSetup(m_ExplosionEffectProgram, explosionHandle, explosionEffectJob, scene);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
case RawModel::MaterialType::SplatMapping:
|
case RawModel::MaterialType::SplatMapping:
|
||||||
{
|
{
|
||||||
if (explosionEffectJob->Model->IsSkinned()) {
|
if (explosionEffectJob->Model->IsSkinned()) {
|
||||||
m_ExplosionEffectSplatMapSkinnedProgram->Bind();
|
m_ExplosionEffectSplatMapSkinnedProgram->Bind();
|
||||||
GLERROR("Bind ExplosionEffectSplatMapSkinned program");
|
GLERROR("Bind ExplosionEffectSplatMapSkinned program");
|
||||||
//bind uniforms
|
//bind uniforms
|
||||||
BindExplosionUniforms(explosionSplatMapSkinnedHandle, explosionEffectJob, scene);
|
BindExplosionUniforms(explosionSplatMapSkinnedHandle, explosionEffectJob, scene);
|
||||||
//bind textures
|
//bind textures
|
||||||
BindExplosionTextures(explosionSplatMapSkinnedHandle, explosionEffectJob);
|
BindExplosionTextures(explosionSplatMapSkinnedHandle, explosionEffectJob);
|
||||||
GLERROR("asdasd");
|
GLERROR("asdasd");
|
||||||
std::vector<glm::mat4> frameBones;
|
std::vector<glm::mat4> frameBones;
|
||||||
if (explosionEffectJob->AnimationOffset.animation != nullptr) {
|
if (explosionEffectJob->AnimationOffset.animation != nullptr) {
|
||||||
frameBones = explosionEffectJob->Skeleton->GetFrameBones(explosionEffectJob->Animations, explosionEffectJob->AnimationOffset);
|
frameBones = explosionEffectJob->Skeleton->GetFrameBones(explosionEffectJob->Animations, explosionEffectJob->AnimationOffset);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
frameBones = explosionEffectJob->Skeleton->GetFrameBones(explosionEffectJob->Animations);
|
||||||
|
}
|
||||||
|
glUniformMatrix4fv(glGetUniformLocation(explosionSplatMapSkinnedHandle, "Bones"), frameBones.size(), GL_FALSE, glm::value_ptr(frameBones[0]));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
frameBones = explosionEffectJob->Skeleton->GetFrameBones(explosionEffectJob->Animations);
|
m_ExplosionEffectSplatMapProgram->Bind();
|
||||||
|
GLERROR("Bind ExplosionEffectSplatMap program");
|
||||||
|
//bind uniforms
|
||||||
|
//bind uniforms
|
||||||
|
BindExplosionUniforms(explosionSplatMapHandle, explosionEffectJob, scene);
|
||||||
|
//bind textures
|
||||||
|
BindExplosionTextures(explosionSplatMapHandle, explosionEffectJob);
|
||||||
|
GLERROR("asdasd");
|
||||||
}
|
}
|
||||||
glUniformMatrix4fv(glGetUniformLocation(explosionSplatMapSkinnedHandle, "Bones"), frameBones.size(), GL_FALSE, glm::value_ptr(frameBones[0]));
|
break;
|
||||||
|
|
||||||
DrawSkinnedExplosionSetup(m_ExplosionEffectSplatMapSkinnedProgram, explosionSplatMapSkinnedHandle, explosionEffectJob, scene);
|
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
m_ExplosionEffectSplatMapProgram->Bind();
|
|
||||||
GLERROR("Bind ExplosionEffectSplatMap program");
|
|
||||||
//bind uniforms
|
|
||||||
//bind uniforms
|
|
||||||
BindExplosionUniforms(explosionSplatMapHandle, explosionEffectJob, scene);
|
|
||||||
//bind textures
|
|
||||||
BindExplosionTextures(explosionSplatMapHandle, explosionEffectJob);
|
|
||||||
GLERROR("asdasd");
|
|
||||||
DrawExplosionSetup(m_ExplosionEffectSplatMapProgram, explosionSplatMapHandle, explosionEffectJob, scene);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
glDisable(GL_CULL_FACE);
|
glDisable(GL_CULL_FACE);
|
||||||
|
|
||||||
@@ -554,99 +548,145 @@ void DrawFinalPass::DrawModelRenderQueuesWithShieldCheck(std::list<std::shared_p
|
|||||||
switch (explosionEffectJob->Type) {
|
switch (explosionEffectJob->Type) {
|
||||||
case RawModel::MaterialType::Basic:
|
case RawModel::MaterialType::Basic:
|
||||||
case RawModel::MaterialType::SingleTextures:
|
case RawModel::MaterialType::SingleTextures:
|
||||||
{
|
{
|
||||||
if (explosionEffectJob->Model->IsSkinned()) {
|
if (explosionEffectJob->Model->IsSkinned()) {
|
||||||
|
|
||||||
m_ExplosionEffectSkinnedShieldCheckProgram->Bind();
|
m_ExplosionEffectSkinnedShieldCheckProgram->Bind();
|
||||||
GLERROR("Bind ExplosionEffectSkinned program");
|
GLERROR("Bind ExplosionEffectSkinned program");
|
||||||
//bind uniforms
|
//bind uniforms
|
||||||
BindExplosionUniforms(explosionSkinnedShieldCheckHandle, explosionEffectJob, scene);
|
BindExplosionUniforms(explosionSkinnedShieldCheckHandle, explosionEffectJob, scene);
|
||||||
//bind textures
|
//bind textures
|
||||||
BindExplosionTextures(explosionSkinnedShieldCheckHandle, explosionEffectJob);
|
BindExplosionTextures(explosionSkinnedShieldCheckHandle, explosionEffectJob);
|
||||||
glActiveTexture(GL_TEXTURE5);
|
glActiveTexture(GL_TEXTURE5);
|
||||||
glBindTexture(GL_TEXTURE_CUBE_MAP, m_CubeMapPass->m_CubeMapTexture);
|
glBindTexture(GL_TEXTURE_CUBE_MAP, m_CubeMapPass->m_CubeMapTexture);
|
||||||
glUniform3fv(glGetUniformLocation(explosionSkinnedShieldCheckHandle, "CameraPosition"), 1, glm::value_ptr(scene.Camera->Position()));
|
glUniform3fv(glGetUniformLocation(explosionSkinnedShieldCheckHandle, "CameraPosition"), 1, glm::value_ptr(scene.Camera->Position()));
|
||||||
|
|
||||||
std::vector<glm::mat4> frameBones;
|
std::vector<glm::mat4> frameBones;
|
||||||
if (explosionEffectJob->AnimationOffset.animation != nullptr) {
|
if (explosionEffectJob->AnimationOffset.animation != nullptr) {
|
||||||
frameBones = explosionEffectJob->Skeleton->GetFrameBones(explosionEffectJob->Animations, explosionEffectJob->AnimationOffset);
|
frameBones = explosionEffectJob->Skeleton->GetFrameBones(explosionEffectJob->Animations, explosionEffectJob->AnimationOffset);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
frameBones = explosionEffectJob->Skeleton->GetFrameBones(explosionEffectJob->Animations);
|
||||||
|
}
|
||||||
|
glUniformMatrix4fv(glGetUniformLocation(explosionSkinnedShieldCheckHandle, "Bones"), frameBones.size(), GL_FALSE, glm::value_ptr(frameBones[0]));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
frameBones = explosionEffectJob->Skeleton->GetFrameBones(explosionEffectJob->Animations);
|
m_ExplosionEffectShieldCheckProgram->Bind();
|
||||||
}
|
GLERROR("Bind ExplosionEffect program");
|
||||||
glUniformMatrix4fv(glGetUniformLocation(explosionSkinnedShieldCheckHandle, "Bones"), frameBones.size(), GL_FALSE, glm::value_ptr(frameBones[0]));
|
//bind uniforms
|
||||||
}
|
BindExplosionUniforms(explosionShieldCheckHandle, explosionEffectJob, scene);
|
||||||
else {
|
//bind textures
|
||||||
m_ExplosionEffectShieldCheckProgram->Bind();
|
BindExplosionTextures(explosionShieldCheckHandle, explosionEffectJob);
|
||||||
GLERROR("Bind ExplosionEffect program");
|
glActiveTexture(GL_TEXTURE5);
|
||||||
//bind uniforms
|
glBindTexture(GL_TEXTURE_CUBE_MAP, m_CubeMapPass->m_CubeMapTexture);
|
||||||
BindExplosionUniforms(explosionShieldCheckHandle, explosionEffectJob, scene);
|
glUniform3fv(glGetUniformLocation(explosionShieldCheckHandle, "CameraPosition"), 1, glm::value_ptr(scene.Camera->Position()));
|
||||||
//bind textures
|
|
||||||
BindExplosionTextures(explosionShieldCheckHandle, explosionEffectJob);
|
|
||||||
glActiveTexture(GL_TEXTURE5);
|
|
||||||
glBindTexture(GL_TEXTURE_CUBE_MAP, m_CubeMapPass->m_CubeMapTexture);
|
|
||||||
glUniform3fv(glGetUniformLocation(explosionShieldCheckHandle, "CameraPosition"), 1, glm::value_ptr(scene.Camera->Position()));
|
|
||||||
|
|
||||||
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
break;
|
|
||||||
}
|
|
||||||
case RawModel::MaterialType::SplatMapping:
|
case RawModel::MaterialType::SplatMapping:
|
||||||
{
|
{
|
||||||
if (explosionEffectJob->Model->IsSkinned()) {
|
if (explosionEffectJob->Model->IsSkinned()) {
|
||||||
m_ExplosionEffectSplatMapSkinnedShieldCheckProgram->Bind();
|
m_ExplosionEffectSplatMapSkinnedShieldCheckProgram->Bind();
|
||||||
GLERROR("Bind ExplosionEffectSplatMapSkinned program");
|
GLERROR("Bind ExplosionEffectSplatMapSkinned program");
|
||||||
//bind uniforms
|
//bind uniforms
|
||||||
BindExplosionUniforms(explosionSplatMapSkinnedShieldCheckHandle, explosionEffectJob, scene);
|
BindExplosionUniforms(explosionSplatMapSkinnedShieldCheckHandle, explosionEffectJob, scene);
|
||||||
//bind textures
|
//bind textures
|
||||||
BindExplosionTextures(explosionSplatMapSkinnedShieldCheckHandle, explosionEffectJob);
|
BindExplosionTextures(explosionSplatMapSkinnedShieldCheckHandle, explosionEffectJob);
|
||||||
GLERROR("asdasd");
|
GLERROR("asdasd");
|
||||||
std::vector<glm::mat4> frameBones;
|
std::vector<glm::mat4> frameBones;
|
||||||
if (explosionEffectJob->AnimationOffset.animation != nullptr) {
|
if (explosionEffectJob->AnimationOffset.animation != nullptr) {
|
||||||
frameBones = explosionEffectJob->Skeleton->GetFrameBones(explosionEffectJob->Animations, explosionEffectJob->AnimationOffset);
|
frameBones = explosionEffectJob->Skeleton->GetFrameBones(explosionEffectJob->Animations, explosionEffectJob->AnimationOffset);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
frameBones = explosionEffectJob->Skeleton->GetFrameBones(explosionEffectJob->Animations);
|
||||||
|
}
|
||||||
|
glUniformMatrix4fv(glGetUniformLocation(explosionSplatMapSkinnedShieldCheckHandle, "Bones"), frameBones.size(), GL_FALSE, glm::value_ptr(frameBones[0]));
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
frameBones = explosionEffectJob->Skeleton->GetFrameBones(explosionEffectJob->Animations);
|
m_ExplosionEffectSplatMapShieldCheckProgram->Bind();
|
||||||
|
GLERROR("Bind ExplosionEffectSplatMap program");
|
||||||
|
//bind uniforms
|
||||||
|
//bind uniforms
|
||||||
|
BindExplosionUniforms(explosionSplatMapShieldCheckHandle, explosionEffectJob, scene);
|
||||||
|
//bind textures
|
||||||
|
BindExplosionTextures(explosionSplatMapShieldCheckHandle, explosionEffectJob);
|
||||||
|
GLERROR("asdasd");
|
||||||
}
|
}
|
||||||
glUniformMatrix4fv(glGetUniformLocation(explosionSplatMapSkinnedShieldCheckHandle, "Bones"), frameBones.size(), GL_FALSE, glm::value_ptr(frameBones[0]));
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
m_ExplosionEffectSplatMapShieldCheckProgram->Bind();
|
|
||||||
GLERROR("Bind ExplosionEffectSplatMap program");
|
|
||||||
//bind uniforms
|
|
||||||
//bind uniforms
|
|
||||||
BindExplosionUniforms(explosionSplatMapShieldCheckHandle, explosionEffectJob, scene);
|
|
||||||
//bind textures
|
|
||||||
BindExplosionTextures(explosionSplatMapShieldCheckHandle, explosionEffectJob);
|
|
||||||
GLERROR("asdasd");
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
}
|
|
||||||
else {
|
|
||||||
switch (explosionEffectJob->Type) {
|
switch (explosionEffectJob->Type) {
|
||||||
case RawModel::MaterialType::Basic:
|
case RawModel::MaterialType::Basic:
|
||||||
case RawModel::MaterialType::SingleTextures:
|
case RawModel::MaterialType::SingleTextures:
|
||||||
{
|
{
|
||||||
if (explosionEffectJob->Model->IsSkinned()) {
|
if (explosionEffectJob->Model->IsSkinned()) {
|
||||||
DrawSkinnedExplosionSetup(m_ExplosionEffectSkinnedProgram, explosionSkinnedHandle, explosionEffectJob, scene);
|
|
||||||
|
m_ExplosionEffectSkinnedProgram->Bind();
|
||||||
|
GLERROR("Bind ExplosionEffectSkinned program");
|
||||||
|
//bind uniforms
|
||||||
|
BindExplosionUniforms(explosionSkinnedHandle, explosionEffectJob, scene);
|
||||||
|
//bind textures
|
||||||
|
BindExplosionTextures(explosionSkinnedHandle, explosionEffectJob);
|
||||||
|
glActiveTexture(GL_TEXTURE5);
|
||||||
|
glBindTexture(GL_TEXTURE_CUBE_MAP, m_CubeMapPass->m_CubeMapTexture);
|
||||||
|
glUniform3fv(glGetUniformLocation(explosionSkinnedHandle, "CameraPosition"), 1, glm::value_ptr(scene.Camera->Position()));
|
||||||
|
|
||||||
|
std::vector<glm::mat4> frameBones;
|
||||||
|
if (explosionEffectJob->AnimationOffset.animation != nullptr) {
|
||||||
|
frameBones = explosionEffectJob->Skeleton->GetFrameBones(explosionEffectJob->Animations, explosionEffectJob->AnimationOffset);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
frameBones = explosionEffectJob->Skeleton->GetFrameBones(explosionEffectJob->Animations);
|
||||||
|
}
|
||||||
|
glUniformMatrix4fv(glGetUniformLocation(explosionSkinnedHandle, "Bones"), frameBones.size(), GL_FALSE, glm::value_ptr(frameBones[0]));
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
m_ExplosionEffectProgram->Bind();
|
||||||
|
GLERROR("Bind ExplosionEffect program");
|
||||||
|
//bind uniforms
|
||||||
|
BindExplosionUniforms(explosionHandle, explosionEffectJob, scene);
|
||||||
|
//bind textures
|
||||||
|
BindExplosionTextures(explosionHandle, explosionEffectJob);
|
||||||
|
glActiveTexture(GL_TEXTURE5);
|
||||||
|
glBindTexture(GL_TEXTURE_CUBE_MAP, m_CubeMapPass->m_CubeMapTexture);
|
||||||
|
glUniform3fv(glGetUniformLocation(explosionHandle, "CameraPosition"), 1, glm::value_ptr(scene.Camera->Position()));
|
||||||
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
DrawExplosionSetup(m_ExplosionEffectProgram, explosionHandle, explosionEffectJob, scene);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case RawModel::MaterialType::SplatMapping:
|
case RawModel::MaterialType::SplatMapping:
|
||||||
{
|
{
|
||||||
if (explosionEffectJob->Model->IsSkinned()) {
|
if (explosionEffectJob->Model->IsSkinned()) {
|
||||||
DrawSkinnedExplosionSetup(m_ExplosionEffectSplatMapSkinnedProgram, explosionSplatMapSkinnedHandle, explosionEffectJob, scene);
|
m_ExplosionEffectSplatMapSkinnedProgram->Bind();
|
||||||
|
GLERROR("Bind ExplosionEffectSplatMapSkinned program");
|
||||||
|
//bind uniforms
|
||||||
|
BindExplosionUniforms(explosionSplatMapSkinnedHandle, explosionEffectJob, scene);
|
||||||
|
//bind textures
|
||||||
|
BindExplosionTextures(explosionSplatMapSkinnedHandle, explosionEffectJob);
|
||||||
|
GLERROR("asdasd");
|
||||||
|
std::vector<glm::mat4> frameBones;
|
||||||
|
if (explosionEffectJob->AnimationOffset.animation != nullptr) {
|
||||||
|
frameBones = explosionEffectJob->Skeleton->GetFrameBones(explosionEffectJob->Animations, explosionEffectJob->AnimationOffset);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
frameBones = explosionEffectJob->Skeleton->GetFrameBones(explosionEffectJob->Animations);
|
||||||
|
}
|
||||||
|
glUniformMatrix4fv(glGetUniformLocation(explosionSplatMapSkinnedHandle, "Bones"), frameBones.size(), GL_FALSE, glm::value_ptr(frameBones[0]));
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
m_ExplosionEffectSplatMapProgram->Bind();
|
||||||
|
GLERROR("Bind ExplosionEffectSplatMap program");
|
||||||
|
//bind uniforms
|
||||||
|
//bind uniforms
|
||||||
|
BindExplosionUniforms(explosionSplatMapHandle, explosionEffectJob, scene);
|
||||||
|
//bind textures
|
||||||
|
BindExplosionTextures(explosionSplatMapHandle, explosionEffectJob);
|
||||||
|
GLERROR("asdasd");
|
||||||
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
DrawExplosionSetup(m_ExplosionEffectSplatMapProgram, explosionSplatMapHandle, explosionEffectJob, scene);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
glDisable(GL_CULL_FACE);
|
glDisable(GL_CULL_FACE);
|
||||||
@@ -658,176 +698,160 @@ void DrawFinalPass::DrawModelRenderQueuesWithShieldCheck(std::list<std::shared_p
|
|||||||
glEnable(GL_CULL_FACE);
|
glEnable(GL_CULL_FACE);
|
||||||
GLERROR("explosion effect end");
|
GLERROR("explosion effect end");
|
||||||
} else {
|
} else {
|
||||||
auto explosionEffectJob = std::dynamic_pointer_cast<ExplosionEffectJob>(job);
|
auto modelJob = std::dynamic_pointer_cast<ModelJob>(job);
|
||||||
if (explosionEffectJob) {
|
if (modelJob) {
|
||||||
switch (explosionEffectJob->Type) {
|
//bind forward program
|
||||||
case RawModel::MaterialType::Basic:
|
//TODO: JOHAN/TOBIAS: Bind shader based on ModelJob->ShaderID;
|
||||||
case RawModel::MaterialType::SingleTextures:
|
if (modelJob->IsShielded) {
|
||||||
{
|
|
||||||
if (explosionEffectJob->Model->IsSkinned()) {
|
|
||||||
|
|
||||||
m_ExplosionEffectSkinnedProgram->Bind();
|
|
||||||
GLERROR("Bind ExplosionEffectSkinned program");
|
|
||||||
//bind uniforms
|
|
||||||
BindExplosionUniforms(explosionSkinnedHandle, explosionEffectJob, scene);
|
|
||||||
//bind textures
|
|
||||||
BindExplosionTextures(explosionSkinnedHandle, explosionEffectJob);
|
|
||||||
glActiveTexture(GL_TEXTURE5);
|
|
||||||
glBindTexture(GL_TEXTURE_CUBE_MAP, m_CubeMapPass->m_CubeMapTexture);
|
|
||||||
glUniform3fv(glGetUniformLocation(explosionSkinnedHandle, "CameraPosition"), 1, glm::value_ptr(scene.Camera->Position()));
|
|
||||||
|
|
||||||
std::vector<glm::mat4> frameBones;
|
|
||||||
if (explosionEffectJob->AnimationOffset.animation != nullptr) {
|
|
||||||
frameBones = explosionEffectJob->Skeleton->GetFrameBones(explosionEffectJob->Animations, explosionEffectJob->AnimationOffset);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
frameBones = explosionEffectJob->Skeleton->GetFrameBones(explosionEffectJob->Animations);
|
|
||||||
}
|
|
||||||
glUniformMatrix4fv(glGetUniformLocation(explosionSkinnedHandle, "Bones"), frameBones.size(), GL_FALSE, glm::value_ptr(frameBones[0]));
|
|
||||||
DrawSkinnedExplosionSetup(m_ExplosionEffectSkinnedProgram, explosionSkinnedHandle, explosionEffectJob, scene);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
m_ExplosionEffectProgram->Bind();
|
|
||||||
GLERROR("Bind ExplosionEffect program");
|
|
||||||
//bind uniforms
|
|
||||||
BindExplosionUniforms(explosionHandle, explosionEffectJob, scene);
|
|
||||||
//bind textures
|
|
||||||
BindExplosionTextures(explosionHandle, explosionEffectJob);
|
|
||||||
glActiveTexture(GL_TEXTURE5);
|
|
||||||
glBindTexture(GL_TEXTURE_CUBE_MAP, m_CubeMapPass->m_CubeMapTexture);
|
|
||||||
glUniform3fv(glGetUniformLocation(explosionHandle, "CameraPosition"), 1, glm::value_ptr(scene.Camera->Position()));
|
|
||||||
|
|
||||||
DrawExplosionSetup(m_ExplosionEffectProgram, explosionHandle, explosionEffectJob, scene);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case RawModel::MaterialType::SplatMapping:
|
|
||||||
{
|
|
||||||
if (explosionEffectJob->Model->IsSkinned()) {
|
|
||||||
m_ExplosionEffectSplatMapSkinnedProgram->Bind();
|
|
||||||
GLERROR("Bind ExplosionEffectSplatMapSkinned program");
|
|
||||||
//bind uniforms
|
|
||||||
BindExplosionUniforms(explosionSplatMapSkinnedHandle, explosionEffectJob, scene);
|
|
||||||
//bind textures
|
|
||||||
BindExplosionTextures(explosionSplatMapSkinnedHandle, explosionEffectJob);
|
|
||||||
GLERROR("asdasd");
|
|
||||||
std::vector<glm::mat4> frameBones;
|
|
||||||
if (explosionEffectJob->AnimationOffset.animation != nullptr) {
|
|
||||||
frameBones = explosionEffectJob->Skeleton->GetFrameBones(explosionEffectJob->Animations, explosionEffectJob->AnimationOffset);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
frameBones = explosionEffectJob->Skeleton->GetFrameBones(explosionEffectJob->Animations);
|
|
||||||
}
|
|
||||||
glUniformMatrix4fv(glGetUniformLocation(explosionSplatMapSkinnedHandle, "Bones"), frameBones.size(), GL_FALSE, glm::value_ptr(frameBones[0]));
|
|
||||||
|
|
||||||
DrawSkinnedExplosionSetup(m_ExplosionEffectSplatMapSkinnedProgram, explosionSplatMapSkinnedHandle, explosionEffectJob, scene);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
m_ExplosionEffectSplatMapProgram->Bind();
|
|
||||||
GLERROR("Bind ExplosionEffectSplatMap program");
|
|
||||||
//bind uniforms
|
|
||||||
//bind uniforms
|
|
||||||
BindExplosionUniforms(explosionSplatMapHandle, explosionEffectJob, scene);
|
|
||||||
//bind textures
|
|
||||||
BindExplosionTextures(explosionSplatMapHandle, explosionEffectJob);
|
|
||||||
GLERROR("asdasd");
|
|
||||||
DrawExplosionSetup(m_ExplosionEffectSplatMapProgram, explosionSplatMapHandle, explosionEffectJob, scene);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
glDisable(GL_CULL_FACE);
|
|
||||||
|
|
||||||
//draw
|
|
||||||
glBindVertexArray(explosionEffectJob->Model->VAO);
|
|
||||||
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, explosionEffectJob->Model->ElementBuffer);
|
|
||||||
glDrawElements(GL_TRIANGLES, explosionEffectJob->EndIndex - explosionEffectJob->StartIndex + 1, GL_UNSIGNED_INT, (void*)(explosionEffectJob->StartIndex*sizeof(unsigned int)));
|
|
||||||
glEnable(GL_CULL_FACE);
|
|
||||||
GLERROR("explosion effect end");
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
auto modelJob = std::dynamic_pointer_cast<ModelJob>(job);
|
|
||||||
if (modelJob) {
|
|
||||||
//bind forward program
|
|
||||||
//TODO: JOHAN/TOBIAS: Bind shader based on ModelJob->ShaderID;
|
|
||||||
switch (modelJob->Type) {
|
switch (modelJob->Type) {
|
||||||
case RawModel::MaterialType::Basic:
|
case RawModel::MaterialType::Basic:
|
||||||
case RawModel::MaterialType::SingleTextures:
|
case RawModel::MaterialType::SingleTextures:
|
||||||
{
|
{
|
||||||
if (modelJob->Model->IsSkinned()) {
|
if (modelJob->Model->IsSkinned()) {
|
||||||
m_ForwardPlusSkinnedProgram->Bind();
|
m_ForwardPlusSkinnedShieldCheckProgram->Bind();
|
||||||
GLERROR("Bind ForwardPlusSkinnedProgram");
|
GLERROR("Bind ForwardPlusSkinnedProgram");
|
||||||
//bind uniforms
|
//bind uniforms
|
||||||
BindModelUniforms(forwardSkinnedHandle, modelJob, scene);
|
BindModelUniforms(forwardSkinnedShieldCheckHandle, modelJob, scene);
|
||||||
//bind textures
|
//bind textures
|
||||||
BindModelTextures(forwardSkinnedHandle, modelJob);
|
BindModelTextures(forwardSkinnedShieldCheckHandle, modelJob);
|
||||||
glActiveTexture(GL_TEXTURE5);
|
glActiveTexture(GL_TEXTURE5);
|
||||||
glBindTexture(GL_TEXTURE_CUBE_MAP, m_CubeMapPass->m_CubeMapTexture);
|
glBindTexture(GL_TEXTURE_CUBE_MAP, m_CubeMapPass->m_CubeMapTexture);
|
||||||
glUniform3fv(glGetUniformLocation(forwardSkinnedHandle, "CameraPosition"), 1, glm::value_ptr(scene.Camera->Position()));
|
glUniform3fv(glGetUniformLocation(forwardSkinnedShieldCheckHandle, "CameraPosition"), 1, glm::value_ptr(scene.Camera->Position()));
|
||||||
|
|
||||||
|
std::vector<glm::mat4> frameBones;
|
||||||
|
if (modelJob->AnimationOffset.animation != nullptr) {
|
||||||
|
frameBones = modelJob->Skeleton->GetFrameBones(modelJob->Animations, modelJob->AnimationOffset);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
frameBones = modelJob->Skeleton->GetFrameBones(modelJob->Animations);
|
||||||
|
}
|
||||||
|
glUniformMatrix4fv(glGetUniformLocation(forwardSkinnedShieldCheckHandle, "Bones"), frameBones.size(), GL_FALSE, glm::value_ptr(frameBones[0]));
|
||||||
|
|
||||||
std::vector<glm::mat4> frameBones;
|
|
||||||
if (modelJob->AnimationOffset.animation != nullptr) {
|
|
||||||
frameBones = modelJob->Skeleton->GetFrameBones(modelJob->Animations, modelJob->AnimationOffset);
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
frameBones = modelJob->Skeleton->GetFrameBones(modelJob->Animations);
|
m_ForwardPlusShieldCheckProgram->Bind();
|
||||||
|
GLERROR("Bind ForwardPlusProgram");
|
||||||
|
//bind uniforms
|
||||||
|
BindModelUniforms(forwardShieldCheckHandle, modelJob, scene);
|
||||||
|
//bind textures
|
||||||
|
BindModelTextures(forwardShieldCheckHandle, modelJob);
|
||||||
|
glActiveTexture(GL_TEXTURE5);
|
||||||
|
glBindTexture(GL_TEXTURE_CUBE_MAP, m_CubeMapPass->m_CubeMapTexture);
|
||||||
|
glUniform3fv(glGetUniformLocation(forwardShieldCheckHandle, "CameraPosition"), 1, glm::value_ptr(scene.Camera->Position()));
|
||||||
}
|
}
|
||||||
glUniformMatrix4fv(glGetUniformLocation(forwardSkinnedHandle, "Bones"), frameBones.size(), GL_FALSE, glm::value_ptr(frameBones[0]));
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
m_ForwardPlusProgram->Bind();
|
|
||||||
GLERROR("Bind ForwardPlusProgram");
|
|
||||||
//bind uniforms
|
|
||||||
BindModelUniforms(forwardHandle, modelJob, scene);
|
|
||||||
//bind textures
|
|
||||||
BindModelTextures(forwardHandle, modelJob);
|
|
||||||
glActiveTexture(GL_TEXTURE5);
|
|
||||||
glBindTexture(GL_TEXTURE_CUBE_MAP, m_CubeMapPass->m_CubeMapTexture);
|
|
||||||
glUniform3fv(glGetUniformLocation(forwardHandle, "CameraPosition"), 1, glm::value_ptr(scene.Camera->Position()));
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case RawModel::MaterialType::SplatMapping:
|
case RawModel::MaterialType::SplatMapping:
|
||||||
{
|
{
|
||||||
if (modelJob->Model->IsSkinned()) {
|
if (modelJob->Model->IsSkinned()) {
|
||||||
m_ForwardPlusSplatMapSkinnedProgram->Bind();
|
m_ForwardPlusSplatMapSkinnedShieldCheckProgram->Bind();
|
||||||
GLERROR("Bind SplatMap program");
|
GLERROR("Bind SplatMap program");
|
||||||
//bind uniforms
|
//bind uniforms
|
||||||
BindModelUniforms(forwardSplatMapSkinnedHandle, modelJob, scene);
|
BindModelUniforms(forwardSplatMapSkinnedShieldCheckHandle, modelJob, scene);
|
||||||
//bind textures
|
//bind textures
|
||||||
BindModelTextures(forwardSplatMapSkinnedHandle, modelJob);
|
BindModelTextures(forwardSplatMapSkinnedShieldCheckHandle, modelJob);
|
||||||
GLERROR("asdasd");
|
GLERROR("asdasd");
|
||||||
std::vector<glm::mat4> frameBones;
|
std::vector<glm::mat4> frameBones;
|
||||||
if (modelJob->AnimationOffset.animation != nullptr) {
|
if (modelJob->AnimationOffset.animation != nullptr) {
|
||||||
frameBones = modelJob->Skeleton->GetFrameBones(modelJob->Animations, modelJob->AnimationOffset);
|
frameBones = modelJob->Skeleton->GetFrameBones(modelJob->Animations, modelJob->AnimationOffset);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
frameBones = modelJob->Skeleton->GetFrameBones(modelJob->Animations);
|
||||||
|
}
|
||||||
|
glUniformMatrix4fv(glGetUniformLocation(forwardSplatMapSkinnedShieldCheckHandle, "Bones"), frameBones.size(), GL_FALSE, glm::value_ptr(frameBones[0]));
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
frameBones = modelJob->Skeleton->GetFrameBones(modelJob->Animations);
|
m_ForwardPlusSplatMapShieldCheckProgram->Bind();
|
||||||
|
GLERROR("Bind SplatMap program");
|
||||||
|
//bind uniforms
|
||||||
|
BindModelUniforms(forwardSplatShieldCheckHandle, modelJob, scene);
|
||||||
|
//bind textures
|
||||||
|
BindModelTextures(forwardSplatShieldCheckHandle, modelJob);
|
||||||
|
GLERROR("asdasd");
|
||||||
}
|
}
|
||||||
glUniformMatrix4fv(glGetUniformLocation(forwardSplatMapSkinnedHandle, "Bones"), frameBones.size(), GL_FALSE, glm::value_ptr(frameBones[0]));
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
switch (modelJob->Type) {
|
||||||
|
case RawModel::MaterialType::Basic:
|
||||||
|
case RawModel::MaterialType::SingleTextures:
|
||||||
|
{
|
||||||
|
if (modelJob->Model->IsSkinned()) {
|
||||||
|
m_ForwardPlusSkinnedProgram->Bind();
|
||||||
|
GLERROR("Bind ForwardPlusSkinnedProgram");
|
||||||
|
//bind uniforms
|
||||||
|
BindModelUniforms(forwardSkinnedHandle, modelJob, scene);
|
||||||
|
//bind textures
|
||||||
|
BindModelTextures(forwardSkinnedHandle, modelJob);
|
||||||
|
glActiveTexture(GL_TEXTURE5);
|
||||||
|
glBindTexture(GL_TEXTURE_CUBE_MAP, m_CubeMapPass->m_CubeMapTexture);
|
||||||
|
glUniform3fv(glGetUniformLocation(forwardSkinnedHandle, "CameraPosition"), 1, glm::value_ptr(scene.Camera->Position()));
|
||||||
|
|
||||||
|
std::vector<glm::mat4> frameBones;
|
||||||
|
if (modelJob->AnimationOffset.animation != nullptr) {
|
||||||
|
frameBones = modelJob->Skeleton->GetFrameBones(modelJob->Animations, modelJob->AnimationOffset);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
frameBones = modelJob->Skeleton->GetFrameBones(modelJob->Animations);
|
||||||
|
}
|
||||||
|
glUniformMatrix4fv(glGetUniformLocation(forwardSkinnedHandle, "Bones"), frameBones.size(), GL_FALSE, glm::value_ptr(frameBones[0]));
|
||||||
|
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
m_ForwardPlusProgram->Bind();
|
||||||
|
GLERROR("Bind ForwardPlusProgram");
|
||||||
|
//bind uniforms
|
||||||
|
BindModelUniforms(forwardHandle, modelJob, scene);
|
||||||
|
//bind textures
|
||||||
|
BindModelTextures(forwardHandle, modelJob);
|
||||||
|
glActiveTexture(GL_TEXTURE5);
|
||||||
|
glBindTexture(GL_TEXTURE_CUBE_MAP, m_CubeMapPass->m_CubeMapTexture);
|
||||||
|
glUniform3fv(glGetUniformLocation(forwardHandle, "CameraPosition"), 1, glm::value_ptr(scene.Camera->Position()));
|
||||||
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
else {
|
case RawModel::MaterialType::SplatMapping:
|
||||||
m_ForwardPlusSplatMapProgram->Bind();
|
{
|
||||||
GLERROR("Bind SplatMap program");
|
if (modelJob->Model->IsSkinned()) {
|
||||||
//bind uniforms
|
m_ForwardPlusSplatMapSkinnedProgram->Bind();
|
||||||
BindModelUniforms(forwardSplatMapHandle, modelJob, scene);
|
GLERROR("Bind SplatMap program");
|
||||||
//bind textures
|
//bind uniforms
|
||||||
BindModelTextures(forwardSplatMapHandle, modelJob);
|
BindModelUniforms(forwardSplatMapSkinnedHandle, modelJob, scene);
|
||||||
GLERROR("asdasd");
|
//bind textures
|
||||||
|
BindModelTextures(forwardSplatMapSkinnedHandle, modelJob);
|
||||||
|
GLERROR("asdasd");
|
||||||
|
std::vector<glm::mat4> frameBones;
|
||||||
|
if (modelJob->AnimationOffset.animation != nullptr) {
|
||||||
|
frameBones = modelJob->Skeleton->GetFrameBones(modelJob->Animations, modelJob->AnimationOffset);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
frameBones = modelJob->Skeleton->GetFrameBones(modelJob->Animations);
|
||||||
|
}
|
||||||
|
glUniformMatrix4fv(glGetUniformLocation(forwardSplatMapSkinnedHandle, "Bones"), frameBones.size(), GL_FALSE, glm::value_ptr(frameBones[0]));
|
||||||
|
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
m_ForwardPlusSplatMapProgram->Bind();
|
||||||
|
GLERROR("Bind SplatMap program");
|
||||||
|
//bind uniforms
|
||||||
|
BindModelUniforms(forwardSplatMapHandle, modelJob, scene);
|
||||||
|
//bind textures
|
||||||
|
BindModelTextures(forwardSplatMapHandle, modelJob);
|
||||||
|
GLERROR("asdasd");
|
||||||
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//draw
|
|
||||||
glBindVertexArray(modelJob->Model->VAO);
|
|
||||||
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, modelJob->Model->ElementBuffer);
|
|
||||||
glDrawElements(GL_TRIANGLES, modelJob->EndIndex - modelJob->StartIndex + 1, GL_UNSIGNED_INT, (void*)(modelJob->StartIndex*sizeof(unsigned int)));
|
|
||||||
if (GLERROR("models end")) {
|
|
||||||
continue;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//draw
|
||||||
|
glBindVertexArray(modelJob->Model->VAO);
|
||||||
|
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, modelJob->Model->ElementBuffer);
|
||||||
|
glDrawElements(GL_TRIANGLES, modelJob->EndIndex - modelJob->StartIndex + 1, GL_UNSIGNED_INT, (void*)(modelJob->StartIndex*sizeof(unsigned int)));
|
||||||
|
if (GLERROR("models end")) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1013,76 +1037,6 @@ void DrawFinalPass::DrawSprites(std::list<std::shared_ptr<RenderJob>>&jobs, Rend
|
|||||||
// m_SpriteProgram->Unbind();
|
// m_SpriteProgram->Unbind();
|
||||||
}
|
}
|
||||||
|
|
||||||
void DrawFinalPass::DrawExplosionSetup(ShaderProgram* shader, GLuint shaderHandle, std::shared_ptr<ExplosionEffectJob>& job, RenderScene& scene)
|
|
||||||
{
|
|
||||||
shader->Bind();
|
|
||||||
GLERROR("Bind ExplosionEffect program");
|
|
||||||
//bind uniforms
|
|
||||||
BindExplosionUniforms(shaderHandle, job, scene);
|
|
||||||
//bind textures
|
|
||||||
BindExplosionTextures(shaderHandle, job);
|
|
||||||
glActiveTexture(GL_TEXTURE5);
|
|
||||||
glBindTexture(GL_TEXTURE_CUBE_MAP, m_CubeMapPass->m_CubeMapTexture);
|
|
||||||
glUniform3fv(glGetUniformLocation(shaderHandle, "CameraPosition"), 1, glm::value_ptr(scene.Camera->Position()));
|
|
||||||
}
|
|
||||||
|
|
||||||
void DrawFinalPass::DrawSkinnedExplosionSetup(ShaderProgram* shader, GLuint shaderHandle, std::shared_ptr<ExplosionEffectJob>& job, RenderScene& scene)
|
|
||||||
{
|
|
||||||
shader->Bind();
|
|
||||||
GLERROR("Bind ExplosionEffectSkinned program");
|
|
||||||
//bind uniforms
|
|
||||||
BindExplosionUniforms(shaderHandle, job, scene);
|
|
||||||
//bind textures
|
|
||||||
BindExplosionTextures(shaderHandle, job);
|
|
||||||
glActiveTexture(GL_TEXTURE5);
|
|
||||||
glBindTexture(GL_TEXTURE_CUBE_MAP, m_CubeMapPass->m_CubeMapTexture);
|
|
||||||
glUniform3fv(glGetUniformLocation(shaderHandle, "CameraPosition"), 1, glm::value_ptr(scene.Camera->Position()));
|
|
||||||
|
|
||||||
std::vector<glm::mat4> frameBones;
|
|
||||||
if (job->AnimationOffset.animation != nullptr) {
|
|
||||||
frameBones = job->Skeleton->GetFrameBones(job->Animations, job->AnimationOffset);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
frameBones = job->Skeleton->GetFrameBones(job->Animations);
|
|
||||||
}
|
|
||||||
glUniformMatrix4fv(glGetUniformLocation(shaderHandle, "Bones"), frameBones.size(), GL_FALSE, glm::value_ptr(frameBones[0]));
|
|
||||||
}
|
|
||||||
|
|
||||||
void DrawFinalPass::DrawModelSetup(ShaderProgram* shader, GLuint shaderHandle, std::shared_ptr<ModelJob>& job, RenderScene& scene)
|
|
||||||
{
|
|
||||||
m_ForwardPlusProgram->Bind();
|
|
||||||
GLERROR("Bind ForwardPlusProgram");
|
|
||||||
//bind uniforms
|
|
||||||
BindModelUniforms(shaderHandle, job, scene);
|
|
||||||
//bind textures
|
|
||||||
BindModelTextures(shaderHandle, job);
|
|
||||||
glActiveTexture(GL_TEXTURE5);
|
|
||||||
glBindTexture(GL_TEXTURE_CUBE_MAP, m_CubeMapPass->m_CubeMapTexture);
|
|
||||||
glUniform3fv(glGetUniformLocation(shaderHandle, "CameraPosition"), 1, glm::value_ptr(scene.Camera->Position()));
|
|
||||||
}
|
|
||||||
|
|
||||||
void DrawFinalPass::DrawSkinnedModelSetup(ShaderProgram* shader, GLuint shaderHandle , std::shared_ptr<ModelJob>& job, RenderScene& scene)
|
|
||||||
{
|
|
||||||
shader->Bind();
|
|
||||||
GLERROR("Bind ForwardPlusSkinnedProgram");
|
|
||||||
//bind uniforms
|
|
||||||
BindModelUniforms(shaderHandle, job, scene);
|
|
||||||
//bind textures
|
|
||||||
BindModelTextures(shaderHandle, job);
|
|
||||||
glActiveTexture(GL_TEXTURE5);
|
|
||||||
glBindTexture(GL_TEXTURE_CUBE_MAP, m_CubeMapPass->m_CubeMapTexture);
|
|
||||||
glUniform3fv(glGetUniformLocation(shaderHandle, "CameraPosition"), 1, glm::value_ptr(scene.Camera->Position()));
|
|
||||||
|
|
||||||
std::vector<glm::mat4> frameBones;
|
|
||||||
if (job->AnimationOffset.animation != nullptr) {
|
|
||||||
frameBones = job->Skeleton->GetFrameBones(job->Animations, job->AnimationOffset);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
frameBones = job->Skeleton->GetFrameBones(job->Animations);
|
|
||||||
}
|
|
||||||
glUniformMatrix4fv(glGetUniformLocation(shaderHandle, "Bones"), frameBones.size(), GL_FALSE, glm::value_ptr(frameBones[0]));
|
|
||||||
}
|
|
||||||
|
|
||||||
void DrawFinalPass::BindExplosionUniforms(GLuint shaderHandle, std::shared_ptr<ExplosionEffectJob>& job, RenderScene& scene)
|
void DrawFinalPass::BindExplosionUniforms(GLuint shaderHandle, std::shared_ptr<ExplosionEffectJob>& job, RenderScene& scene)
|
||||||
{
|
{
|
||||||
glUniform1i(glGetUniformLocation(shaderHandle, "SSAOQuality"), m_SSAOPass->TextureQuality());
|
glUniform1i(glGetUniformLocation(shaderHandle, "SSAOQuality"), m_SSAOPass->TextureQuality());
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ DrawStencilState::DrawStencilState(GLuint frameBuffer)
|
|||||||
BindFramebuffer(frameBuffer);
|
BindFramebuffer(frameBuffer);
|
||||||
Enable(GL_DEPTH_TEST);
|
Enable(GL_DEPTH_TEST);
|
||||||
DepthMask(GL_TRUE);
|
DepthMask(GL_TRUE);
|
||||||
|
Enable(GL_CULL_FACE);
|
||||||
ClearColor(glm::vec4(0.f));
|
ClearColor(glm::vec4(0.f));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user