/* Cube vertices, normals, shades, and modeling transform */
int NumVertices = 24;
static DIRECT3DVERTEX CubeVertices[] = {
{DIRECT3DVAL(-1.0), DIRECT3DVAL(1.0), DIRECT3DVAL(1.0), DIRECT3DVAL(0.0), DIRECT3DVAL(1.0), DIRECT3DVAL(0.0), DIRECT3DVAL(1.0), DIRECT3DVAL(0.0) },
{DIRECT3DVAL(1.0), DIRECT3DVAL(1.0), DIRECT3DVAL(1.0), DIRECT3DVAL(0.0), DIRECT3DVAL(1.0), DIRECT3DVAL(0.0), DIRECT3DVAL(1.0), DIRECT3DVAL(1.0) },
{DIRECT3DVAL(1.0), DIRECT3DVAL(1.0), DIRECT3DVAL(-1.0), DIRECT3DVAL(0.0), DIRECT3DVAL(1.0), DIRECT3DVAL(0.0), DIRECT3DVAL(0.0), DIRECT3DVAL(1.0) },
{DIRECT3DVAL(-1.0), DIRECT3DVAL(1.0), DIRECT3DVAL(-1.0), DIRECT3DVAL(0.0), DIRECT3DVAL(1.0), DIRECT3DVAL(0.0), DIRECT3DVAL(0.0), DIRECT3DVAL(0.0) },
{DIRECT3DVAL(1.0), DIRECT3DVAL(1.0), DIRECT3DVAL(-1.0), DIRECT3DVAL(0.0), DIRECT3DVAL(0.0), DIRECT3DVAL(-1.0), DIRECT3DVAL(1.0), DIRECT3DVAL(0.0) },
{DIRECT3DVAL(1.0), DIRECT3DVAL(-1.0), DIRECT3DVAL(-1.0), DIRECT3DVAL(0.0), DIRECT3DVAL(0.0), DIRECT3DVAL(-1.0), DIRECT3DVAL(1.0), DIRECT3DVAL(1.0) },
{DIRECT3DVAL(-1.0), DIRECT3DVAL(-1.0), DIRECT3DVAL(-1.0), DIRECT3DVAL(0.0), DIRECT3DVAL(0.0), DIRECT3DVAL(-1.0), DIRECT3DVAL(0.0), DIRECT3DVAL(1.0) },
{DIRECT3DVAL(-1.0), DIRECT3DVAL(1.0), DIRECT3DVAL(-1.0), DIRECT3DVAL(0.0), DIRECT3DVAL(0.0), DIRECT3DVAL(-1.0), DIRECT3DVAL(0.0), DIRECT3DVAL(0.0) },
{DIRECT3DVAL(1.0), DIRECT3DVAL(1.0), DIRECT3DVAL(1.0), DIRECT3DVAL(1.0), DIRECT3DVAL(0.0), DIRECT3DVAL(0.0), DIRECT3DVAL(1.0), DIRECT3DVAL(0.0) },
{DIRECT3DVAL(1.0), DIRECT3DVAL(-1.0), DIRECT3DVAL(1.0), DIRECT3DVAL(1.0), DIRECT3DVAL(0.0), DIRECT3DVAL(0.0), DIRECT3DVAL(1.0), DIRECT3DVAL(1.0) },
{DIRECT3DVAL(1.0), DIRECT3DVAL(-1.0), DIRECT3DVAL(-1.0), DIRECT3DVAL(1.0), DIRECT3DVAL(0.0), DIRECT3DVAL(0.0), DIRECT3DVAL(0.0), DIRECT3DVAL(1.0) },
{DIRECT3DVAL(1.0), DIRECT3DVAL(1.0), DIRECT3DVAL(-1.0), DIRECT3DVAL(1.0), DIRECT3DVAL(0.0), DIRECT3DVAL(0.0), DIRECT3DVAL(0.0), DIRECT3DVAL(0.0) },
{DIRECT3DVAL(-1.0), DIRECT3DVAL(1.0), DIRECT3DVAL(1.0), DIRECT3DVAL(0.0), DIRECT3DVAL(0.0), DIRECT3DVAL(1.0), DIRECT3DVAL(1.0), DIRECT3DVAL(0.0) },
{DIRECT3DVAL(-1.0), DIRECT3DVAL(-1.0), DIRECT3DVAL(1.0), DIRECT3DVAL(0.0), DIRECT3DVAL(0.0), DIRECT3DVAL(1.0), DIRECT3DVAL(1.0), DIRECT3DVAL(1.0) },
{DIRECT3DVAL(1.0), DIRECT3DVAL(-1.0), DIRECT3DVAL(1.0), DIRECT3DVAL(0.0), DIRECT3DVAL(0.0), DIRECT3DVAL(1.0), DIRECT3DVAL(0.0), DIRECT3DVAL(1.0) },
{DIRECT3DVAL(1.0), DIRECT3DVAL(1.0), DIRECT3DVAL(1.0), DIRECT3DVAL(0.0), DIRECT3DVAL(0.0), DIRECT3DVAL(1.0), DIRECT3DVAL(0.0), DIRECT3DVAL(0.0) },
{DIRECT3DVAL(-1.0), DIRECT3DVAL(-1.0), DIRECT3DVAL(-1.0), DIRECT3DVAL(-1.0), DIRECT3DVAL(0.0), DIRECT3DVAL(0.0), DIRECT3DVAL(0.0), DIRECT3DVAL(1.0) },
{DIRECT3DVAL(-1.0), DIRECT3DVAL(-1.0), DIRECT3DVAL(1.0), DIRECT3DVAL(-1.0), DIRECT3DVAL(0.0), DIRECT3DVAL(0.0), DIRECT3DVAL(1.0), DIRECT3DVAL(1.0) },
{DIRECT3DVAL(-1.0), DIRECT3DVAL(1.0), DIRECT3DVAL(1.0), DIRECT3DVAL(-1.0), DIRECT3DVAL(0.0), DIRECT3DVAL(0.0), DIRECT3DVAL(1.0), DIRECT3DVAL(0.0) },
{DIRECT3DVAL(-1.0), DIRECT3DVAL(1.0), DIRECT3DVAL(-1.0), DIRECT3DVAL(-1.0), DIRECT3DVAL(0.0), DIRECT3DVAL(0.0), DIRECT3DVAL(0.0), DIRECT3DVAL(0.0) },
{DIRECT3DVAL(1.0), DIRECT3DVAL(-1.0), DIRECT3DVAL(-1.0), DIRECT3DVAL(0.0), DIRECT3DVAL(-1.0), DIRECT3DVAL(0.0), DIRECT3DVAL(1.0), DIRECT3DVAL(1.0) },
{DIRECT3DVAL(1.0), DIRECT3DVAL(-1.0), DIRECT3DVAL(1.0), DIRECT3DVAL(0.0), DIRECT3DVAL(-1.0), DIRECT3DVAL(0.0), DIRECT3DVAL(0.0), DIRECT3DVAL(1.0) },
{DIRECT3DVAL(-1.0), DIRECT3DVAL(-1.0), DIRECT3DVAL(1.0), DIRECT3DVAL(0.0), DIRECT3DVAL(-1.0), DIRECT3DVAL(0.0), DIRECT3DVAL(0.0), DIRECT3DVAL(0.0) },
{DIRECT3DVAL(-1.0), DIRECT3DVAL(-1.0), DIRECT3DVAL(-1.0), DIRECT3DVAL(0.0), DIRECT3DVAL(-1.0), DIRECT3DVAL(0.0), DIRECT3DVAL(1.0), DIRECT3DVAL(0.0) }
};
// Cube edges - ordered indices into the vertex array
const int NumTri = 12;
const int CubeTri[] = {
0, 1, 2, 0, 2, 3,
4, 5, 6, 4, 6, 7,
8, 9, 10, 8, 10, 11,
12, 13, 14, 12, 14, 15,
16, 17, 18, 16, 18, 19,
20, 21, 22, 20, 22, 23
};
// Execute buffer code
// Create an execute buffer
// calculate the size of the buffer
size = sizeof(DIRECT3DVERTEX) * NumVertices;
size += sizeof(DIRECT3DSTATUS) * 1;
size += sizeof(DIRECT3DPROCESSVERTICES) * 6;
size += sizeof(DIRECT3DINSTRUCTION) * 17;
size += sizeof(DIRECT3DSTATE) * 9;
size += sizeof(DIRECT3DTRIANGLE) * NumTri;
// Create an execute buffer
// First set up the description of the buffer we want to create
memset(&debDesc, 0, sizeof(DIRECT3DEXECUTEBUFFERDESC));
debDesc.dwSize = sizeof(DIRECT3DEXECUTEBUFFERDESC);
debDesc.dwFlags = DIRECT3DDEB_BUFSIZE;
debDesc.dwBufferSize = size;
// then create it
if ( lpDev->lpVtbl->CreateExecuteBuffer( lpDev, &debDesc, &lpDIRECT3DExBuf,
NULL ) != Direct3D_OK)
return FALSE;
// now lock it so we can put stuff in the memory
if (lpDIRECT3DExBuf->lpVtbl->Lock(lpDIRECT3DExBuf, &debDesc) != Direct3D_OK)
return FALSE;
// get a pointer to the data buffer, the macros will use this pointer
lpBufStart = debDesc.lpData;
memset(lpBufStart, 0, size);
lpPointer = lpBufStart;
// this fills the buffer with the vertex information
memcpy( lpPointer, &CubeVertices[0], sizeof(DIRECT3DVERTEX) * (NumVertices));
lpPointer = (void *)(((LPDIRECT3DVERTEX) (lpPointer)) + (NumVertices))
lpInsStart = lpPointer;
// this macro sets the initial status of the execute buffer for clipping
// purposes
OP_SET_STATUS(DIRECT3DSETSTATUS_ALL, DIRECT3DSTATUS_DEFAULT, 2048, 2048,
0, 0, lpPointer);
// for six faces, there's four vertices to work on. Insert these instruction
// into the execute buffer
for (i = 0; i < 6; i++)
{
// these macros insert a command to process the vertex information
OP_PROCESS_VERTICES(1, lpPointer);
// and here's vertex information, we want these vertices transformed and lit
PROCESSVERTICES_DATA(DIRECT3DPROCESSVERTICES_TRANSFORMLIGHT, i * 4, 4, lpPointer);
}
// Make sure that the triangle data (not OP) will be QWORD aligned
// (Insert a dummy command to make the data aligned)
if (QWORD_ALIGNED(lpPointer))
{
OP_NOP(lpPointer);
}
// Insert a command that there's triangle information to follow
OP_TRIANGLE_LIST(NumTri, lpPointer);
// insert the triangle vertices into the execute buffer memory
for (i = 0; i < NumTri; i++)
{
// insert the vertex data then the flag
((LPDIRECT3DTRIANGLE)lpPointer)->v1 = CubeTri[i*3];
((LPDIRECT3DTRIANGLE)lpPointer)->v2 = CubeTri[i*3 + 1];
((LPDIRECT3DTRIANGLE)lpPointer)->v3 = CubeTri[i*3 + 2];
((LPDIRECT3DTRIANGLE)lpPointer)->wFlags =
DIRECT3DTRIFLAG_EDGEENABLETRIANGLE;
((LPDIRECT3DTRIANGLE)lpPointer)++;
}
// insert a command to tell the execute buffer to stop
OP_EXIT(lpPointer);
// we're done setting up the cube execute buffer
// to render the data, you'd set up the proper world and viewing/ matrices
// lpDIRECT3DexBuf contains a pointer to our data to execute
if (lpDev->lpVtbl->SetMatrix(lpDev, hWorld, &world) != Direct3D_OK)
return FALSE;
if (lpDev->lpVtbl->BeginScene(lpDev) != Direct3D_OK)
return FALSE;
if (lpDev->lpVtbl->Execute(lpDev, lpDIRECT3DExBuf, lpView,
DIRECT3DEXECUTE_CLIPPED) != Direct3D_OK)
return FALSE;
if (lpDev->lpVtbl->EndScene(lpDev) != Direct3D_OK)
return FALSE;
// same render code using DrawPrimative
// set up the primitive
// tell DrawPrim we're going to pass it a triangle list of type DIRECT3DVT_VERTEX
pDIRECT3Ddev->Begin( DIRECT3DPT_TRIANGLELIST , DIRECT3DVT_VERTEX);
for ( i=0; i< NumTri ; i += 3)
{
// pass in three vertices for each triangle
pDIRECT3Ddev->Vertex( CubeVertices[ CubeTri[i+0] ] );
pDIRECT3Ddev->Vertex( CubeVertices[ CubeTri[i+1] ] );
pDIRECT3Ddev->Vertex( CubeVertices[ CubeTri[i+2] ] );
}
// tell Direct3D we're done creating this triangle list
pDIRECT3Ddev->End( 0 );
// render the cube
err = pDIRECT3Ddev->BeginScene();
// set transformations, state changes, etc for the current scene here
.. state changes go here
pDIRECT3Ddev ->SetTransform(…..)
// Use DrawPrim to draw the cube
err = pDIRECT3Ddev ->DrawPrimitive(DIRECT3DPT_TRIANGLELIST, DIRECT3DVT_VERTEX,
CubeVertices, NumVertices, DIRECT3DDP_WAIT);
err = pDIRECT3Ddev ->EndScene();
Figure 6 IDirect3DDevice2::Begin dwFlags
D3DDP_DONOTCLIP The application has already done the required clipping, so the system should not necessarily clip the primitives. (This flag is a hint; the system may clip the primitive even when this flag is specified under some circumstances.)
D3DDP_DONOTUPDATEEXTENTS Disables the updating of the screen rectangle affected by this rendering call. Using this flag can potentially help performance, but the extents returned by IDirect3DDevice2::GetClipStatus will not have been updated to account for the data rendered by this call.
D3DDP_OUTOFORDER A hint to the system that the primitives can be rendered out of order. Note that back-to-back calls to DrawPrimitive methods using this flag may cause triangles from the primitives to be interleaved. The DrawPrimitive methods that use this flag are Begin, BeginIndexed, DrawIndexedPrimitive, and DrawPrimitive.
D3DDP_WAIT Causes the method to wait until the polygons have been rendered before it returns, instead of returning as soon as the polygons have been sent to the card. (On scene-capture cards, the method returns as soon as the card responds.)This flag is typically used for debugging. Applications should not attempt to use this flag to ensure that a scene is up-to-date before continuing.
Figure 8 Boid Initialization
// The boid data
D3DVERTEX boid_vertices[16];
WORD boid_indices[30];
// The next data is in the order:
// vertex (3 floats), normal (3 floats), texture coords (2 floats, not used)
// top
boid_vertices[ 0] = D3DVERTEX(D3DVECTOR(0.0f, 0.0f, 10.0f),
Normalize(D3DVECTOR(0.2f, 1.0f, 0.0f)), 0.0f, 0.5f);
boid_vertices[ 1] = D3DVERTEX(D3DVECTOR(10.0f, 0.0f, -10.0f),
Normalize(D3DVECTOR(0.1f, 1.0f, 0.0f)), 0.5f, 1.0f);
boid_vertices[ 2] = D3DVERTEX(D3DVECTOR(3.0f, 3.0f, -7.0f),
Normalize(D3DVECTOR(0.0f, 1.0f, 0.0f)), 0.425f, 0.575f);
boid_vertices[ 3] = D3DVERTEX(D3DVECTOR(-3.0f, 3.0f, -7.0f),
Normalize(D3DVECTOR(-0.1f, 1.0f, 0.0f)), 0.425f, 0.425f);
boid_vertices[ 4] = D3DVERTEX(D3DVECTOR(-10.0f, 0.0f, -10.0f),
Normalize(D3DVECTOR(-0.2f, 1.0f, 0.0f)), 0.5f, 0.0f);
//bottom
boid_vertices[ 5] = D3DVERTEX(D3DVECTOR(0.0f, 0.0f, 10.0f),
Normalize(D3DVECTOR(0.2f, -1.0f, 0.0f)), 1.0f, 0.5f);
boid_vertices[ 6] = D3DVERTEX(D3DVECTOR(10.0f, 0.0f, -10.0f),
Normalize(D3DVECTOR(0.1f, -1.0f, 0.0f)), 0.5f, 1.0f);
boid_vertices[ 7] = D3DVERTEX(D3DVECTOR(3.0f, -3.0f, -7.0f),
Normalize(D3DVECTOR(0.0f, -1.0f, 0.0f)), 0.575f, 0.575f);
boid_vertices[ 8] = D3DVERTEX(D3DVECTOR(-3.0f, -3.0f, -7.0f),
Normalize(D3DVECTOR(-0.1f, -1.0f, 0.0f)), 0.575f, 0.425f);
boid_vertices[ 9] = D3DVERTEX(D3DVECTOR(-10.0f, 0.0f, -10.0f),
Normalize(D3DVECTOR(-0.2f, -1.0f, 0.0f)), 0.5f, 0.0f);
// rear
boid_vertices[10] = D3DVERTEX(D3DVECTOR(10.0f, 0.0f, -10.0f),
Normalize(D3DVECTOR(-0.4f, 0.0f, -1.0f)), 0.5f, 1.0f);
boid_vertices[11] = D3DVERTEX(D3DVECTOR(3.0f, 3.0f, -7.0f),
Normalize(D3DVECTOR(-0.2f, 0.0f, -1.0f)), 0.425f, 0.575f);
boid_vertices[12] = D3DVERTEX(D3DVECTOR(-3.0f, 3.0f, -7.0f),
Normalize(D3DVECTOR(0.2f, 0.0f, -1.0f)), 0.425f, 0.425f);
boid_vertices[13] = D3DVERTEX(D3DVECTOR(-10.0f, 0.0f, -10.0f),
Normalize(D3DVECTOR(0.4f, 0.0f, -1.0f)), 0.5f, 0.0f);
boid_vertices[14] = D3DVERTEX(D3DVECTOR(-3.0f, -3.0f, -7.0f),
Normalize(D3DVECTOR(0.2f, 0.0f, -1.0f)), 0.575f, 0.425f);
boid_vertices[15] = D3DVERTEX(D3DVECTOR(3.0f, -3.0f, -7.0f),
Normalize(D3DVECTOR(-0.2f, 0.0f, -1.0f)), 0.575f, 0.575f);
// Now describe which order vertices are used
// top
boid_indices[ 0] = 0;
boid_indices[ 1] = 1;
boid_indices[ 2] = 2;
boid_indices[ 3] = 0;
boid_indices[ 4] = 2;
boid_indices[ 5] = 3;
boid_indices[ 6] = 0;
boid_indices[ 7] = 3;
boid_indices[ 8] = 4;
// bottom
boid_indices[ 9] = 5;
boid_indices[10] = 7;
boid_indices[11] = 6;
boid_indices[12] = 5;
boid_indices[13] = 8;
boid_indices[14] = 7;
boid_indices[15] = 5;
boid_indices[16] = 9;
boid_indices[17] = 8;
// rear
boid_indices[18] = 10;
boid_indices[19] = 15;
boid_indices[20] = 11;
boid_indices[21] = 11;
boid_indices[22] = 15;
boid_indices[23] = 12;
boid_indices[24] = 12;
boid_indices[25] = 15;
boid_indices[26] = 14;
boid_indices[27] = 12;
boid_indices[28] = 14;
boid_indices[29] = 13;
Figure 12 The Sphere Code
#define MESH_SIZE 8
#define SPHERE_VERTICES (2+MESH_SIZE*MESH_SIZE*2)
#define SPHERE_INDICES ((MESH_SIZE*4 + MESH_SIZE*4*(MESH_SIZE-1))*3)
D3DVERTEX sphere[SPHERE_VERTICES]; // array of vertices
WORD sphere_indices[SPHERE_INDICES]; // order of the vertices
float dj = 3.14159265/(MESH_SIZE+1.0f);
float di = 3.14159265/MESH_SIZE;
// generate the sphere data, note the random texture coords
// vertices 0 and 1 are the north and south poles,
and are hardcoded as such in the code
sphere[0] = D3DVERTEX(D3DVECTOR(0.0f, 1.0f, 0.0f),
Normalize(D3DVECTOR(0.0f, 1.0f, 0.0f)), 0.0f, 0.0f);
sphere[1] = D3DVERTEX(D3DVECTOR(0.0f, -1.0f, 0.0f),
Normalize(D3DVECTOR(0.0f, -1.0f, 0.0f)), 1.0f, 1.0f);
for (j=0; j<MESH_SIZE; j++) {
for (i=0; i<MESH_SIZE*2; i++) {
D3DVECTOR p;
float u, v;
// Generate the x,y,&z coordinates from the equation
// mentioned in the text
p.y = (float) cos((j+1) * dj);
p.x = (float) sin(i * di) * (float) sin((j+1) * dj);
p.z = (float) cos(i * di) * (float) sin((j+1) * dj);
// now assign the texture coordinates
u = (float)i/MESH_SIZE;
if (u>1.0f)
u -= 1.0f;
u = 1.0f - u; // flip so texture is not mirrored
v = (float)j/MESH_SIZE;
sphere[2+i+j*MESH_SIZE*2] = D3DVERTEX(p, p, u, v);
}
}
// now generate the traingle indices strip around north pole
for (i=0; i<MESH_SIZE*2; i++) {
sphere_indices[3*i] = 0; // always start tgl with the north pole
sphere_indices[3*i+1] = i+2;
sphere_indices[3*i+2] = i+3;
if (i==MESH_SIZE*2-1)
sphere_indices[3*i+2] = 2;
}
// now all the middle strips
int v; // vertex offset
int ind; // indices offset
for (j=0; j<MESH_SIZE-1; j++) {
v = 2+j*MESH_SIZE*2;
ind = 3*MESH_SIZE*2 + j*6*MESH_SIZE*2;
for (i=0; i<MESH_SIZE*2; i++) {
sphere_indices[6*i+ind] = v+i;
sphere_indices[6*i+2+ind] = v+i+1;
sphere_indices[6*i+1+ind] = v+i+MESH_SIZE*2;
sphere_indices[6*i+ind+3] = v+i+MESH_SIZE*2;
sphere_indices[6*i+2+ind+3] = v+i+1;
sphere_indices[6*i+1+ind+3] = v+i+MESH_SIZE*2+1;
if (i==MESH_SIZE*2-1) {
sphere_indices[6*i+2+ind] = v+i+1-2*MESH_SIZE;
sphere_indices[6*i+2+ind+3] = v+i+1-2*MESH_SIZE;
sphere_indices[6*i+1+ind+3] = v+i+MESH_SIZE*2+1-2*MESH_SIZE;
}
}
}
// finally strip around south pole
v = SPHERE_VERTICES-MESH_SIZE*2;
ind = SPHERE_INDICES-3*MESH_SIZE*2;
for (i=0; i<MESH_SIZE*2; i++) {
sphere_indices[3*i+ind] = 1; // the south pole is reused
sphere_indices[3*i+1+ind] = v+i+1;
sphere_indices[3*i+2+ind] = v+i;
if (i==MESH_SIZE*2-1)
sphere_indices[3*i+1+ind] = v;
}
Figure 13 New Direct3D Capability Bits with DirectX 5.0
D3DPTADDRESSCAPS_BORDER Device supports setting coordinates outside the range [0.0, 1.0] to the border color, as specified by
the D3DRENDERSTATE_BORDERCOLOR render state. This ability corresponds to the D3DTADDRESS_BORDER texture-addressing mode.
D3DPTADDRESSCAPS_INDEPENDENTUV Device can separate the texture-addressing modes of the U and V coordinates of the texture. This ability corresponds to the D3DRENDERSTATE_TEXTUREADDRESSU and D3DRENDERSTATE_TEXTUREADDRESSV render-state values.
D3DDEVCAPS_CANRENDERAFTERFLIP Device can queue rendering commands after a page flip. Applications should not change their behavior if this flag is set; this capability simply means that the device is relatively fast.
D3DDEVCAPS_DRAWPRIMTLVERTEX Device exports a DrawPrimitive-aware HAL.
D3DDEVCAPS_TEXTURENONLOCALVIDMEM Device can retrieve textures from nonlocal video (AGP) memory.
D3DPRASTERCAPS_ANISOTROPY The device supports anisotropic filtering.
D3DPRASTERCAPS_ANTIALIASEDGES The device can antialias lines forming the convex outline of objects.
D3DPRASTERCAPS_ANTIALIASSORTDEPENDENT The device supports antialiasing that is dependent on the sort order of the polygons (back-to-front or front-to-back). The application must draw polygons in the right order for antialiasing to occur. For more information, see the D3DANTIALIASMODE enumerated type.
D3DPRASTERCAPS_ANTIALIASSORTINDEPENDENT The device supports antialiasing that is not dependent on the sort order of the polygons.
D3DPRASTERCAPS_FOGRANGE The device supports range-based fog. In range-based fog, the distance of an object from the viewer is used to compute fog effects, not the depth of the object (that is, the z-coordinate) in the scene.
D3DPRASTERCAPS_MIPMAPLODBIAS The device supports level-of-detail (LOD) bias adjustments. These bias adjustments enable an application to make a mipmap appear crisper or less sharp than it normally would.
D3DPRASTERCAPS_ZBIAS The device supports z-bias values. These are integer values assigned to polygons that allow physically coplanar polygons to appear separate.
D3DPRASTERCAPS_ZBUFFERLESSHSR The device can perform hidden-surface removal without requiring the application to sort polygons, and without requiring the allocation of a z-buffer. This leaves more video memory for textures. The method used to perform hidden-surface removal is hardware-dependent and is transparent to the application. Z-bufferless HSR is performed if no z-buffer surface is attached to the rendering-target surface and the z-buffer comparison test is enabled (that is, when the state value
associated with the D3DRENDERSTATE_ZENABLE enumeration constant is set to TRUE).
D3DPTBLENDCAPS_ADD Supports the additive texture-blending mode, in which the Gouraud interpolants are added to the texture lookup with saturation semantics. This capability corresponds to the D3DTBLEND_ADD member of the D3DTEXTUREBLEND enumerated type.