I've been tinkering away at a C++ adaptor for GLUT and Inventor
as part of the GLT (OpenGL Tools) library which is GPL and
currently supports Win32 and Linux. The problem is that Christmas
is fast approaching and it doesn't seem that I will have time
to keep fiddling in Linux (Madrake 7.2) to get Inventor to
compile so I can do a release of GLT with this new feature.
If there is anyone here with a working Linux/Inventor installation
and is willing to do some compiling, testing and trouble-shooting,
please email me at nigels@xxxxxxxxxx I don't believe that
there will be any major issues, but I just don't have the
opportunity to try the latest CVS snapshot on Mandrake to do
this for myself.
I'm also keen to support other Unixes or operating systems.
For a demo of Inventor examples on Win32 including ivclock, maze
and some Inventor Mentor examples, have a look at:
http://www.nigels.com/glt/gltInventorDemo0.3.tgz
These are precompiled Windows EXE and DLL. Mouse, keyboard and
time events are all implemented - perhaps not to perfection,
but certainly to a useful extent. They depend only on
INVENTOR.DLL and GLUT32.DLL, which are included in the archive.
Just repeating the point of this project - to combine the
power and flexibility of Inventor with the portability and
simplicity of GLUT. (Well, also to provide a nice and
clean object-oriented C++ wrapper for GLUT) The scope of
Open Inventor integration is all scenegraph functionality
upto the SoSceneManager level. (ie. No OS-specific user
interface components, etc)
For more information, please refer to:
http://www.nigels.com/glt/
Cheers,
Nigel Stewart
winiv.h
-----------------------------------------------------------
#ifndef GLUTM_WINIV_H
#define GLUTM_WINIV_H
/*
Glt OpenGL C++ Toolkit (Glt)
Copyright (C) 2000 Nigel Stewart
Email: nigels@xxxxxxxxxx WWW: http://www.nigels.com/glt/
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <glutm/master.h>
#include <glutm/window.h>
#ifdef GLUTM_OPEN_INVENTOR
#include <Inventor/SoSceneManager.h>
class GlutWindowInventor : public GlutWindow, public SoSceneManager
{
friend GlutMaster;
public:
GlutWindowInventor(
const std::string &title = titleDefault,
int width = widthDefault,
int height = heightDefault,
int x = xDefault,
int y = yDefault,
unsigned int displayMode = displayModeDefault
);
~GlutWindowInventor();
void OnDisplay();
void OnIdle();
void OnReshape(int w, int h);
void OnKeyboard(unsigned char key, int x, int y);
void OnSpecial(int key, int x, int y);
void OnMouse(int button, int state, int x, int y);
void OnMotion(int x, int y);
void OnPassiveMotion(int x, int y);
protected:
void OnPreTimer(unsigned char val);
private:
static void initOpenInventor();
static void inventorTick();
static bool _initOpenInventor;
};
#endif
#endif
--
Nigel Stewart (nigels@xxxxxxxxxx)
Research Student, Software Developer
Just two stops down the line at Zoo Station.
|