1
0
Fork 0

Port jpg-httpd to OSG

This commit is contained in:
fredb 2006-12-16 17:44:46 +00:00
parent 6a2c63ae1d
commit 2422747bcc
3 changed files with 17 additions and 7 deletions

View file

@ -23,7 +23,7 @@
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\..;..\..\src;..\..\src\include;..\..\..\SimGear;"..\..\..\pthreads-w32-2-7-0-release";..\..\src\FDM\JSBSim;..\..\..\OpenSceneGraph\include;..\..\..\OpenThreads\include;..\..\..\3rdParty\include"
PreprocessorDefinitions="_DEBUG;WIN32;_CONSOLE;HAVE_CONFIG_H;FGFS;ENABLE_AUDIO_SUPPORT;_FG_NDEBUG;FG_PLIB_JOYSTICK_GETNAME;FG_NEW_ENVIRONMENT;FG_MPLAYER_AS;ENABLE_THREADS=1;FG_ENABLE_MULTIPASS_CLOUDS;ENABLE_SP_FMDS;_USE_MATH_DEFINES;NO_FG_JPEG_SERVER"
PreprocessorDefinitions="_DEBUG;WIN32;_CONSOLE;HAVE_CONFIG_H;FGFS;ENABLE_AUDIO_SUPPORT;_FG_NDEBUG;FG_PLIB_JOYSTICK_GETNAME;FG_NEW_ENVIRONMENT;FG_MPLAYER_AS;ENABLE_THREADS=1;FG_ENABLE_MULTIPASS_CLOUDS;ENABLE_SP_FMDS;_USE_MATH_DEFINES;FG_JPEG_SERVER"
StringPooling="TRUE"
BasicRuntimeChecks="0"
RuntimeLibrary="3"
@ -42,7 +42,7 @@
<Tool
Name="VCLinkerTool"
AdditionalOptions="/MACHINE:I386"
AdditionalDependencies="glut32.lib wsock32.lib sg_d.lib net_d.lib ssg_d.lib pui_d.lib puaux_d.lib fnt_d.lib js_d.lib ul_d.lib zlibd.lib pthreadVC2d.lib OpenAL32.lib ALut.lib libjpegd.lib osgd.lib osgDBd.lib osgUtild.lib"
AdditionalDependencies="glut32.lib wsock32.lib sg_d.lib net_d.lib ssg_d.lib pui_d.lib puaux_d.lib fnt_d.lib js_d.lib ul_d.lib zlibd.lib pthreadVC2d.lib OpenAL32.lib ALut.lib libjpegd.lib osgd.lib osgDBd.lib osgUtild.lib libjpegd.lib"
OutputFile="Debug/fgfs.exe"
LinkIncremental="2"
SuppressStartupBanner="TRUE"
@ -87,7 +87,7 @@
Name="VCCLCompilerTool"
InlineFunctionExpansion="1"
AdditionalIncludeDirectories="..\..\..;..\..\src;..\..\src\include;..\..\src\FDM\JSBSim;..\..\..\SimGear;&quot;..\..\..\pthreads-w32-2-7-0-release&quot;;..\..\..\OpenSceneGraph\include;..\..\..\Producer\include;..\..\..\OpenThreads\include;..\..\..\3rdParty\include"
PreprocessorDefinitions="HAVE_CONFIG_H;FGFS;NDEBUG;WIN32;_CONSOLE;ENABLE_AUDIO_SUPPORT;_FG_NDEBUG;FG_PLIB_JOYSTICK_GETNAME;FG_NEW_ENVIRONMENT;ENABLE_THREADS=1;FG_MPLAYER_AS;FG_USE_CLOUDS_3D;FG_ENABLE_MULTIPASS_CLOUDS;ENABLE_SP_FMDS;_USE_MATH_DEFINES"
PreprocessorDefinitions="HAVE_CONFIG_H;FGFS;NDEBUG;WIN32;_CONSOLE;ENABLE_AUDIO_SUPPORT;_FG_NDEBUG;FG_PLIB_JOYSTICK_GETNAME;FG_NEW_ENVIRONMENT;ENABLE_THREADS=1;FG_MPLAYER_AS;FG_USE_CLOUDS_3D;FG_ENABLE_MULTIPASS_CLOUDS;ENABLE_SP_FMDS;_USE_MATH_DEFINES;FG_JPEG_SERVER"
StringPooling="TRUE"
RuntimeLibrary="2"
EnableFunctionLevelLinking="TRUE"
@ -104,7 +104,7 @@
<Tool
Name="VCLinkerTool"
AdditionalOptions="/MACHINE:I386"
AdditionalDependencies="glut32.lib wsock32.lib sg.lib net.lib ssg.lib pui.lib puAux.lib fnt.lib js.lib ul.lib zlib.lib pthreadVC2.lib OpenAL32.lib ALut.lib osg.lib osgDB.lib osgUtil.lib"
AdditionalDependencies="glut32.lib wsock32.lib sg.lib net.lib ssg.lib pui.lib puAux.lib fnt.lib js.lib ul.lib zlib.lib pthreadVC2.lib OpenAL32.lib ALut.lib osg.lib osgDB.lib osgUtil.lib libjpeg.lib"
OutputFile=".\Release/fgfs.exe"
LinkIncremental="1"
SuppressStartupBanner="TRUE"
@ -1981,6 +1981,12 @@
<File
RelativePath="..\..\src\Network\joyclient.hxx">
</File>
<File
RelativePath="..\..\src\Network\jpg-httpd.cxx">
</File>
<File
RelativePath="..\..\src\Network\jpg-httpd.hxx">
</File>
<File
RelativePath="..\..\src\Network\jsclient.cxx">
</File>

View file

@ -330,7 +330,7 @@ static osg::ref_ptr<osg::Group> mRoot = new osg::Group;
static osg::ref_ptr<osg::CameraView> mCameraView = new osg::CameraView;
static osg::ref_ptr<osg::CameraNode> mBackGroundCamera = new osg::CameraNode;
static osg::ref_ptr<osg::CameraNode> mSceneCamera = new osg::CameraNode;
osg::ref_ptr<osg::CameraNode> mSceneCamera = new osg::CameraNode;
static osg::ref_ptr<osg::Fog> mFog = new osg::Fog;
static osg::ref_ptr<osg::Fog> mRunwayLightingFog = new osg::Fog;

View file

@ -45,13 +45,13 @@
#include "jpg-httpd.hxx"
//[Leidson<]
#define __MAX_HTTP_BLOCK_SIZE 4096
#define __MAX_STRING_SIZE 2048
#define __TIMEOUT_COUNT 5
#define __HTTP_GET_STRING "GET "
//[Leidson>]
#include <osg/CameraNode>
extern osg::ref_ptr<osg::CameraNode> mSceneCamera;
SG_USING_STD(string);
@ -105,6 +105,10 @@ void HttpdImageChannel :: foundTerminator( void ) {
SG_LOG( SG_IO, SG_DEBUG, "<<<<<<<<< HTTP Request : " << pRequest );
double left, right, bottom, top, zNear, zFar;
mSceneCamera->getProjectionMatrixAsFrustum( left, right, bottom, top, zNear, zFar );
JpgFactory->setFrustum( left, right, bottom, top, zNear, zFar );
nImageLen = JpgFactory -> render();
nBlockSize = ( nImageLen < __MAX_HTTP_BLOCK_SIZE ? nImageLen : __MAX_HTTP_BLOCK_SIZE );