-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDGP.cpp
More file actions
35 lines (27 loc) · 778 Bytes
/
Copy pathDGP.cpp
File metadata and controls
35 lines (27 loc) · 778 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#define SOWIN_DLL
#define COIN_DLL
#define HAVE_INT8_T
#include <Inventor/Win/SoWin.h>
#include <Inventor/Win/viewers/SoWinExaminerViewer.h>
#include <Inventor/nodes/SoSeparator.h>
#include <Inventor/nodes/SoCone.h>
int main(int, char ** argv)
{
HWND window = SoWin::init(argv[0]);
SoWinExaminerViewer * viewer = new SoWinExaminerViewer(window);
//make a dead simple scene graph by using the Coin library, only containing a single cone under the scenegraph root
SoSeparator * root = new SoSeparator;
root->ref();
//
//stuff to be drawn on screen must be added to the root
SoCone * cone = new SoCone;
root->addChild(cone);
viewer->setSceneGraph(root);
viewer->show();
//
SoWin::show(window);
SoWin::mainLoop();
delete viewer;
root->unref();
return 0;
}