Merged revisions 2477:2484 from 1.5 branch. Support for range fog under OpenGL. Cleaned up changes.txt.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@2485 dfc29bdd-3216-0410-991c-e03cc46cb475
master
hybrid 2009-07-17 12:08:45 +00:00
parent 40a8a7a259
commit 94fe39af24
5 changed files with 437 additions and 554 deletions

View File

@ -1,4 +1,4 @@
Changes in 1.6
Changes in 1.6 (??.??.2009)
- Added support for EXP2 fog distribution. This required a change in the setFog parameters where now an enum value instead of the bool linear is given.
@ -123,42 +123,16 @@ Changes in 1.6
- Avoid fp-precision problem in getPickedNodeBB (see also http://irrlicht.sourceforge.net/phpBB2/viewtopic.php?t=33838&highlight=).
This change might also fix the problem with picking nodes found by aanderse (http://irrlicht.sourceforge.net/phpBB2/viewtopic.php?t=32890&highlight=)
Changes in 1.6 TA
- implemented isALoadableFileFormat ( File *file ) for the Archive Loader
Changes in 1.6 TA
- PixelBlend16 and PixelBlend16_simd are working for the new rules.
- bugfix. CLightSceneNode didn't correctly update it's attributes
Lighting Linear Attenuation. = 1.f / radius
The Example loadirr files set the lightscene radius to 1000.f but
stays on the previous default attentuation with the older radius 100 -> 1.f / 100
so the examples looks golden-brown.
Now the radius is correctly!! set to the attenuation of 1.f/1000.f because the
file doesn't have special attenuation. and now it looks more yellow.
can anybody show me a correct screenshot for this file;-)? Niko?
Or is this behavior the default lighting?. then it would be
a fixed constant linear attenuation of 0.01f;-). Please clearify
For now i didn't fixed it
I encountered this behavior because i ( burning video ) used the original radius
for calculations and so i've found that radius != 1.f / linearAttenuation but
in the LightSceneNode this formula was used.. confused;-)
- vector template and equals tests
as working with the test suits i cleaned the template behavior (mixed types are
used in the templates) and added all missing special math function with their coressponding type
I also set the equal test for s32 to behave like the f32 routine.
also set the equal test for s32 to behave like the f32 routine.
The function equals always implements a weak test.
that means a tolerance MUST always be used if you use the equal function. default is 1.
you can set it to zero a==b-> equals ( a, b, 0 ) but do it explicit like you have to
for floating compare. This is important when irrlicht is going to use special hardware
math acceleration on a per function base, like sse2, or the other way round fixpoint.
- VideoDriver drawPixel
The HW renderes are using the alpha components for blending.
@ -178,91 +152,71 @@ Changes in 1.6 TA
on sphere and reflection on refletcion_layer.
The visual difference is that on sphere map the "image is not moving" when you rotate the
viewer. For Buring i took the opengl visual. always moving
viewer. For Burning i took the opengl visual. always moving
- rename quake3 SEntity to IEntity to be confom with IShader
even IShader and IEntity are none pure virtual interfaces
like most irrlicht objects
--------------------------------------------------------------
Changes in 1.6 TA
- fixed createMeshWith2TCoords
normals were missing during copy.
- addded
- fixed createMeshWith2TCoords, normals were missing during copy.
- added
//! Creates a copy of the mesh, which will only consist of S3DVertex vertices.
IMesh* CMeshManipulator::createMeshWith1TCoords(IMesh* mesh) const
- added io::IFileSystem* CSceneManager::getFileSystem()
for preparing to remove the (mostly) unnecessary double member variables
in many loaders
- added virtual const c8* ISceneManager::getAnimatorTypeName(ESCENE_NODE_ANIMATOR_TYPE type);
to the SceneManger Interface. just like getTypeName is public
- added CSceneNodeAnimatorFlyCircle::radiusEllipsoid.
if radiusEllipsoid == 0 the default circle animation is done
else radiusEllipsoid forms the b-axe of the ellipsoid.
-> gummiball bouncing
- added ISceneManager::createFlyStraightAnimator variable bool ping-pong
used in loop mode to device if start from beginning ( default ) or make ping-pong
-> straight bouncing
- changed IFileSystem::registerFileArchive
remove the index of the hiarchy and added a new interface method
remove the index of the hierarchy and added a new interface method
//! move the hirarchy of the filesystem. moves sourceIndex relative up or down
virtual bool moveFileArchive( u32 sourceIndex, s32 relative ) = 0;
- bugfix and changes in
SViewFrustum::SViewFrustum
wrong size of Matrices copy. This bug must be ages old... (typo)
detected during resizing the Matrices. removed obsolute Matrices
- bugfix and changes in SViewFrustum::SViewFrustum
wrong size of Matrices copy.
renamed E_TRANSFORMATION_STATE_2 to E_TRANSFORMATION_STATE_FRUSTUM
therefore also changed SViewFrustum::setTransformState to not tap
in the pitfall again of wrong memory...
and renamed it to getTransform, like in the driver
and Matrices private
- OpenGL:
Specular
- moved
//! EMT_ONETEXTURE_BLEND: has BlendFactor Alphablending
inline bool textureBlendFunc_hasAlpha ( E_BLEND_FACTOR factor ) const
from the material renderes ( 3x declared ) to SMaterial.h
- updated managed light example to use standard driver selection
- BurningsVideo
- LightModel reworked.
Point Light & Direction Light works for Diffuse Color as aspected
Point Light & Direction Light works for Diffuse Color as expected
Specular and Fog still have problems ( needs new pixel shader )
pushed burningsvideo to 0.42 for this major step
- removed obsolete matrix transformations
renamed E_TRANSFORMATION_STATE_2 to E_TRANSFORMATION_STATE_BURNING
- cleaned line3d.h vector3d.h template behavior.
many mixed f32/f64 implementations are here. i'm not sure if this should be
the default behavior to use f64 for example for 1.0/x value, because they
benefit from more precisions, but in my point of view the user is responsible
of choosing a vector3d<f32> or vector3d<f64>.
- added core::squareroot to irrmath.h
-> for having candidates for faster math in the same file
- added AllowZWriteOnTransparent from SceneManager to burningsvideo
Following SceneManger guideline
-added hasAlpha() to ITexture
This info can be used for e.q to downgrade a transparent alpha channel blit
to add if the texture has no alpha channel.
--------------------------------------------------------------
Changes in version 1.6, TA
- FileSystem 2.0 SUPER MASTER MAJOR API CHANGE !!!
The FileSystem is now build internally like for e.g. the image- and meshloaders.
@ -317,17 +271,10 @@ Changes in version 1.6, TA
added multiple file random-access support.
solved problems with mixed compressed & uncompressed files in a zip
TODO:
- Big Big Testing!!
- many loaders use their own private filesearching
- there are a lot of helper function ( getAbsolutePath, getFileDir )
which should be adapted to the virtual filesystem
- IrrlichtDevice
added:
virtual bool setGammaRamp( f32 red, f32 green, f32 blue, f32 brightness, f32 contrast ) = 0;
virtual bool getGammaRamp( f32 &red, f32 &green, f32 &blue ) = 0;
and calculating methods to DeviceStub.
implemented in Win32, TODO: other Devices
@ -335,13 +282,9 @@ Changes in version 1.6, TA
changed exported irrlicht.dll routines createDevice, createDeviceEx, IdentityMatrix
to extern "C" name mangling.
for easier dynamically loading the irrlicht library and different versions
- ParticleSystem
removed the private (old?,wrong?) interface from the ParticleEffectors
to match the parent class irr::io::IAttributeExchangingObject::deserializeAttributes
TODO:
please test if the serialization works!
- Generic
- vector3d<T>& normalize() optimized
@ -350,26 +293,28 @@ Changes in version 1.6, TA
- dimension2d
added operator dimension2d<T>& operator=(const dimension2d<U>& other)
to cast between different types
- vector2d bugfix operator+=
- C3DMeshLoader renamed chunks const u16 to a enum
- C3DSMeshLoader renamed chunks const u16 to a enum
removing "variable declared but never used warning"
- added a global const identity Material
changed all references *((video::SMaterial*)0) to point to IdentityMaterial
removed warning: "a NULL reference is not allowed"
- modified IRRLICHT_MATH to not support reciprocal stuff
but to use faster float-to-int conversion.
gcc troubles may they are. i'm using intel-compiler..;-)
- core::matrix4
USE_MATRIX_TEST
i tried to optimize the identity-check ( in means of performance)
i tried to optimize the identity-check ( w.r.t. performance)
i didn't succeed so well, so i made a define for the matrix isIdentity -check
for now it's sometimes faster to always calculate versus identity-check
but if there are a lot of scenenodes/ particles one can profit from the
fast_inverse matrix, when no scaling is used. further approvement could
be done on inverse for just tranlastion! ( many static scenenodes are not rotated,
be done on inverse for just translation! ( many static scenenodes are not rotated,
they are just placed somewhere in the world)
one thing to take in account is that sizeof(matrix) is 64 byte and
with the additional bool/u32 makes it 66 byte which is not really cache-friendly..
@ -379,24 +324,8 @@ Changes in version 1.6, TA
- irr::array. changed allocating routine in push_back
okt, 2008. it's only allowed to alloc one element, if
default constructor has to be called.
removes existing crashes. ( MD3 Mesh ) and possible others ones.
A new list template should be made.
one with constructor/destructor calls ( safe_array ) and
one without. like the array since the beginning of irrlicht.
currently the array/string is extremly slow..
also a hint for the user has to be done, so that a struct T of
array<T> must have a copy constructor of type T ( const T&other ).
i needed hours to track that down...
added a new method setAllocStrategy,
safe ( used + 1 ), double ( used * 2 + 1)
better default strategies will be implemented
- removed binary_search_const
@ -408,6 +337,7 @@ Changes in version 1.6, TA
returns start and end-index
- changed some identity matrix settings to use core::IdentityMatrix
- added deletePathFromFilename to generic string functions in coreutil.h and
removed from CZipReader and CPakReader
@ -419,7 +349,6 @@ Changes in version 1.6, TA
- added verify to string
- added some helper functions
- XBOX
i have access to a XBOX development machine now. I started to compile
for the XBOX. Question: Who did the previous implementation?. There
@ -427,19 +356,20 @@ Changes in version 1.6, TA
Microsoft XDK. I will implement a native or sdl device based on opendk.
irrlicht compiles without errors on the xbox but can't be used.
TODO:
- native XBOX Device
- Windows Mobile
reworked a little. added the mobile example to the windows solution for
cross development.
added maximal 128x128 texture size for windows mobile ( memory issues )
- Collision Speed Up
The Collision Speed Up greatly improves with many small static child-nodes
- added COctTreeTriangleSelector::getTriangles for 3dline from user Piraaate
- modified createOctTreeTriangleSelector and createTriangleSelector
to allow node == 0, to be added to a meta selector
- CSceneNodeAnimatorCollisionResponse has the same problem as CSceneNodeAnimatorFPS
on first update:
Problem. you start setting the map. (setWorld). First update cames 4000 ms later.
@ -459,22 +389,13 @@ Changes in version 1.6, TA
so it's not just a replacement inside the octree. It also in the OctTreeSceneNode.
#define OCTTREE_PARENTTEST is also used. It's skip testing on fully outside and takes everything on fully inside
- virtual void ISceneNode::updateAbsolutePosition()
- changed
inline CMatrix4<T> CMatrix4<T>::operator*(const CMatrix4<T>& m2) const
all two matrices have to be checked by isIdentity()
to let the isIdentity work always
- changed inline CMatrix4<T> CMatrix4<T>::operator*(const CMatrix4<T>& m2) const
- changed inline bool CMatrix4<T>::isIdentity() const
on full identityCheck->
to look first on Translation, because this is the most challenging element
which will likely not to be identity..
- virtual core::matrix4 getRelativeTransformation() const
Hierarchy on Identity-Check
1) ->getRelativeTransform -> 9 floating point checks to be passed as Identity
2) ->isIdentity () -> 16 floating point checks to be passed as Identity
@ -482,7 +403,6 @@ Changes in version 1.6, TA
- inline void CMatrix4<T>::transformBoxEx(core::aabbox3d<f32>& box) const
added isIdentity() check
- changed CSceneNodeAnimatorCollisionResponse
- added CSceneNodeAnimatorCollisionResponse::setGravity
needed to set the differents Forces for the Animator. for eq. water..
@ -499,101 +419,69 @@ Changes in version 1.6, TA
moved radius ( default 1000 ) to constructor
added Normals
added DebugInfo
added Material.ZBuffer, added SceneMaanager
added Material.ZBuffer, added SceneManager
- CVolumeLightSceneNode:
changed default blending OneTextureBlendgl_src_color gl_src_alpha to
EMT_TRANSPARENT_ADD_COLOR ( gl_src_color gl_one )
which gives the same effect on non-transparent-materials.
Following the unspoken guide-line, lowest effect as default
- changed SceneNode Skydome f64 to f32,
- AnimatedMesh
-Debug Data:
- changed SceneNode Skydome from f64 to f32
- AnimatedMesh Debug Data:
mesh normals didn't rotate with the scenenode fixed ( matrix-multiplication order)
- Camera SceneNode setPosition
Camera now finally allow to change position and target and updates all
effected animators..
a call to OnAnimate ( ) lastime < time or OnAnimate ( 0 ) will reset the
camera and fr. the collision animator to a new position
- Device:
added the current mousebutton state to the Mouse Event
so i need to get the current mouse state from the OS
-added to CIrrDeviceWin32
TODO:
- Linux and SDL Device
- GUI
- CGUIFont:
- added virtual void setInvisibleCharacters( const wchar_t *s ) = 0;
define which characters should not be drawn ( send to driver) by the font.
for example " " would not draw any space which is usually blank in most fonts
and saves rendering of ususally full blank alpha-sprites.
This saves a lot of rendering...
default:
setInvisibleCharacters ( L" " );
default: setInvisibleCharacters ( L" " );
- added MultiLine rendering
should avoid to us CStaticText breaking text in future
- CGUIListBox
- changed Scrollbar LargeStepSize to ItemHeight
which easy enables to scroll line by line
- CGUIScrollBar
bug:
Create a Window and inside a listbox with a scrollbar or
a windowed irrlicht application
Click & hold Scrollbar Slider. move outside it's region.
Release Mouse. Go Back to Scrollbar.. it's moving always...
it's generally missing the event PRESSED_MOVED, which
leads to problem when an element is dragging, has a focus, or position loose
and gets focus back again. ( think of a drunken mouse sliding left&right during tracking )
so added the mouse Input Buttonstates on every mouse event
IrrDeviceWin32:
added event.MouseInput.ButtonStates = wParam & ( MK_LBUTTON | MK_RBUTTON | MK_MBUTTON );
TODO:
Linux & SDL
so now i can do this
case irr::EMIE_MOUSE_MOVED:
if ( !event.MouseInput.isLeftPressed () )
{
Dragging = false;
}
- bug:
Scrollbar notifyListBox notify when the scrollbar is clicked.
- bug: event lost when moving outside the window
- bug: Scrollbar notifyListBox notify when the scrollbar is clicked.
- changed timed event in draw to OnPostRender
- added GUI Image List from Reinhard Ostermeier, modified to work
added GUI Tree View from Reinhard Ostermeier, modified to work
shown in the Quake3MapShader Example
TODO: Spritebanks
- FileOpenDialog
changed the static text for the filename to an edit box.
- changed the interface for addEditBox to match with addStaticText
- changed the interface for addSpinBox to match with addEditBox
- added MouseWheel to Spinbox
- changed CGUITable CLICK_AREA from 3 to 12 to enable clicking on the visible marker
- CGUISpritebank
removed some crashes with empty Sprite banks
- IGUIScrollBar
added SetMin before min was always 0
changed ScrollWheel Direction on horizontal to move right on wheel up, left on wheel down
- IComboBox
-added ItemData
- optimized IsVisible check in IGUIElement::draw
- IComboBox: added ItemData
- optimized IsVisible check in IGUIElement::draw
- Image Loaders
- added TGA file type 2 ( grayscale uncompressed )
@ -674,9 +562,11 @@ Changes in version 1.6, TA
- Direct3D8
- added 32 Bit Index Buffer
- compile for XBOX
- Direc3D9
- Direct3D9
- fixed crash on RTT Textures DepthBuffer freed twice.
added deleteAllTextures to destuctor
added deleteAllTextures to destructor
- NullDriver
- removeallTextures. added setMaterial ( SMaterial() ) to clean pointers for freed textures
@ -743,6 +633,8 @@ Changes in version 1.6, TA
-------------------------------------
Changes in version 1.5.1 (??.?? 2009)
- bugfix: CGUIFont::getCharacterFromPos regards now kerning (found by Arras)
- Fix loading of Collada files from irrEdit 1.2
- Update to libpng 1.2.35, fixed issues on 64bit machines with system's libpng.

View File

@ -823,8 +823,8 @@ namespace video
you want per-pixel fog.
\param rangeFog Set this to true to enable range-based vertex
fog. The distance from the viewer is used to compute the fog,
not the z-coordinate. This is better, but slower. This is only
available with D3D and vertex fog. */
not the z-coordinate. This is better, but slower. This might not
be available with all drivers and fog settings. */
virtual void setFog(SColor color=SColor(0,255,255,255),
E_FOG_TYPE fogType=EFT_FOG_LINEAR,
f32 start=50.0f, f32 end=100.0f, f32 density=0.01f,

View File

@ -2721,7 +2721,6 @@ void COpenGLDriver::drawStencilShadowVolume(const core::vector3df* triangles, s3
}
void COpenGLDriver::drawStencilShadow(bool clearStencilBuffer, video::SColor leftUpEdge,
video::SColor rightUpEdge, video::SColor leftDownEdge, video::SColor rightDownEdge)
{
@ -2788,10 +2787,20 @@ void COpenGLDriver::setFog(SColor c, E_FOG_TYPE fogType, f32 start,
CNullDriver::setFog(c, fogType, start, end, density, pixelFog, rangeFog);
glFogf(GL_FOG_MODE, GLfloat((fogType==EFT_FOG_LINEAR)? GL_LINEAR : (fogType==EFT_FOG_EXP)?GL_EXP:GL_EXP2));
#ifdef GL_EXT_fog_coord
if (FeatureAvailable[IRR_EXT_fog_coord])
glFogi(GL_FOG_COORDINATE_SOURCE, GL_FRAGMENT_DEPTH);
#endif
#ifdef GL_NV_fog_distance
if (FeatureAvailable[IRR_NV_fog_distance])
{
if (rangeFog)
glFogi(GL_FOG_DISTANCE_MODE_NV, GL_EYE_RADIAL_NV);
else
glFogi(GL_FOG_DISTANCE_MODE_NV, GL_EYE_PLANE_ABSOLUTE_NV);
}
#endif
if (fogType==EFT_FOG_LINEAR)
{
@ -2812,7 +2821,6 @@ void COpenGLDriver::setFog(SColor c, E_FOG_TYPE fogType, f32 start,
}
//! Draws a 3d line.
void COpenGLDriver::draw3DLine(const core::vector3df& start,
const core::vector3df& end, SColor color)

View File

@ -168,20 +168,6 @@ IAnimatedMesh* CSTLMeshFileLoader::createMesh(io::IReadFile* file)
}
//! Read RGB color
const c8* CSTLMeshFileLoader::readColor(const c8* bufPtr, video::SColor& color, const c8* const pBufEnd) const
{
const u32 COLOR_BUFFER_LENGTH = 16;
c8 colStr[COLOR_BUFFER_LENGTH];
color.setAlpha(255);
color.setRed((s32)(core::fast_atof(colStr) * 255.0f));
color.setGreen((s32)(core::fast_atof(colStr) * 255.0f));
color.setBlue((s32)(core::fast_atof(colStr) * 255.0f));
return bufPtr;
}
//! Read 3d vector of floats
void CSTLMeshFileLoader::getNextVector(io::IReadFile* file, core::vector3df& vec, bool binary) const
{

View File

@ -7,7 +7,6 @@
#include "IMeshLoader.h"
#include "irrString.h"
#include "SColor.h"
#include "vector3d.h"
namespace irr
@ -39,8 +38,6 @@ private:
// skip to next printable character after the first line break
void goNextLine(io::IReadFile* file) const;
//! Read RGB color
const c8* readColor(const c8* pBufPtr, video::SColor& color, const c8* const pBufEnd) const;
//! Read 3d vector of floats
void getNextVector(io::IReadFile* file, core::vector3df& vec, bool binary) const;
};