[osg-users] use vs2013 to build osg3.6.3, some error in osgviewerMFC

2018-12-08 Thread FreeSouth
Hello:
I use vs2010, vs2012 to build osg3.6.3 are all going well.   But when I use 
vs2013 to build osg3.6.3, everything goes well except osgviewerMFC example,
the error as follows:


1>-- 已启动生成:  项目: Examples osgviewerMFC, 配置: Debug x64 --
1>  MFC_OSG_MDI.cpp
1>  MFC_OSG_MDIDoc.cpp
1>  MFC_OSG_MDIView.cpp
1>  stdafx.cpp
1>  MFC_OSG.cpp
1>C:\Program Files (x86)\Microsoft Visual Studio 
12.0\VC\atlmfc\include\afx.h(38): warning C4996: 
'MBCS_Support_Deprecated_In_MFC': MBCS support in MFC is deprecated and may be 
removed in a future version of MFC. 
(D:\18kly2\osg\vs2013x64\3.6.3\osg3.6.3src\examples\osgviewerMFC\MFC_OSG_MDI.cpp)
1>  C:\Program Files (x86)\Microsoft Visual Studio 
12.0\VC\atlmfc\include\afx.h(33) : 参见“MBCS_Support_Deprecated_In_MFC”的声明
1>  MainFrm.cpp
1>C:\Program Files (x86)\Microsoft Visual Studio 
12.0\VC\atlmfc\include\afx.h(38): warning C4996: 
'MBCS_Support_Deprecated_In_MFC': MBCS support in MFC is deprecated and may be 
removed in a future version of MFC. 
(D:\18kly2\osg\vs2013x64\3.6.3\osg3.6.3src\examples\osgviewerMFC\MFC_OSG_MDIDoc.cpp)
1>  C:\Program Files (x86)\Microsoft Visual Studio 
12.0\VC\atlmfc\include\afx.h(33) : 参见“MBCS_Support_Deprecated_In_MFC”的声明
1>  ChildFrm.cpp
1>C:\Program Files (x86)\Microsoft Visual Studio 
12.0\VC\atlmfc\include\afx.h(38): warning C4996: 
'MBCS_Support_Deprecated_In_MFC': MBCS support in MFC is deprecated and may be 
removed in a future version of MFC. 
(D:\18kly2\osg\vs2013x64\3.6.3\osg3.6.3src\examples\osgviewerMFC\MFC_OSG_MDIView.cpp)
1>  C:\Program Files (x86)\Microsoft Visual Studio 
12.0\VC\atlmfc\include\afx.h(33) : 参见“MBCS_Support_Deprecated_In_MFC”的声明
1>C:\Program Files (x86)\Microsoft Visual Studio 
12.0\VC\atlmfc\include\afx.h(38): warning C4996: 
'MBCS_Support_Deprecated_In_MFC': MBCS support in MFC is deprecated and may be 
removed in a future version of MFC. 
(D:\18kly2\osg\vs2013x64\3.6.3\osg3.6.3src\examples\osgviewerMFC\stdafx.cpp)
1>  C:\Program Files (x86)\Microsoft Visual Studio 
12.0\VC\atlmfc\include\afx.h(33) : 参见“MBCS_Support_Deprecated_In_MFC”的声明
1>C:\Program Files (x86)\Microsoft Visual Studio 
12.0\VC\atlmfc\include\afx.h(38): warning C4996: 
'MBCS_Support_Deprecated_In_MFC': MBCS support in MFC is deprecated and may be 
removed in a future version of MFC. 
(D:\18kly2\osg\vs2013x64\3.6.3\osg3.6.3src\examples\osgviewerMFC\MFC_OSG.cpp)
1>  C:\Program Files (x86)\Microsoft Visual Studio 
12.0\VC\atlmfc\include\afx.h(33) : 参见“MBCS_Support_Deprecated_In_MFC”的声明
1>C:\Program Files (x86)\Microsoft Visual Studio 
12.0\VC\atlmfc\include\afx.h(38): warning C4996: 
'MBCS_Support_Deprecated_In_MFC': MBCS support in MFC is deprecated and may be 
removed in a future version of MFC. 
(D:\18kly2\osg\vs2013x64\3.6.3\osg3.6.3src\examples\osgviewerMFC\MainFrm.cpp)
1>  C:\Program Files (x86)\Microsoft Visual Studio 
12.0\VC\atlmfc\include\afx.h(33) : 参见“MBCS_Support_Deprecated_In_MFC”的声明
1>C:\Program Files (x86)\Microsoft Visual Studio 
12.0\VC\atlmfc\include\afx.h(38): warning C4996: 
'MBCS_Support_Deprecated_In_MFC': MBCS support in MFC is deprecated and may be 
removed in a future version of MFC. 
(D:\18kly2\osg\vs2013x64\3.6.3\osg3.6.3src\examples\osgviewerMFC\ChildFrm.cpp)
1>  C:\Program Files (x86)\Microsoft Visual Studio 
12.0\VC\atlmfc\include\afx.h(33) : 参见“MBCS_Support_Deprecated_In_MFC”的声明
1>C:\Program Files (x86)\Microsoft Visual Studio 
12.0\VC\atlmfc\include\afxwin.h(2092): error C2146: 语法错误: 
缺少“;”(在标识符“m_pConfigs”的前面) 
(D:\18kly2\osg\vs2013x64\3.6.3\osg3.6.3src\examples\osgviewerMFC\stdafx.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio 
12.0\VC\atlmfc\include\afxwin.h(2092): error C4430: 缺少类型说明符 - 假定为 int。注意:  C++ 
不支持默认 int 
(D:\18kly2\osg\vs2013x64\3.6.3\osg3.6.3src\examples\osgviewerMFC\stdafx.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio 
12.0\VC\atlmfc\include\afxwin.h(2019): error C2065: “GID_ZOOM”: 未声明的标识符 
(D:\18kly2\osg\vs2013x64\3.6.3\osg3.6.3src\examples\osgviewerMFC\stdafx.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio 
12.0\VC\atlmfc\include\afxwin.h(2019): error C2065: “GC_ZOOM”: 未声明的标识符 
(D:\18kly2\osg\vs2013x64\3.6.3\osg3.6.3src\examples\osgviewerMFC\stdafx.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio 
12.0\VC\atlmfc\include\afxwin.h(2025): error C2065: “GID_ROTATE”: 未声明的标识符 
(D:\18kly2\osg\vs2013x64\3.6.3\osg3.6.3src\examples\osgviewerMFC\stdafx.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio 
12.0\VC\atlmfc\include\afxwin.h(2025): error C2065: “GC_ROTATE”: 未声明的标识符 
(D:\18kly2\osg\vs2013x64\3.6.3\osg3.6.3src\examples\osgviewerMFC\stdafx.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio 
12.0\VC\atlmfc\include\afxwin.h(2031): error C2065: “GID_TWOFINGERTAP”: 未声明的标识符 
(D:\18kly2\osg\vs2013x64\3.6.3\osg3.6.3src\examples\osgviewerMFC\stdafx.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio 
12.0\VC\atlmfc\include\afxwin.h(2031): error C2065: “GC_TWOFINGERTAP”: 未声明的标识符 

[osg-users] A big bug's in osgText??

2011-08-03 Thread FreeSouth
Follow the steps that maybe you can find something wrong in osgText at OSG3.0, 
maybe something wrong in OSG before 3.0 also :
We will modify the osgViewerMFC example to create a very simply HUD on the 
window:
1: down the attachment in this mail and replace that two files in the 
osgViewerMFC folder.
2: press F5 too debug, and open a cow.osg, you can find a HUD at the top of the 
windows.
cook a coffee , and drink it , you will find something ASSERT have interrupted 
the debugging when you back (maybe some minutes),  you will find something 
wrong messages about osgText.dll in call stack window. If you don't add this 
HUD, the example can debugging forever...


Something wrong in the HUD, or in OSG3.0 osgText?// MFC_OSG.cpp : implementation of the cOSG class
//
#include stdafx.h
#include MFC_OSG.h
#include MFC_OSG_MDI.h


class CPickHandle :
public osgGA::GUIEventHandler
{
public:
CPickHandle(osg::Camera* text)
{
hud = text;

}
~CPickHandle(void)
{

}

public:
bool handle(const osgGA::GUIEventAdapter ea, 
osgGA::GUIActionAdapter aa,osg::Object*, osg::NodeVisitor*)
{
if(hud)
{
static int i = 0; 
i ++;
if(i%20 == 0)
{
if(i  5000)
i = 0;

osg::Geode* gnode = 
dynamic_castosg::Geode*(hud-getChild(0));

if(gnode)
{
osgText::Text* text = 
dynamic_castosgText::Text*(gnode-getDrawable(0));
if(text)
{
char content[512];
sprintf(content,Type = 
%d\nNo = %d\n\n\nLong = %d\nLat = %d\nHeight = %d\nSpeed = %d\n,i + 100,i + 
358, i%78, i *2+1,i * 5,i + 2);
wchar_t wcontent[512];

MultiByteToWideChar(CP_ACP,MB_PRECOMPOSED,content,512,wcontent,512);
text-setText(wcontent);
}
}
}
}

return false;
}

private:
osg::ref_ptrosg::Camera hud;
};


cOSG::cOSG(HWND hWnd) :
   m_hWnd(hWnd) 
{
}

cOSG::~cOSG()
{
mViewer-setDone(true);
Sleep(1000);
mViewer-stopThreading();

delete mViewer;
}

void cOSG::InitOSG(std::string modelname)
{
// Store the name of the model to load
m_ModelName = modelname;

// Init different parts of OSG
InitManipulators();
InitSceneGraph();
InitCameraConfig();
}

void cOSG::InitManipulators(void)
{
// Create a trackball manipulator
trackball = new osgGA::TrackballManipulator();

// Create a Manipulator Switcher
keyswitchManipulator = new osgGA::KeySwitchMatrixManipulator;

// Add our trackball manipulator to the switcher
keyswitchManipulator-addMatrixManipulator( '1', Trackball, 
trackball.get());

// Init the switcher to the first manipulator (in this case the only 
manipulator)
keyswitchManipulator-selectMatrixManipulator(0);  // Zero based index Value
}


void cOSG::InitSceneGraph(void)
{
// Init the main Root Node/Group
mRoot  = new osg::Group;

// Load the Model from the model name
mModel = osgDB::readNodeFile(m_ModelName);

// Optimize the model
osgUtil::Optimizer optimizer;
optimizer.optimize(mModel.get());
optimizer.reset();

// Add the model to the scene
mRoot-addChild(mModel.get());
}

void cOSG::InitCameraConfig(void)
{
// Local Variable to hold window size data
RECT rect;

// Create the viewer for this window
mViewer = new osgViewer::Viewer();

// Add a Stats Handler to the viewer
mViewer-addEventHandler(new osgViewer::StatsHandler);

// Get the current window size
::GetWindowRect(m_hWnd, rect);

// Init the GraphicsContext Traits
osg::ref_ptrosg::GraphicsContext::Traits traits = new 
osg::GraphicsContext::Traits;

// Init the Windata Variable that holds the handle for the Window to 
display OSG in.
osg::ref_ptrosg::Referenced windata = new 
osgViewer::GraphicsWindowWin32::WindowData(m_hWnd);

// Setup the traits parameters
traits-x = 0;
traits-y = 0;
traits-width = rect.right - rect.left;
traits-height = rect.bottom - rect.top;
traits-windowDecoration = false;
traits-doubleBuffer = true;
traits-sharedContext = 0;

[osg-users] press 's' in the osgviewerMFC, the program will dead????? the version is OSG3.0 WINXP 32BIT VS2010

2011-08-03 Thread FreeSouth
press 's' in the osgviewerMFC, the program will dead? the version is OSG3.0 
WINXP 32BIT VS2010___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Using osgdem, Why the memory doesn't free when I far from the complex osga scene to its single layer?

2008-03-02 Thread FreeSouth
 
 Hi all:
 
 Using osgdem, Why the memory doesn't free when I far from the complex osga 
scene to its single layer?
 
 I use this cmd to test:  osgdem --xx 10 --yy 10 -v 0.1 -d h.tif 
--PagedLOD -l 4 -o a.ive -a a.osga
 
 
Regards
 
Yang ShiXing___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Using osgdem, Why the memory doesn't free when I far from the complex osga scene to its single layer?

2008-03-02 Thread FreeSouth
Hello:
 
   I have use the cmd like this:osgdem --xx 10 --yy 10 -v 0.1 -d h.tif  
--PagedLOD -l 10 -o a.ive -a a.osga 
   
   , then, I use osgviewer to open this file(a.osga).
 
   The memery is Occupied 1378360KB when the viewer point face the scene (a 
high detail), I think that when I control the viewer point to a far distant, 
the scene change into a low detail, the memery maybe occupied less than 
1378360KB.  But not. It also 1378360KB, more or less than it.
 
   I don't know I think like this correct or not.
 
Regards
Yang ShiXing
 
 Hi ShiXing, 


2008/3/2 FreeSouth [EMAIL PROTECTED]: 


  Hi all: 


  Using osgdem, Why the memory doesn't free when I far from the complex 
 osga scene to its single layer? 


  I use this cmd to test:  osgdem --xx 10 --yy 10 -v 0.1 -d h.tif 
 --PagedLOD -l 4 -o a.ive -a a.osga 



What memory isn't freeing?  osgdem isn't freeing memory?  A viewer 
that you are using to view the scene?  What metric are you using that 
indicates memory isn't being freed? 
 
 
 
 ___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] About using texture in osgdem problem,

2008-02-29 Thread FreeSouth
 
 
 Hello all:
 
  I have run into a very hot potato.
 
  I have a dem file, but no texture to fit it.  So I want get a texture from 
Google Earth. I have used ERDAS to correct his goemetric, and it works in ERDAS 
well, can be fit the dem file also.
 
  But when I use osgdem to deal the dem and this texture, some thing very 
strang happend in the osga file, the osga file is not right. 
 
  I am sure that the mistake happend in dealing this texture, and I want 
somebody to tell how to deal a texture to fit a dem file.
 
Regards
Yang ShiXing___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Test www.osgChina.org , A fatal error(about visiting) have fixed

2008-02-17 Thread FreeSouth
 
 Hello Rebort and all :
 
  A fatel error about some area can't visiting the website have been fixed.
 
  Please test it www.osgChina.org.
 
  And I want to applicate a link to www.openscenegraph.org. How to do it?
 
Thanks all 
Yang ShiXing
2008  2  17
 ___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Congratulations ag! OpenSceneGraph Chinese Mirror have been finished , try it.

2008-02-12 Thread FreeSouth
Hi John Donovan:

  He He, The same to you Gung hey fat choi!.

  If you go to China some day , I'd like to teach you about Chinese. He he.

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


Re: [osg-users] Congratulations ag! OpenSceneGraph Chinese Mirror have been finished , try it.

2008-02-12 Thread FreeSouth
Hi Jean-S:

  Thank you for your attation. I am waitting his back.

  Gung hey fat choi! He, he.

ShiXing

Hello ShiXing,

 I want to know how to applicate a link at openscenegraph.org to 
 osgChina, what should I do .

Unfortunately the front page on openscenegraph.org is protected and 
cannot be edited. We will have to wait till Robert comes back from his 
vacation to get the link to your site there.

J-S

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


[osg-users] Test www.osgChina.org . Normal?

2008-02-12 Thread FreeSouth
 
Hello all :
   Somebody found that He(at Singapore) cann't visit www.osgChina.org (located 
HangZhou China.
   I don't know this site can be visited normally or not at other country. 
Thanks All.
Yang ShiXing___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Congratulations ag! OpenSceneGraph Chinese Mirror have been finished , try it.

2008-02-08 Thread FreeSouth
Hello Rebort and all :

  I am sorry for my poor English. I am very delight to tell every one that 
OpenSceneGraph Chinese Mirror have been finished soon, URL:www.osgChina.org 
yestoday is Chinese new year.

  This website have five blocks.

  1: The pages of www.openscenegraph.org 's wiki , absolutely in Chinese.
  2: A Chinese WIKI, it includes all the resource in China about OSG,but It 
have nothing now for collecting and finishing it may cost a very long time.
  3: The VR enterprise/Products in China. I plan this block as a display 
platform for Chinese enterprise who uses OSG.
  4: A OSG training, have been held one times successfully at 2008 Jan 15th in 
BeiJing.
  5: A bbs URL:bbs.osgChina.org in Chinese.

  and I want to applicate a  link at www.OpenSceneGraph.org , I don't know how 
to do it.

  This site have only finished a frame, it will be rich as time goes by.

  Thanks Rebort, and all .

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


Re: [osg-users] Congratulations ag! OpenSceneGraph Chinese Mirror have been finished , try it.

2008-02-08 Thread FreeSouth
Hello:

Thank you for your attation, and if you need I will try my best to help us 
.Wang Rui is a very smart guy ,*_*.

Thanks all.

I want to know how to applicate a link at openscenegraph.org to osgChina, what 
should I do .

Happy New Year(in China , It is New Year.)

Yang ShiXing

Hello Wang Rui,

I want to first say good work to all involved in this Chinese mirror of
the OSG site, I had a look though I cannot read it, it looks like a
faithful transition. Great work Yang Shixing and the osgChina team!

 The NPS tutorials in Support/Tutorials have all been modified and 
 translated. (OSG version 2.2 for most of the chapters) I think it better 
 than the English ones, which are partly written in OSG 1.2~~ :)

Yes indeed! Would it be possible for the person(s) who did the
conversion to contribute back the changes so we can update the English
versions as well? I imagine most modifications were mostly in the code
samples, so this should not require much additional translation I hope...

Thanks, and again good work to all involved!
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Congratulations! OpenSceneGraph Chinese Mirror have been finished , try it.

2008-02-07 Thread FreeSouth
Hello Rebort and all :
 
  I am sorry for my poor English. I am very delight to tell every one that 
OpenSceneGraph Chinese Mirror have been finished soon, URL:www.osgChina.org 
yestoday is Chinese new year.
 
  This website have five blocks.
 
  1: The pages of www.openscenegraph.org 's wiki , absolutely in Chinese.
  2: A Chinese WIKI, it includes all the resource in China about OSG,but It 
have nothing now for collecting and finishing it may cost a very long time.
  3: The VR enterprise/Products in China. I plan this block as a display 
platform for Chinese enterprise who uses OSG.
  4: A OSG training, have been held one times successfully at 2008 Jan 15th in 
BeiJing.
  5: A bbs URL:bbs.osgChina.org in Chinese.
 
  and I want to applicate a  link at www.OpenSceneGraph.org , I don't know how 
to do it.
 
  This site have only finished a frame, it will be rich as time goes by.
 
  Thanks Rebort, and all .
 
Thank you.___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] openscenegraph.org's Chinese mirror will be run after the new year.

2008-01-16 Thread FreeSouth
 
Hello all:
 
  Openscenegraph.org's Chinese mirror will be run after the new year.
 
  It will include most of  the official www.openscenegraph.org's content , some 
articles in Chinese,  tutorials notes in Chinese.
 
  Mutiple language mirror maybe needed in many countys as openscenegraph more 
and more popular in the world.
 
Yang ShiXing
 
 
 ___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] openscenegraph.org's Chinese mirror will be run after the new

2008-01-16 Thread FreeSouth
Hi Robert and all:

Thanks for Robert's support and his kind help in process.

This Chinese mirror have spent more time for his surface looks like the 
English official website. I use the Trac and almost all the images and chart's 
come from openscenegraph.org, the datebase is a very important difficulties in 
Tracs.  I have finish part of the mirror which is most looks like 
openscenegraph.org(99%, the 1% is the language difference).I think this will be 
help the osger in China to realize the mirror come from openscenegrph.org.

It also include some Chinese, but some are translating from English also, 
such as Navy's tutorials. Every nation's condition have some difference in 
using OpenSceneGraph. But when the website is finished after Feb 7, I will send 
a difference between the two site and if some need the articles or the 
tutorials in Chinese, I and my colleagues will translate it into English. For 
our poor English, Robert will edit it.

OpenSceneGraph is famous for two points, the first is powerful, and the 
last is poor document.

Mutiple langulage mirror is very useful for every nations.Someone have 
interesting in it?

Thank you Robert.

Regards

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