- Timestamp:
- 08/27/07 15:33:58 (6 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/examples/osgviewerWX/osgviewerWX.cpp
r7283 r7307 28 28 // create osg canvas 29 29 // - initialize 30 30 31 31 32 32 int width = 800; 33 33 int height = 600; 34 34 35 int *attributes = new int[6]; 36 attributes[0] = int(WX_GL_DOUBLEBUFFER); 37 attributes[1] = WX_GL_RGBA; 38 attributes[2] = WX_GL_DEPTH_SIZE; 39 attributes[3] = 8; 40 attributes[4] = WX_GL_STENCIL_SIZE; 41 attributes[5] = 8; 42 35 43 GraphicsWindowWX* gw = new GraphicsWindowWX(frame, wxID_ANY, wxDefaultPosition, 36 wxSize(width, height), wxSUNKEN_BORDER); 37 38 44 wxSize(width, height), wxSUNKEN_BORDER, wxT("osgviewerWX"), attributes); 45 39 46 osgViewer::Viewer *viewer = new osgViewer::Viewer; 40 47 viewer->getCamera()->setGraphicsContext(gw); … … 96 103 97 104 GraphicsWindowWX::GraphicsWindowWX(wxWindow *parent, wxWindowID id, 98 const wxPoint& pos, const wxSize& size, long style, const wxString& name )99 : wxGLCanvas(parent, id, pos, size, style|wxFULL_REPAINT_ON_RESIZE, name )105 const wxPoint& pos, const wxSize& size, long style, const wxString& name, int *attributes) 106 : wxGLCanvas(parent, id, pos, size, style|wxFULL_REPAINT_ON_RESIZE, name, attributes) 100 107 { 101 108 // default cursor to standard
