idx8pixelshader.h

Go to the documentation of this file.
00001 /**********************************************************************
00002  *<
00003     FILE: IDX8PixelShader.h
00004 
00005     DESCRIPTION: DirectX 8 Pixel Shader Interface Definition
00006 
00007     CREATED BY: Nikolai Sander and Norbert Jeske
00008 
00009     HISTORY: Created 9/27/00
00010 
00011  *> Copyright (c) 2000, All Rights Reserved.
00012  **********************************************************************/
00013 #pragma once
00014 #include "baseinterface.h"
00015 #include <d3dx9.h>
00016 
00017 // forward declarations
00018 class ID3DGraphicsWindow;
00019 class IDX8VertexShader;
00020 class Material;
00021 class INode;
00022 
00023 #define DX8_PIXEL_SHADER_INTERFACE_ID Interface_ID(0x56df1953, 0xc6121a3)
00024 
00029 class IDX8PixelShader : public BaseInterface
00030 {
00031 public:
00035     virtual Interface_ID GetID() { return DX8_PIXEL_SHADER_INTERFACE_ID; }
00036 
00037     // Confirm that the Direct3D Device can handle this PixelShader
00043     virtual HRESULT ConfirmDevice(ID3DGraphicsWindow *gw) = 0;
00044 
00045     // Confirm that an associated VertexShader will work with this PixelShader
00051     virtual HRESULT ConfirmVertexShader(IDX8VertexShader *pvs) = 0;
00052 
00053     // Load PixelShader instructions and textures.  PixelShader instructions
00054     // should be loaded once and shared among all the nodes using this
00055     // PixelShader.  In addition, any textures necessary for the PixelShader
00056     // effect should be loaded once and shared among all the nodes using this
00057     // PixelShader.
00068     virtual HRESULT Initialize(Material* mtl, INode* node) = 0;
00069 
00070     // Number of passes for the effect this PixelShader creates.  Note that
00071     // this value will depend on the hardware currently in use.
00075     virtual int GetNumMultiPass() = 0;
00076 
00077     // Retrieve the PixelShader handle for the specified pass for use in GFX
00083     virtual DWORD GetPixelShaderHandle(int numPass) = 0;
00084 
00085     // Set the PixelShader for the specified pass.  This call will be made at
00086     // least once per object to set the per object data for the PixelShader
00087     // such as the PixelShader constants.
00096     virtual HRESULT SetPixelShader(ID3DGraphicsWindow *gw, int numPass) = 0;
00097 };