idx9pixelshader.h

Go to the documentation of this file.
00001 /**********************************************************************
00002  *<
00003     FILE: IDX9PixelShader.h
00004 
00005     DESCRIPTION: DirectX 9 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 
00015 #include "baseinterface.h"
00016 #include <d3dx9.h>
00017 
00018 // forward declarations
00019 class ID3D9GraphicsWindow;
00020 class IDX9VertexShader;
00021 class Material;
00022 class INode;
00023 
00024 #define DX9_PIXEL_SHADER_INTERFACE_ID Interface_ID(0x544218fd, 0x7b344bc9)
00025 
00026 
00027 class IDX9PixelShader : public BaseInterface
00028 {
00029 public:
00030     virtual Interface_ID GetID() { return DX9_PIXEL_SHADER_INTERFACE_ID; }
00031 
00032     // Confirm that the Direct3D Device can handle this PixelShader
00033     virtual HRESULT ConfirmDevice(ID3D9GraphicsWindow *gw) = 0;
00034 
00035     // Confirm that an associated VertexShader will work with this PixelShader
00036     virtual HRESULT ConfirmVertexShader(IDX9VertexShader *pvs) = 0;
00037 
00038     // Load PixelShader instructions and textures.  PixelShader instructions
00039     // should be loaded once and shared among all the nodes using this
00040     // PixelShader.  In addition, any textures necessary for the PixelShader
00041     // effect should be loaded once and shared among all the nodes using this
00042     // PixelShader.
00043     virtual HRESULT Initialize(Material *mtl, INode *node) = 0;
00044 
00045     // Number of passes for the effect this PixelShader creates.  Note that
00046     // this value will depend on the hardware currently in use.
00047     virtual int GetNumMultiPass() = 0;
00048 
00049     // Retrieve the PixelShader handle for the specified pass for use in GFX
00050     virtual LPDIRECT3DPIXELSHADER9 GetPixelShaderHandle(int numPass) = 0;
00051 
00052     // Set the PixelShader for the specified pass.  This call will be made at
00053     // least once per object to set the per object data for the PixelShader
00054     // such as the PixelShader constants.
00055     virtual HRESULT SetPixelShader(ID3D9GraphicsWindow *gw, int numPass) = 0;
00056 };
00057