示例#1
0
void Scene3D::Render()
{
	assert((ScreenSize[0] == app->Screen->w) && (ScreenSize[1] == app->Screen->h));

	ClearBuffers();
	app->ClearScreen();

	CompoundObject3D::Draw(Vector000, this);

	app->Lock();
	DrawPixelBuffer();
	app->Unlock();

	app->Flip();
}
示例#2
0
void CPixelBufferView::Refresh()
{
	if(m_device.IsEmpty()) return;
	if(!TestDevice()) return;

	D3DCOLOR backgroundColor = D3DCOLOR_XRGB(0x00, 0x00, 0x00);

	m_device->Clear(0, NULL, D3DCLEAR_TARGET, backgroundColor, 1.0f, 0);
	m_device->BeginScene();

	DrawCheckerboard();
	DrawPixelBuffer();

	m_device->EndScene();
	m_device->Present(NULL, NULL, NULL, NULL);
}