/** @input VOID @return 생성결과 @brief 초기화 및 정점 버퍼 생성 */ HRESULT TestCube::Create() { InitVB(); InitIB(); return S_OK; }
void Terrain::Init(ID3D11Device* device, const InitInfo& info) { mTerrainData = info; LoadHeightMap(); InitVB(device); InitIB(device); mEffect = new TerrainEffect(); mEffect->LoadEffect(L"FX/terrain.fx", device); LoadTextures(device); }
FontRasterizer::FontRasterizer(BaseCamera* cam, CXMMATRIX proj, LitTexEffect* effect, int numRows, int numCols, ID3D11ShaderResourceView* texture, ID3D11Device* device) : m2DCam(cam), mEffect(effect), mNumRows(numRows), mNumCols(numCols), mFontImage(texture) { XMStoreFloat4x4(&m2DProj, proj); InitVB(device); InitIB(device); }
Sprite::Sprite(FXMVECTOR pos2D, FXMVECTOR scale2D, unsigned short frameWidth, unsigned short frameHeight, float depth, const std::vector<Frame*>& frames, float frameRate, ID3D11Device* device) : mFrameWidth(frameWidth), mFrameHeight(frameHeight), mDepth(depth), mFrames(frames), mFrameRate(frameRate), mFrameIndex(0), mAngle(0), mCurrFrameTime(0.0f) { XMStoreFloat2(&mPos, pos2D); XMStoreFloat2(&mScale, scale2D); InitVB(device); InitIB(device); }
void CUITrackBar::InitTrackBar(Fvector2 pos, Fvector2 size) { float item_height; float item_width; InitIB (pos, size); InitState (S_Enabled, "ui_inGame2_opt_slider_bar"); InitState (S_Disabled, "ui_inGame2_opt_slider_bar"); item_width = CUITextureMaster::GetTextureWidth("ui_inGame2_opt_slider_box_e"); item_height = CUITextureMaster::GetTextureHeight("ui_inGame2_opt_slider_box_e"); item_width *= UI().get_current_kx(); m_pSlider->InitButton( Fvector2().set(0.0f, 0.0f) /*(size.y - item_height)/2.0f)*/, Fvector2().set(item_width, item_height) ); //size m_pSlider->InitTexture("ui_inGame2_opt_slider_box"); SetCurrentState(S_Enabled); }
/**----------------------------------------------------------------------------- * 기하정보 초기화 *------------------------------------------------------------------------------ */ HRESULT InitGeometry() { if ( FAILED( InitTexture() ) ) { return E_FAIL; } if ( FAILED( InitVB() ) ) { return E_FAIL; } if ( FAILED( InitIB() ) ) { return E_FAIL; } SetupCamera(); // 최초의 마우스 위치 보관 POINT pt; GetCursorPos( &pt ); g_dwMouseX = pt.x; g_dwMouseY = pt.y; return S_OK; }
//------------------------------------------------------------------------------------- void BillBoard::SetMesh(){ InitVB(); InitIB(); InitSprite(); SetupMatrix(); }
void Cube::InitBuffers(ID3D11Device* device, float width, float height,float depth) { InitVB(device, width, height, depth); InitIB(device); }