Detailed Description
- See also:
- Class IVertexShader, Class IDX8PixelShader
- Description:
- This class is available in release 4.0 and later only.
The abstract interface to the Direct-3D Vertex Shader
architecture.
The drawing functions are necessary as something other than a
simple default body if:
- The VertexShader needs to add additional per vertex data
unknown to the
Mesh to the VertexBuffer.
- The VertexShader needs to have per vertex data ordered
differently than the standard position, normal, {color, tex coords
ordering}.
- The VertexShader is being used to create cached VertexBuffers
or using higher order surfaces.
In the cases of
DrawMeshStrips() and
DrawWireMesh(), the VertexShader has the option of not only
locking and filling the VertexBuffer
with data, but also of making the actual DrawPrimitive call. In the
case of
StartLines(), the VertexShader must make the DrawPrimitive
call. The VertexShader indicates that it has done the drawing by
returning 'true' in the Draw functions provided.
In the case where the VertexShader does not want to do the drawing
but does want to fill in a VertexBuffer
with data, the VertexShader can request the GFX to create a
VertexBuffer
(and possibly an IndexBuffer) of appropriate size. The
GetVertexBuffer and GetIndexBuffer calls on the ID3DGraphicsWindow
object will do this and return the allocated buffers in subsequent
calls or reallocate them if necessary.
Please note that if a PixelShader or PixelShaders are in use, these
Draw functions may need to set them for the appropriate passes of a
multipass rendering if the drawing is done in these Draw()
functions. If the GFX is doing the drawing, then these Draw()
functions are only being used to fill in the VertexBuffer
with data; the GFX will be doing the drawing and will be setting
the PixelShaders as appropriate.
#include <idx8vertexshader.h>
List of all
members.
Public Member Functions
|
virtual
Interface_ID |
GetID () |
virtual
HRESULT |
ConfirmDevice (ID3DGraphicsWindow
*gw)=0 |
virtual
HRESULT |
ConfirmPixelShader (IDX8PixelShader *pps)=0 |
virtual
bool |
CanTryStrips ()=0 |
virtual
int |
GetNumMultiPass ()=0 |
virtual
DWORD |
GetVertexShaderHandle (int numPass)=0 |
virtual
HRESULT |
SetVertexShader (ID3DGraphicsWindow *gw,
int numPass)=0 |
virtual
bool |
DrawMeshStrips (ID3DGraphicsWindow *gw,
MeshData
*data)=0 |
virtual
bool |
DrawWireMesh (ID3DGraphicsWindow *gw,
WireMeshData
*data)=0 |
virtual
void |
StartLines (ID3DGraphicsWindow *gw,
WireMeshData
*data)=0 |
virtual
void |
AddLine (ID3DGraphicsWindow *gw,
DWORD *vert, int vis)=0 |
virtual
bool |
DrawLines (ID3DGraphicsWindow
*gw)=0 |
virtual
void |
EndLines (ID3DGraphicsWindow *gw,
GFX_ESCAPE_FN fn)=0 |
virtual
void |
StartTriangles (ID3DGraphicsWindow *gw,
MeshFaceData
*data)=0 |
virtual
void |
AddTriangle (ID3DGraphicsWindow *gw,
DWORD index, int *edgeVis)=0 |
virtual
bool |
DrawTriangles (ID3DGraphicsWindow
*gw)=0 |
virtual
void |
EndTriangles (ID3DGraphicsWindow *gw,
GFX_ESCAPE_FN fn)=0 |
Member Function Documentation
- Default Implementation:
- { return DX8_VERTEX_SHADER_INTERFACE_ID; }
Reimplemented from BaseInterface.
{ return DX8_VERTEX_SHADER_INTERFACE_ID; }
- Parameters:
- ID3DGraphicsWindow *gw
A pointer to the Direct-3D Graphics Window.
virtual HRESULT ConfirmPixelShader |
( |
IDX8PixelShader * |
pps |
) |
[pure virtual] |
- Parameters:
- IDX8PixelShader *pps
A pointer to the pixel shader to confirm for.
virtual bool CanTryStrips |
( |
|
) |
[pure virtual] |
virtual int GetNumMultiPass |
( |
|
) |
[pure virtual] |
virtual DWORD GetVertexShaderHandle |
( |
int |
numPass |
) |
[pure virtual] |
- Parameters:
- ID3DGraphicsWindow *gw
A pointer to the Direct-3D Graphics Window.
int numPass
The pass for which to set the vertex shader.
- Parameters:
- ID3DGraphicsWindow *gw
A pointer to the Direct-3D Graphics Window.
MeshData
*data
A pointer to the mesh data.
- Returns:
- TRUE if the
Mesh has actually been drawn in this call, FALSE if the GFX is
required to make the DrawPrimitive call.
- Parameters:
- ID3DGraphicsWindow *gw
A pointer to the Direct-3D Graphics Window.
WireMeshData
*data
A pointer to the wire mesh data.
- Returns:
- TRUE if the
Mesh has actually been drawn in this call, FALSE if the GFX is
required to make the DrawPrimitive call.
- Parameters:
- ID3DGraphicsWindow *gw
A pointer to the Direct-3D Graphics Window.
WireMeshData
*data
A pointer to the wire mesh data.
- Parameters:
- ID3DGraphicsWindow *gw
A pointer to the Direct-3D Graphics Window.
DWORD *vert
The array of vertices.
int vis
The visibility flag.
- Parameters:
- ID3DGraphicsWindow *gw
A pointer to the Direct-3D Graphics Window.
- Returns:
- TRUE if the
Mesh line segments have actually been drawn in this call, FALSE
if the GFX is required to make the DrawPrimitive call.
- Parameters:
- ID3DGraphicsWindow *gw
A pointer to the Direct-3D Graphics Window.
GFX_ESCAPE_FN fn
The graphics escape function.
- Parameters:
- ID3DGraphicsWindow *gw
A pointer to the Direct-3D Graphics Window.
MeshFaceData
*data
A pointer to the mesh face data.
virtual void AddTriangle |
( |
ID3DGraphicsWindow
* |
gw, |
|
|
DWORD |
index, |
|
|
int * |
edgeVis |
|
) |
|
[pure virtual] |
- Parameters:
- ID3DGraphicsWindow *gw
A pointer to the Direct-3D Graphics Window.
DWORD index
The triangle index.
int *edgeVis
The array of edge visibility information/
- Parameters:
- ID3DGraphicsWindow *gw
A pointer to the Direct-3D Graphics Window.
- Parameters:
- ID3DGraphicsWindow *gw
A pointer to the Direct-3D Graphics Window.
GFX_ESCAPE_FN fn
The graphics escape function.
IDX8VertexShader IDX8VertexShader
IDX8VertexShader IDX8VertexShader IDX8VertexShader IDX8VertexShader
IDX8VertexShader IDX8VertexShader IDX8VertexShader
IDX8VertexShader
IDX8VertexShader IDX8VertexShader
IDX8VertexShader IDX8VertexShader IDX8VertexShader IDX8VertexShader
IDX8VertexShader IDX8VertexShader IDX8VertexShader
IDX8VertexShader