SoWin Build Instructions for Windows - magic-lantern-studio/mle-documentation GitHub Wiki
This page describes how to build the SoWin GUI library for the Windows 10 operating system. These instructions use the new CMake build environment (autoconf support has been deprecated)
Table of Contents
SoWin Build Instructions
Building from SoWin Github Project
The build instructions for utilizing the WizzerWorks sponsored code base can be found at SoWin 1.6.1 Build Environment.
Viewer Example Code
The following is an example on how to use the SoWin library
#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)
{
// Initialize SoWin and Inventor API libraries. This returns a main
// window to use.
HWND window = SoWin::init(argv[0]);
if (window==NULL) exit(1);
// Use one of the convenient viewer classes.
SoWinExaminerViewer * viewer = new SoWinExaminerViewer(window);
// Make a dead simple scene graph, only containing a single
// cone under the scenegraph root
SoSeparator * root = new SoSeparator;
SoCone * cone = new SoCone;
root->ref();
root->addChild(cone);
viewer->setSceneGraph(root);
viewer->show();
// Pop up the main window.
SoWin::show(window);
// Loop until exit.
SoWin::mainLoop();
// Clean up resources.
delete viewer;
root->unref();
return 0;
}