hellcatv
31-01-2008 16:38:21
These bugs took me way too long to track down, so I'd appreciate it if you applied them to CVS to prevent others from having to duplicate my efforts
The first bug only happens under certain compilers...but when PagingLandScapeOctreeCamera casts a OctreeSceneManager to PagingLandScapeOctreeSceneManager on line 120 of OgrePagingLandScapeOctreeCamera.cpp and then uses a member of the wrong class, the whole program crashes. I believe OctreeSceneManager layout changed in Ogre CVS (as compared with the 1-4 branch) either way it's messy code...I've worked around it by making PagingLandScapeCamera inherit directly from OctreeCamera instead of the other
http://graphics.stanford.edu/~danielrh/ ... ngBug.diff
There might be better solutions
Second bug:
in OpenGL shaders are no longer allowed to be placed on terrain.
This is because OgrePagingLandScapeOptions.cpp has been modified to look for DirectX specific support!
bool bIsVSsupported = caps->isShaderProfileSupported("vs_1_1");
is always false
likewise
hasFragmentShader2 = hasFragmentShader && caps->isShaderProfileSupported("vs_2_0");
is also always false--and is buggy to begin with...vs_2_0 is *not* the same as fragment shader 2.0
my recommendations are to change the lines to
bool bIsVSsupported = true;
and eliminating the second check as well.
Ogre's shader fallback mechanisms should take care of the rest...
The first bug only happens under certain compilers...but when PagingLandScapeOctreeCamera casts a OctreeSceneManager to PagingLandScapeOctreeSceneManager on line 120 of OgrePagingLandScapeOctreeCamera.cpp and then uses a member of the wrong class, the whole program crashes. I believe OctreeSceneManager layout changed in Ogre CVS (as compared with the 1-4 branch) either way it's messy code...I've worked around it by making PagingLandScapeCamera inherit directly from OctreeCamera instead of the other
http://graphics.stanford.edu/~danielrh/ ... ngBug.diff
There might be better solutions
Second bug:
in OpenGL shaders are no longer allowed to be placed on terrain.
This is because OgrePagingLandScapeOptions.cpp has been modified to look for DirectX specific support!
bool bIsVSsupported = caps->isShaderProfileSupported("vs_1_1");
is always false
likewise
hasFragmentShader2 = hasFragmentShader && caps->isShaderProfileSupported("vs_2_0");
is also always false--and is buggy to begin with...vs_2_0 is *not* the same as fragment shader 2.0
my recommendations are to change the lines to
bool bIsVSsupported = true;
and eliminating the second check as well.
Ogre's shader fallback mechanisms should take care of the rest...