[osg-users] 144 errors in gl.h

2008-07-02 Thread Zamo Cédrik
Hi,
I tried ths tutorial from :
http://osghelp.com/readarticle.php?article_id=6
everythings is ok, but now I try to create my own class to manage scene 
ressources and visual studio dislike this.
It seems that I've not linked everithings correctly.
here is my main.cpp :
#includewindows..h#includeosgViewer/Viewer#includeosgText/Text#includeworld.hint
{
world w;WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR 
lpCmdLine,intnCmdShow)// construct the viewerosg::ref_ptrosgViewer::Viewer 
viewer = newosgViewer::Viewer;// make the viewer create a 512x512 window and 
position it at 32, 32viewer-setUpViewInWindow( 32, 32, 1024, 768 );// set the 
scene-graph data the viewer will renderviewer-setSceneData( w..loadScene() );
osg::Camera* camera = 
camera-setProjectionMatrix( 
osg::Matrix::perspective(120.0,1.333,0.01,10.0));
camera-setReferenceFrame( osg::Transform::ABSOLUTE_RF );
camera-setViewMatrix( osg::Matrix::identity() );
viewer-setCamera(camera);newosg::Camera;// execute main loop}
and here is my class :
world.h#ifndef_WORLD_#define_WORLD_#includeosgDB/ReadFile#includeosg/positionattitudetransform#includeosg/matrixtransform#includeosg/node#includeosg/group#includeosg/ref_ptrclass
{worldpublic
osg::Node* loadScene();:public
world(
~world(
};:void);void);#endif
world.cpp#includeworld.hnode* world::loadScene(){
osg::Group* pGroup = 
osg::Node* pLoadedModel = osgDB::readNodeFile( 
osg::ref_ptrosg::PositionAttitudeTransform rPat = 
rPat-setPosition( osg::Vec3(0, 0, 100) );
rPat-addChild( pLoadedModel );
pGroup-addChild( rPat.get() );
}
world::world(
{
}
world::~world(
{
}
the errors (in french, I don't know how to translate most of them, but 
everythings is in gl.h) :world.cpp
c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1152) : error 
C2144: syntax error: 'void' doit être précédé de ';'
c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1152) : error 
C4430: spécificateur de type manquant - int est pris en compte par défaut. 
Remarque : C++ ne prend pas en charge int par défaut
c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1152) : error 
C2146: erreur de syntaxe : absence de ';' avant l'identificateur 'glAccum'
c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1152) : error 
C2182: 'APIENTRY' : utilisation non conforme du type 'void'
c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1152) : error 
C4430: spécificateur de type manquant - int est pris en compte par défaut. 
Remarque : C++ ne prend pas en charge int par défaut
c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1153) : error 
C2144: erreur de syntaxe : 'void' doit être précédé de ';'
c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1153) : error 
C4430: spécificateur de type manquant - int est pris en compte par défaut. 
Remarque : C++ ne prend pas en charge int par défaut
c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1153) : error 
C2086: 'int WINGDIAPI' : redéfinition
c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1152) : voir la 
déclaration de 
'WINGDIAPI'newosg::Group;data/spaceships/loma.osg);newosg::PositionAttitudeTransform;returnpGroup;void)void)returnviewer-run();


  
_ 
Envoyez avec Yahoo! Mail. Une boite mail plus intelligente http://mail.yahoo.fr___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] 144 errors in gl.h (resend with clean text)

2008-07-02 Thread Zamo Cédrik
Hi,
 
I tried this tutorial :
 
http://osghelp.com/readarticle.php?article_id=6
 
everythings is ok, but now I try to create my own class to manage scene 
ressources and visual studio dislike this.
It seems that I've not linked everythings correctly.
 
here is my MAIN.CPP: 
---
 
#includewindows.h
#includeosgViewer/Viewer
#includeosgText/Text
#includeworld.hint

world w;

WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR 
lpCmdLine,intnCmdShow){

    osg::ref_ptrosgViewer::Viewer viewer = new osgViewer::Viewer;
    viewer-setUpViewInWindow( 32, 32, 1024, 768 );
    viewer-setSceneData( w.loadScene() );
    osg::Camera* camera = camera-setProjectionMatrix( 
osg::Matrix::perspective(120.0,1.333,0.01,10.0));
    camera-setReferenceFrame( osg::Transform::ABSOLUTE_RF );
    camera-setViewMatrix( osg::Matrix::identity() );
    viewer-setCamera(camera);
    new osg::Camera;// execute main loop
}
 
and here is my class :    

 
WORLD.H    
--

 #ifndef _WORLD_
#define _WORLD_

#includeosgDB/ReadFile
#includeosg/positionattitudetransform
#includeosg/matrixtransform
#includeosg/node
#includeosg/group
#includeosg/ref_ptr

class world 
{
public :
    osg::Node* loadScene();
public :
    world(void);
    ~world(void);
}
#endif
 
WORLD.CPP 


 #includeworld.h

node* world::loadScene(){
    osg::Group* pGroup = 
    osg::Node* pLoadedModel = osgDB::readNodeFile( 
    osg::ref_ptrosg::PositionAttitudeTransform rPat = 
    rPat-setPosition( osg::Vec3(0, 0, 100) );
    rPat-addChild( pLoadedModel );
    pGroup-addChild( rPat.get() );
    new osg::Group;data/spaceships/loma.osg);
    newosg::PositionAttitudeTransform;    
    returnpGroup;
}
world::world(
{
}
world::~world(
{
}
 
THE ERRORS (in french, I don't know how to translate most of them, but 
everythings is in gl.h) : 

 world.cpp
c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1152) : error 
C2144: syntax error: 'void' doit être précédé de ';'
c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1152) : error 
C4430: spécificateur de type manquant - int est pris en compte par défaut. 
Remarque : C++ ne prend pas en charge int par défaut
c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1152) : error 
C2146: erreur de syntaxe : absence de ';' avant l'identificateur 'glAccum'
c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1152) : error 
C2182: 'APIENTRY' : utilisation non conforme du type 'void'
c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1152) : error 
C4430: spécificateur de type manquant - int est pris en compte par défaut. 
Remarque : C++ ne prend pas en charge int par défaut
c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1153) : error 
C2144: erreur de syntaxe : 'void' doit être précédé de ';'
c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1153) : error 
C4430: spécificateur de type manquant - int est pris en compte par défaut. 
Remarque : C++ ne prend pas en charge int par défaut
c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1153) : error 
C2086: 'int WINGDIAPI' : redéfinition
c:\program files\microsoft sdks\windows\v6.0a\include\gl\gl.h(1152) : voir la 
déclaration de 
'WINGDIAPI'newosg::Group;data/spaceships/loma.osg);newosg::PositionAttitudeTransform;returnpGroup;void)void)returnviewer-run();

Envoyé avec Yahoo! Mail.
Une boite mail plus intelligente. 


      
_ 
Envoyez avec Yahoo! Mail. Une boite mail plus intelligente http://mail.yahoo.fr



  
_ 
Envoyez avec Yahoo! Mail. Une boite mail plus intelligente http://mail.yahoo.fr

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] error in tutorial Loading Models from Files...

2008-07-01 Thread Zamo Cédrik
Hi,
in tutorial Loading Models from Files and Positioning Them in a Scene there 
is :    osgViewer::Viewer viewer;
    viewer.addCameraManipulator(new osgGA::TrackballManipulator);
compiler errors ;    error C2039: 'addCameraManipulator' : is not a member of 
'osgViewer::Viewer'
and    error C2039: 'TrackballManipulator' : n'est pas membre de 'osgGA'
is there up to date tutorials ?
thanks.


  
_ 
Envoyez avec Yahoo! Mail. Une boite mail plus intelligente http://mail.yahoo.fr___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org