void ParticleEffect::apply(Technique tech, ID3D11DeviceContext* dc) { if (tech == kSwapOut) throwIfFailed(streamOutTech_->GetPassByIndex(0)->Apply(0, dc)); else if (tech == kDraw) throwIfFailed(drawTech_->GetPassByIndex(0)->Apply(0, dc)); else ASSERT(false); }
uint16 BaseStation_ReadEeprom_v2::Response::result() const { //throw an exception if the command failed throwIfFailed("Read BaseStation EEPROM"); return m_result; }
uint16 ReadEeprom_v2::Response::eepromValue() const { //throw an exception if the command failed throwIfFailed("Read Node EEPROM"); return m_eepromValue; }
void Base::initialize(Device* device) { s_graphicsDevice = device; // Init Effect. // todo: remove hard code. s_effect.reset(new BasicEffect("../Engine/_Resource/Effects/Main.fxo")); // Init InputLayout. const void* shaderBytecode; size_t shaderBytecodeSize; s_effect->vertexShaderBytecode(&shaderBytecode, &shaderBytecodeSize); throwIfFailed(s_graphicsDevice->device()->CreateInputLayout( Vertex::kInputElements, Vertex::kInputElementCount, shaderBytecode, shaderBytecodeSize, &s_inputLayout)); CommonStates::initialize(device->device()); }