bool D3DTextureDemo::Init() { if (!D3DApp::Init()) return false; mWaves.Init(160, 160, 1.0f, 0.03f, 3.25f, 0.4f); BuildLandGemetryBuffers(); BuildWaveGemetryBuffers(); LoadShader(); BuildVertexLayout(); BuildRasterState(); mCBObject.Initilize(m_d3dDevice); mCBLightingObject.Initilize(m_d3dDevice); //HR(D3DX11CreateShaderResourceViewFromFile( HR(CreateDDSTextureFromFile( m_d3dDevice, L"Texture/grass.dds", 0, &mGrassMapSRV, 0, nullptr), L"Create DDS grass texture"); HR(CreateDDSTextureFromFile( m_d3dDevice, L"Texture/water2.dds", 0, &mWavesMapSRV, 0, nullptr), L"Create DDS wave texture"); return true; }
bool HillsApp::Init() { if(!D3DApp::Init()) return false; BuildGeometryBuffers(); BuildFX(); BuildVertexLayout(); BuildRasterState(); mObjectConstantBuffer.Initialize(md3dDevice); return true; }
bool D3DLightingBasic::Init() { if (!D3DApp::Init()) return false; mWaves.Init(160, 160, 1.0f, 0.03f, 3.25f, 0.4f); BuildLandGemetryBuffers(); BuildWaveGemetryBuffers(); LoadShader(); BuildVertexLayout(); BuildRasterState(); mCBObject.Initilize(m_d3dDevice); mCBLightingObject.Initilize(m_d3dDevice); return true; }