Esempio n. 1
0
File: Triangle.cpp Progetto: jcrm/DX
void Triangle::init(ID3D10Device* device){
	md3dDevice = device;
	mNumVertices=	3;
	mNumFaces=		1;
	indexed = false;
	DrawVertices();
}
Esempio n. 2
0
bool LudoRenderer::DrawQuad(const float x1, const float y1, const float z1, const float x2,
                            const float y2, const float z2, const float x3, const float y3,
                            const float z3, const float x4, const float y4, const float z4, const LPDIRECT3DTEXTURE9 texture)
{
    // Drawing a simple quad
    struct CUSTOMVERTEX t_vert[] =
    {
        // bottom right
        { x1, y1, z1, 0, 0, -1, 1, 1 },
        // bottom left
        { x2, y2, z2, 0, 0, -1, 0, 1},
        // top right
        { x3, y3, z3, 0, 0, -1, 1, 0},
        //top leff
        { x4, y4, z4, 0, 0, -1, 0, 0}
    };

    DrawVertices(*t_vert, 4, NULL, 0, texture);
    return true;
}
Esempio n. 3
0
void DrawPolygon(hdPolygon* polygon, hdTexture* texture)
{
    if (polygon->IsHidden()) return;
    DrawVertices(polygon->GetVertices(), polygon->GetTextureCoordinates(), polygon->GetVertexCount(), polygon->GetAABB(), texture);
}