Restructure repository to include all source folders
Move git root from Client/ to src/ to track all source code: - Client: Game client source (moved to Client/Client/) - Server: Game server source - GameTools: Development tools - CryptoSource: Encryption utilities - database: Database scripts - Script: Game scripts - rylCoder_16.02.2008_src: Legacy coder tools - GMFont, Game: Additional resources 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
94
GameTools/Zallad3D SceneClass/Shader_ClassicBumpSpec.cpp
Normal file
94
GameTools/Zallad3D SceneClass/Shader_ClassicBumpSpec.cpp
Normal file
@@ -0,0 +1,94 @@
|
||||
// Shader_ClassicBumpSpec.cpp: implementation of the CShader_ClassicBumpSpec class.
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
#include "TextureUtils.h"
|
||||
|
||||
#include "Shader_ClassicBumpSpec.h"
|
||||
#include "Shader_ClassicBumpSpecV.h"
|
||||
#include "Shader_ClassicBumpSpecP.h"
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// Construction/Destruction
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
CShader_ClassicBumpSpec::CShader_ClassicBumpSpec()
|
||||
{
|
||||
|
||||
m_pDiffPixelShader = new CShader_ClassicBumpSpecP(0);
|
||||
m_pDiffVertexShader = new CShader_ClassicBumpSpecV(0);
|
||||
|
||||
m_pSpecPixelShader = new CShader_ClassicBumpSpecP(1);
|
||||
m_pSpecVertexShader = new CShader_ClassicBumpSpecV(1);
|
||||
|
||||
|
||||
m_pDiffuseTex = NULL;
|
||||
m_pSpecTex = NULL;
|
||||
m_iCurrentShader = 0;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
CShader_ClassicBumpSpec::~CShader_ClassicBumpSpec()
|
||||
{
|
||||
if(m_pDiffVertexShader)
|
||||
{
|
||||
delete m_pDiffVertexShader;
|
||||
m_pDiffVertexShader = NULL;
|
||||
}
|
||||
if(m_pDiffPixelShader)
|
||||
{
|
||||
delete m_pDiffPixelShader;
|
||||
m_pDiffPixelShader = NULL;
|
||||
}
|
||||
|
||||
if(m_pSpecVertexShader)
|
||||
{
|
||||
delete m_pSpecVertexShader;
|
||||
m_pSpecVertexShader = NULL;
|
||||
}
|
||||
if(m_pSpecPixelShader)
|
||||
{
|
||||
delete m_pSpecPixelShader;
|
||||
m_pSpecPixelShader = NULL;
|
||||
}
|
||||
|
||||
if(m_pDiffuseTex)
|
||||
{
|
||||
delete m_pDiffuseTex;
|
||||
m_pDiffuseTex = NULL;
|
||||
}
|
||||
if(m_pSpecTex)
|
||||
{
|
||||
delete m_pSpecTex;
|
||||
m_pSpecTex = NULL;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
void CShader_ClassicBumpSpec::Apply()
|
||||
{
|
||||
if(m_iCurrentShader == 0) //diff
|
||||
{
|
||||
if(m_pDiffVertexShader)
|
||||
m_pDiffVertexShader->Apply();
|
||||
if(m_pDiffPixelShader)
|
||||
m_pDiffPixelShader->Apply();
|
||||
|
||||
}
|
||||
else if(m_iCurrentShader == 1) //spec
|
||||
{
|
||||
if(m_pSpecVertexShader)
|
||||
m_pSpecVertexShader->Apply();
|
||||
if(m_pSpecPixelShader)
|
||||
m_pSpecPixelShader->Apply();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
void CShader_ClassicBumpSpec::UnApply()
|
||||
{
|
||||
ApplyOldState();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user