// Shader_Glare.cpp: implementation of the CShader_Glare class. // ////////////////////////////////////////////////////////////////////// #include "Shader_Glare.h" #include "Shader_BumpSpecV.h" #include "Shader_GlareP.h" ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// CShader_Glare::CShader_Glare() { m_pVertexShader = new CShader_BumpSpecV; m_pPixelShader = new CShader_GlareP; } CShader_Glare::~CShader_Glare() { if(m_pVertexShader != NULL) { delete m_pVertexShader; m_pVertexShader = NULL; } if(m_pPixelShader != NULL) { delete m_pPixelShader; m_pPixelShader = NULL; } } void CShader_Glare::Apply() { // ApplyState(); if(m_pVertexShader != NULL) m_pVertexShader->Apply(); if(m_pPixelShader != NULL) m_pPixelShader->Apply(); } void CShader_Glare::UnApply() { ApplyOldState(); } void CShader_Glare::SetNormalTexture(char *strTexName) { if(m_pPixelShader != NULL) { m_pPixelShader->SetNormalTexture(strTexName); } } void CShader_Glare::SetBumpScale(float fScale) { if(m_pVertexShader != NULL) { m_pVertexShader->SetBumpScale(fScale); } }