CD3DScrollBar::CD3DScrollBar(CD3DGUI * pGUI):CD3DWnd(pGUI) { m_pDecButton=NULL; m_pIncButton=NULL; m_pTrackButton=NULL; InitWnd(pGUI); }
CD3DScrollBar::CD3DScrollBar():CD3DWnd() { m_pDecButton=NULL; m_pIncButton=NULL; m_pTrackButton=NULL; InitWnd(NULL); }
bool DXWindow::InitWindow(int _x, int _y, int _width, int _height, DisplayMode _displayMode) { m_x = _x; m_y = _y; m_width = _width; m_height = _height; return InitWnd(GetModuleHandle(0), NULL, GetCommandLine(), SW_SHOW, _displayMode); }
int main(int argc, char* argv[]) { osgViewer::Viewer myViewer; InitWnd(myViewer); osg::ref_ptr<osg::Group> root = new osg::Group(); //root->addChild(TestCasCadeByMakeRevol()); //root->addChild(TestCasCadeByMakeTorus()); //root->addChild(TestCircularTorus()); //root->addChild(TestRectangularTorus()); //root->addChild(TestCone()); //root->addChild(TestSnout()); //root->addChild(TestPyramid()); //root->addChild(TestSphere()); //root->addChild(TestEllipsoid()); //root->addChild(TestSCylinder()); //root->addChild(TestSaddle()); root->addChild(TestRectCirc()); //root->getOrCreateStateSet()->setAttributeAndModes(TestFog(), osg::StateAttribute::ON); //osg::ref_ptr<osgParticle::PrecipitationEffect> pe = new osgParticle::PrecipitationEffect(); //pe->snow(0.5f); //pe->rain(0.5f); //myViewer.getCamera()->setClearColor(pe->getFog()->getColor()); //osg::ref_ptr<osg::Node> node = TestCone(); //node->getOrCreateStateSet()->setAttributeAndModes(pe->getFog()); //root->addChild(node); //root->addChild(pe); //root->addChild(TestExplode()); osgUtil::Optimizer optimizer; optimizer.optimize(root); myViewer.setSceneData(root); myViewer.realize(); myViewer.addEventHandler(new osgGA::StateSetManipulator(myViewer.getCamera()->getOrCreateStateSet())); myViewer.addEventHandler(new osgViewer::StatsHandler); myViewer.addEventHandler(new osgViewer::WindowSizeHandler); return myViewer.run(); }
//------------------------------------------------------------------------------------------------- // 初期化処理です. //------------------------------------------------------------------------------------------------- bool App::InitApp() { // COMライブラリの初期化. HRESULT hr = CoInitialize( nullptr ); if ( FAILED( hr ) ) { ELOG( "Error : Com Library Initialize Failed." ); return false; } // ウィンドウの初期化. if ( !InitWnd() ) { ELOG( "Error : InitWnd() Failed." ); return false; } // D3D12の初期化. if ( !InitD3D() ) { ELOG( "Error : InitD3D() Failed." ); return false; } // アプリケーション固有の初期化. if ( !OnInit() ) { ELOG( "Error : OnInit() Failed." ); return false; } // ポインタ設定. g_pApp = this; // 正常終了. return true; }
CD3DProgressBar::CD3DProgressBar(CD3DGUI * pGUI):CD3DWnd(pGUI) { m_pBarWnd=NULL; InitWnd(pGUI); }
CD3DProgressBar::CD3DProgressBar(void):CD3DWnd() { m_pBarWnd=NULL; InitWnd(NULL); }