Example #1
0
DiffuseCubeDemo::DiffuseCubeDemo(HINSTANCE hInstance, std::string winCaption, D3DDEVTYPE devType, DWORD requestedVP)
: D3DApp(hInstance, winCaption, devType, requestedVP)
{
	if(!checkDeviceCaps())
	{
		MessageBox(0, "checkDeviceCaps() Failed", 0, 0);
		PostQuitMessage(0);
	}

	mGfxStats = new GfxStats();

	mCameraRadius    = 10.0f;
	mCameraRotationY = 1.2 * D3DX_PI;
	mCameraHeight    = 5.0f;

	mLightVecW    = D3DXVECTOR3(-0.5, 0.75f, -2.0f);
	D3DXVec3Normalize(&mLightVecW, &mLightVecW);
	mDiffuseMtrl  = D3DXCOLOR(0.0f, 0.0f, 1.0f, 1.0f);
	mDiffuseLight = D3DXCOLOR(1.0f, 1.0f, 1.0f, 1.0f);

	D3DXMatrixIdentity(&mWorld);

	buildVertexBuffer();
	buildIndexBuffer();
	buildFX();

	onResetDevice();

	InitAllVertexDeclarations();
}
Example #2
0
void CubeDemo::init(HWND* hWnd) {
    D3DRenderer::init(hWnd);

    mCameraRadius    = 10.0f;
    mCameraRotationY = 1.2 * D3DX_PI;
    mCameraHeight    = 5.0f;

    buildVertexBuffer();
    buildIndexBuffer();

    buildProjMtx();

    initAllVertexDeclarations();
}
Example #3
0
CubeDemo::CubeDemo(HINSTANCE hInstance, std::wstring winCaption)
	: D3DApp(hInstance, winCaption)
{
	mGfxStats = new GfxStats();

	mCameraRadius    = 10.0f;
	mCameraRotationY = 1.2 * D3DX_PI;
	mCameraHeight    = 5.0f;

	buildVertexBuffer();
	buildIndexBuffer();

	onResetDevice();

	InitAllVertexDeclarations();
}
Example #4
0
Mesh::Mesh(const std::string& a_Filepath, ID3D11Device* a_Device)
{
	loadMeshdata(a_Filepath);
	buildVertexBuffer(a_Device);
	buildIndexBuffer(a_Device);
}