Main Page -
Class Hierarchy -
Class List -
File List -
Class Members -
Related Pages -

Information | Reference | SourceForge Project | Author
Muli3D

Reference: Muli3D: m3dcore_shaders.h Source File

m3dcore_shaders.h

Go to the documentation of this file.
00001 /* 00002 Muli3D - a software rendering library 00003 Copyright (C) 2004, 2005 Stephan Reiter <streiter@aon.at> 00004 00005 This library is free software; you can redistribute it and/or 00006 modify it under the terms of the GNU Lesser General Public 00007 License as published by the Free Software Foundation; either 00008 version 2.1 of the License, or (at your option) any later version. 00009 00010 This library is distributed in the hope that it will be useful, 00011 but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 Lesser General Public License for more details. 00014 00015 You should have received a copy of the GNU Lesser General Public 00016 License along with this library; if not, write to the Free Software 00017 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00018 */ 00019 00022 00023 #ifndef __M3DCORE_SHADERS_H__ 00024 #define __M3DCORE_SHADERS_H__ 00025 00026 #include "../m3dbase.h" 00027 #include "../m3dtypes.h" 00028 00029 #include "m3dcore_baseshader.h" 00030 00032 class IMuli3DVertexShader : public IMuli3DBaseShader 00033 { 00034 protected: 00035 friend class CMuli3DDevice; 00041 virtual void Execute( const shaderreg *i_pInput, vector4 &o_vPosition, 00042 shaderreg *o_pOutput ) = 0; 00043 00046 virtual m3dshaderregtype GetOutputRegisters( uint32 i_iRegister ) = 0; 00047 }; 00048 00050 class IMuli3DTriangleShader : public IMuli3DBaseShader 00051 { 00052 protected: 00053 friend class CMuli3DDevice; 00061 virtual bool bExecute( shaderreg *io_pShaderRegs0, 00062 shaderreg *io_pShaderRegs1, shaderreg *io_pShaderRegs2 ) = 0; 00063 }; 00064 00066 class IMuli3DPixelShader : public IMuli3DBaseShader 00067 { 00068 protected: 00069 friend class CMuli3DDevice; 00070 virtual m3dpixelshaderoutput GetShaderOutput() { return m3dpso_coloronly; } 00071 virtual bool bMightKillPixels() { return true; } 00072 00076 void SetInfo( const m3dshaderregtype *i_pVSOutputs, const struct m3dtriangleinfo *i_pTriangleInfo ); 00077 00084 virtual bool bExecute( const shaderreg *i_pInput, vector4 &io_vColor, 00085 float32 &io_fDepth ) = 0; 00086 00091 void GetDerivatives( uint32 i_iRegister, vector4 &o_vDdx, vector4 &o_vDdy ) const; 00092 00093 private: 00094 const m3dshaderregtype *m_pVSOutputs; 00095 const struct m3dtriangleinfo *m_pTriangleInfo; 00096 }; 00097 00098 #endif // __M3DCORE_SHADERS_H__

Documentation created with doxygen SourceForge.net Logo