/* GENERAL */ void SimpleColorEffect::init(const VertexLayout& layout) { Material* mat(CONTENT->loadMaterial("engine/2D/color.hm")); m_Material = mat->createMaterialInstance(eShaderRenderType_Normal); mat->release(); m_Material->calculateMaterialLayout(layout); m_ViewProj = m_Material->findParameter(HEFS::strmatVP); m_World = m_Material->findParameter(HEFS::strmatW); m_Color = m_Material->findParameter(HEFS::strcolor); setViewProjection(mat44::Identity); setWorld(mat44::Identity); setColor(Color(1.0f, 1.0f, 1.0f, 1.0f)); }
void RenderTarget::popGLStates() { setViewProjection(Camera::Ortho); //glCheck(glCullFace(GL_FRONT)); glCheck(glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA)); }
void RenderTarget::pushGLStates() { setViewProjection(Camera::Prespective); //glCheck(glCullFace(GL_BACK)); glCheck(glBlendFunc(GL_ONE, GL_ZERO)); }