Merging r5843 through r5862 from trunk to ogl-es branch

Adapting both GLES drivers to new addHighLevelShaderMaterial interfaces.


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/branches/ogl-es@5890 dfc29bdd-3216-0410-991c-e03cc46cb475
master
cutealien 2019-10-17 14:21:01 +00:00 committed by MoNTE48
parent 4d9c660504
commit c9f5503436
118 changed files with 1140 additions and 720 deletions

View File

@ -313,21 +313,17 @@ int main()
if (UseHighLevelShaders)
{
// Choose the desired shader type. Default is the native
// shader type for the driver
const video::E_GPU_SHADING_LANGUAGE shadingLanguage = video::EGSL_DEFAULT;
// create material from high level shaders (hlsl, glsl)
newMaterialType1 = gpu->addHighLevelShaderMaterialFromFiles(
vsFileName, "vertexMain", video::EVST_VS_1_1,
psFileName, "pixelMain", video::EPST_PS_1_1,
mcSolid, video::EMT_SOLID, 0, shadingLanguage);
mcSolid, video::EMT_SOLID, 0);
newMaterialType2 = gpu->addHighLevelShaderMaterialFromFiles(
vsFileName, "vertexMain", video::EVST_VS_1_1,
psFileName, "pixelMain", video::EPST_PS_1_1,
mcTransparentAdd, video::EMT_TRANSPARENT_ADD_COLOR, 0 , shadingLanguage);
mcTransparentAdd, video::EMT_TRANSPARENT_ADD_COLOR, 0);
}
else
{

View File

@ -35,17 +35,17 @@ namespace scene
IndexBuffer->drop();
}
virtual IVertexBuffer& getVertexBuffer() const
virtual IVertexBuffer& getVertexBuffer() const _IRR_OVERRIDE_
{
return *VertexBuffer;
}
virtual IIndexBuffer& getIndexBuffer() const
virtual IIndexBuffer& getIndexBuffer() const _IRR_OVERRIDE_
{
return *IndexBuffer;
}
virtual void setVertexBuffer(IVertexBuffer *newVertexBuffer)
virtual void setVertexBuffer(IVertexBuffer *newVertexBuffer) _IRR_OVERRIDE_
{
if (newVertexBuffer)
newVertexBuffer->grab();
@ -55,7 +55,7 @@ namespace scene
VertexBuffer=newVertexBuffer;
}
virtual void setIndexBuffer(IIndexBuffer *newIndexBuffer)
virtual void setIndexBuffer(IIndexBuffer *newIndexBuffer) _IRR_OVERRIDE_
{
if (newIndexBuffer)
newIndexBuffer->grab();
@ -66,31 +66,31 @@ namespace scene
}
//! Get Material of this buffer.
virtual const video::SMaterial& getMaterial() const
virtual const video::SMaterial& getMaterial() const _IRR_OVERRIDE_
{
return Material;
}
//! Get Material of this buffer.
virtual video::SMaterial& getMaterial()
virtual video::SMaterial& getMaterial() _IRR_OVERRIDE_
{
return Material;
}
//! Get bounding box
virtual const core::aabbox3d<f32>& getBoundingBox() const
virtual const core::aabbox3d<f32>& getBoundingBox() const _IRR_OVERRIDE_
{
return BoundingBox;
}
//! Set bounding box
virtual void setBoundingBox( const core::aabbox3df& box)
virtual void setBoundingBox( const core::aabbox3df& box) _IRR_OVERRIDE_
{
BoundingBox = box;
}
//! Recalculate bounding box
virtual void recalculateBoundingBox()
virtual void recalculateBoundingBox() _IRR_OVERRIDE_
{
if (!getVertexBuffer().size())
BoundingBox.reset(0,0,0);
@ -103,13 +103,13 @@ namespace scene
}
//! Describe what kind of primitive geometry is used by the meshbuffer
virtual void setPrimitiveType(E_PRIMITIVE_TYPE type)
virtual void setPrimitiveType(E_PRIMITIVE_TYPE type) _IRR_OVERRIDE_
{
PrimitiveType = type;
}
//! Get the kind of primitive geometry which is used by the meshbuffer
virtual E_PRIMITIVE_TYPE getPrimitiveType() const
virtual E_PRIMITIVE_TYPE getPrimitiveType() const _IRR_OVERRIDE_
{
return PrimitiveType;
}

View File

@ -39,46 +39,46 @@ namespace scene
public:
core::array<T> Indices;
virtual u32 stride() const {return sizeof(T);}
virtual u32 stride() const _IRR_OVERRIDE_ {return sizeof(T);}
virtual u32 size() const {return Indices.size();}
virtual u32 size() const _IRR_OVERRIDE_ {return Indices.size();}
virtual void push_back(const u32 &element)
virtual void push_back(const u32 &element) _IRR_OVERRIDE_
{
// push const ref due to compiler problem with gcc 4.6, big endian
Indices.push_back((const T&)element);
}
virtual u32 operator [](u32 index) const
virtual u32 operator [](u32 index) const _IRR_OVERRIDE_
{
return (u32)(Indices[index]);
}
virtual u32 getLast() {return (u32)Indices.getLast();}
virtual u32 getLast() _IRR_OVERRIDE_ {return (u32)Indices.getLast();}
virtual void setValue(u32 index, u32 value)
virtual void setValue(u32 index, u32 value) _IRR_OVERRIDE_
{
Indices[index]=(T)value;
}
virtual void set_used(u32 usedNow)
virtual void set_used(u32 usedNow) _IRR_OVERRIDE_
{
Indices.set_used(usedNow);
}
virtual void reallocate(u32 new_size)
virtual void reallocate(u32 new_size) _IRR_OVERRIDE_
{
Indices.reallocate(new_size);
}
virtual u32 allocated_size() const
virtual u32 allocated_size() const _IRR_OVERRIDE_
{
return Indices.allocated_size();
}
virtual void* pointer() {return Indices.pointer();}
virtual void* pointer() _IRR_OVERRIDE_ {return Indices.pointer();}
virtual video::E_INDEX_TYPE getType() const
virtual video::E_INDEX_TYPE getType() const _IRR_OVERRIDE_
{
if (sizeof(T)==sizeof(u16))
return video::EIT_16BIT;
@ -110,7 +110,7 @@ namespace scene
}
//virtual void setType(video::E_INDEX_TYPE IndexType);
virtual void setType(video::E_INDEX_TYPE IndexType)
virtual void setType(video::E_INDEX_TYPE IndexType) _IRR_OVERRIDE_
{
IIndexList *NewIndices=0;
@ -141,78 +141,78 @@ namespace scene
Indices=NewIndices;
}
virtual void* getData() {return Indices->pointer();}
virtual void* getData() _IRR_OVERRIDE_ {return Indices->pointer();}
virtual video::E_INDEX_TYPE getType() const {return Indices->getType();}
virtual video::E_INDEX_TYPE getType() const _IRR_OVERRIDE_ {return Indices->getType();}
virtual u32 stride() const {return Indices->stride();}
virtual u32 stride() const _IRR_OVERRIDE_ {return Indices->stride();}
virtual u32 size() const
virtual u32 size() const _IRR_OVERRIDE_
{
return Indices->size();
}
virtual void push_back(const u32 &element)
virtual void push_back(const u32 &element) _IRR_OVERRIDE_
{
Indices->push_back(element);
}
virtual u32 operator [](u32 index) const
virtual u32 operator [](u32 index) const _IRR_OVERRIDE_
{
return (*Indices)[index];
}
virtual u32 getLast()
virtual u32 getLast() _IRR_OVERRIDE_
{
return Indices->getLast();
}
virtual void setValue(u32 index, u32 value)
virtual void setValue(u32 index, u32 value) _IRR_OVERRIDE_
{
Indices->setValue(index, value);
}
virtual void set_used(u32 usedNow)
virtual void set_used(u32 usedNow) _IRR_OVERRIDE_
{
Indices->set_used(usedNow);
}
virtual void reallocate(u32 new_size)
virtual void reallocate(u32 new_size) _IRR_OVERRIDE_
{
Indices->reallocate(new_size);
}
virtual u32 allocated_size() const
virtual u32 allocated_size() const _IRR_OVERRIDE_
{
return Indices->allocated_size();
}
virtual void* pointer()
virtual void* pointer() _IRR_OVERRIDE_
{
return Indices->pointer();
}
//! get the current hardware mapping hint
virtual E_HARDWARE_MAPPING getHardwareMappingHint() const
virtual E_HARDWARE_MAPPING getHardwareMappingHint() const _IRR_OVERRIDE_
{
return MappingHint;
}
//! set the hardware mapping hint, for driver
virtual void setHardwareMappingHint( E_HARDWARE_MAPPING NewMappingHint )
virtual void setHardwareMappingHint( E_HARDWARE_MAPPING NewMappingHint ) _IRR_OVERRIDE_
{
MappingHint=NewMappingHint;
}
//! flags the mesh as changed, reloads hardware buffers
virtual void setDirty()
virtual void setDirty() _IRR_OVERRIDE_
{
++ChangedID;
}
//! Get the currently used ID for identification of changes.
/** This shouldn't be used for anything outside the VideoDriver. */
virtual u32 getChangedID() const {return ChangedID;}
virtual u32 getChangedID() const _IRR_OVERRIDE_ {return ChangedID;}
E_HARDWARE_MAPPING MappingHint;
u32 ChangedID;

View File

@ -31,7 +31,7 @@ namespace scene
//! Get material of this meshbuffer
/** \return Material of this buffer */
virtual const video::SMaterial& getMaterial() const
virtual const video::SMaterial& getMaterial() const _IRR_OVERRIDE_
{
return Material;
}
@ -39,7 +39,7 @@ namespace scene
//! Get material of this meshbuffer
/** \return Material of this buffer */
virtual video::SMaterial& getMaterial()
virtual video::SMaterial& getMaterial() _IRR_OVERRIDE_
{
return Material;
}
@ -47,7 +47,7 @@ namespace scene
//! Get pointer to vertices
/** \return Pointer to vertices. */
virtual const void* getVertices() const
virtual const void* getVertices() const _IRR_OVERRIDE_
{
return Vertices.const_pointer();
}
@ -55,7 +55,7 @@ namespace scene
//! Get pointer to vertices
/** \return Pointer to vertices. */
virtual void* getVertices()
virtual void* getVertices() _IRR_OVERRIDE_
{
return Vertices.pointer();
}
@ -63,21 +63,21 @@ namespace scene
//! Get number of vertices
/** \return Number of vertices. */
virtual u32 getVertexCount() const
virtual u32 getVertexCount() const _IRR_OVERRIDE_
{
return Vertices.size();
}
//! Get type of index data which is stored in this meshbuffer.
/** \return Index type of this buffer. */
virtual video::E_INDEX_TYPE getIndexType() const
virtual video::E_INDEX_TYPE getIndexType() const _IRR_OVERRIDE_
{
return video::EIT_16BIT;
}
//! Get pointer to indices
/** \return Pointer to indices. */
virtual const u16* getIndices() const
virtual const u16* getIndices() const _IRR_OVERRIDE_
{
return Indices.const_pointer();
}
@ -85,7 +85,7 @@ namespace scene
//! Get pointer to indices
/** \return Pointer to indices. */
virtual u16* getIndices()
virtual u16* getIndices() _IRR_OVERRIDE_
{
return Indices.pointer();
}
@ -93,7 +93,7 @@ namespace scene
//! Get number of indices
/** \return Number of indices. */
virtual u32 getIndexCount() const
virtual u32 getIndexCount() const _IRR_OVERRIDE_
{
return Indices.size();
}
@ -101,7 +101,7 @@ namespace scene
//! Get the axis aligned bounding box
/** \return Axis aligned bounding box of this buffer. */
virtual const core::aabbox3d<f32>& getBoundingBox() const
virtual const core::aabbox3d<f32>& getBoundingBox() const _IRR_OVERRIDE_
{
return BoundingBox;
}
@ -110,7 +110,7 @@ namespace scene
//! Set the axis aligned bounding box
/** \param box New axis aligned bounding box for this buffer. */
//! set user axis aligned bounding box
virtual void setBoundingBox(const core::aabbox3df& box)
virtual void setBoundingBox(const core::aabbox3df& box) _IRR_OVERRIDE_
{
BoundingBox = box;
}
@ -118,7 +118,7 @@ namespace scene
//! Recalculate the bounding box.
/** should be called if the mesh changed. */
virtual void recalculateBoundingBox()
virtual void recalculateBoundingBox() _IRR_OVERRIDE_
{
if (!Vertices.empty())
{
@ -135,43 +135,43 @@ namespace scene
//! Get type of vertex data stored in this buffer.
/** \return Type of vertex data. */
virtual video::E_VERTEX_TYPE getVertexType() const
virtual video::E_VERTEX_TYPE getVertexType() const _IRR_OVERRIDE_
{
return T().getType();
return T::getType();
}
//! returns position of vertex i
virtual const core::vector3df& getPosition(u32 i) const
virtual const core::vector3df& getPosition(u32 i) const _IRR_OVERRIDE_
{
return Vertices[i].Pos;
}
//! returns position of vertex i
virtual core::vector3df& getPosition(u32 i)
virtual core::vector3df& getPosition(u32 i) _IRR_OVERRIDE_
{
return Vertices[i].Pos;
}
//! returns normal of vertex i
virtual const core::vector3df& getNormal(u32 i) const
virtual const core::vector3df& getNormal(u32 i) const _IRR_OVERRIDE_
{
return Vertices[i].Normal;
}
//! returns normal of vertex i
virtual core::vector3df& getNormal(u32 i)
virtual core::vector3df& getNormal(u32 i) _IRR_OVERRIDE_
{
return Vertices[i].Normal;
}
//! returns texture coord of vertex i
virtual const core::vector2df& getTCoords(u32 i) const
virtual const core::vector2df& getTCoords(u32 i) const _IRR_OVERRIDE_
{
return Vertices[i].TCoords;
}
//! returns texture coord of vertex i
virtual core::vector2df& getTCoords(u32 i)
virtual core::vector2df& getTCoords(u32 i) _IRR_OVERRIDE_
{
return Vertices[i].TCoords;
}
@ -182,7 +182,7 @@ namespace scene
or the main buffer is of standard type. Otherwise, behavior is
undefined.
*/
virtual void append(const void* const vertices, u32 numVertices, const u16* const indices, u32 numIndices)
virtual void append(const void* const vertices, u32 numVertices, const u16* const indices, u32 numIndices) _IRR_OVERRIDE_
{
if (vertices == getVertices())
return;
@ -211,7 +211,7 @@ namespace scene
undefined.
\param other Meshbuffer to be appended to this one.
*/
virtual void append(const IMeshBuffer* const other)
virtual void append(const IMeshBuffer* const other) _IRR_OVERRIDE_
{
/*
if (this==other)
@ -237,19 +237,19 @@ namespace scene
//! get the current hardware mapping hint
virtual E_HARDWARE_MAPPING getHardwareMappingHint_Vertex() const
virtual E_HARDWARE_MAPPING getHardwareMappingHint_Vertex() const _IRR_OVERRIDE_
{
return MappingHint_Vertex;
}
//! get the current hardware mapping hint
virtual E_HARDWARE_MAPPING getHardwareMappingHint_Index() const
virtual E_HARDWARE_MAPPING getHardwareMappingHint_Index() const _IRR_OVERRIDE_
{
return MappingHint_Index;
}
//! set the hardware mapping hint, for driver
virtual void setHardwareMappingHint( E_HARDWARE_MAPPING NewMappingHint, E_BUFFER_TYPE Buffer=EBT_VERTEX_AND_INDEX )
virtual void setHardwareMappingHint( E_HARDWARE_MAPPING NewMappingHint, E_BUFFER_TYPE Buffer=EBT_VERTEX_AND_INDEX ) _IRR_OVERRIDE_
{
if (Buffer==EBT_VERTEX_AND_INDEX || Buffer==EBT_VERTEX)
MappingHint_Vertex=NewMappingHint;
@ -258,19 +258,19 @@ namespace scene
}
//! Describe what kind of primitive geometry is used by the meshbuffer
virtual void setPrimitiveType(E_PRIMITIVE_TYPE type)
virtual void setPrimitiveType(E_PRIMITIVE_TYPE type) _IRR_OVERRIDE_
{
PrimitiveType = type;
}
//! Get the kind of primitive geometry which is used by the meshbuffer
virtual E_PRIMITIVE_TYPE getPrimitiveType() const
virtual E_PRIMITIVE_TYPE getPrimitiveType() const _IRR_OVERRIDE_
{
return PrimitiveType;
}
//! flags the mesh as changed, reloads hardware buffers
virtual void setDirty(E_BUFFER_TYPE Buffer=EBT_VERTEX_AND_INDEX)
virtual void setDirty(E_BUFFER_TYPE Buffer=EBT_VERTEX_AND_INDEX) _IRR_OVERRIDE_
{
if (Buffer==EBT_VERTEX_AND_INDEX ||Buffer==EBT_VERTEX)
++ChangedID_Vertex;
@ -280,11 +280,11 @@ namespace scene
//! Get the currently used ID for identification of changes.
/** This shouldn't be used for anything outside the VideoDriver. */
virtual u32 getChangedID_Vertex() const {return ChangedID_Vertex;}
virtual u32 getChangedID_Vertex() const _IRR_OVERRIDE_ {return ChangedID_Vertex;}
//! Get the currently used ID for identification of changes.
/** This shouldn't be used for anything outside the VideoDriver. */
virtual u32 getChangedID_Index() const {return ChangedID_Index;}
virtual u32 getChangedID_Index() const _IRR_OVERRIDE_ {return ChangedID_Index;}
u32 ChangedID_Vertex;
u32 ChangedID_Index;

View File

@ -40,33 +40,33 @@ namespace scene
public:
core::array<T> Vertices;
virtual u32 stride() const {return sizeof(T);}
virtual u32 stride() const _IRR_OVERRIDE_ {return sizeof(T);}
virtual u32 size() const {return Vertices.size();}
virtual u32 size() const _IRR_OVERRIDE_ {return Vertices.size();}
virtual void push_back (const video::S3DVertex &element)
virtual void push_back (const video::S3DVertex &element) _IRR_OVERRIDE_
{Vertices.push_back((T&)element);}
virtual video::S3DVertex& operator [](const u32 index) const
virtual video::S3DVertex& operator [](const u32 index) const _IRR_OVERRIDE_
{return (video::S3DVertex&)Vertices[index];}
virtual video::S3DVertex& getLast()
virtual video::S3DVertex& getLast() _IRR_OVERRIDE_
{return (video::S3DVertex&)Vertices.getLast();}
virtual void set_used(u32 usedNow)
virtual void set_used(u32 usedNow) _IRR_OVERRIDE_
{Vertices.set_used(usedNow);}
virtual void reallocate(u32 new_size)
virtual void reallocate(u32 new_size) _IRR_OVERRIDE_
{Vertices.reallocate(new_size);}
virtual u32 allocated_size() const
virtual u32 allocated_size() const _IRR_OVERRIDE_
{
return Vertices.allocated_size();
}
virtual video::S3DVertex* pointer() {return Vertices.pointer();}
virtual video::S3DVertex* pointer() _IRR_OVERRIDE_ {return Vertices.pointer();}
virtual video::E_VERTEX_TYPE getType() const {return T().getType();}
virtual video::E_VERTEX_TYPE getType() const _IRR_OVERRIDE_ {return T::getType();}
};
public:
@ -95,7 +95,7 @@ namespace scene
}
virtual void setType(video::E_VERTEX_TYPE vertexType)
virtual void setType(video::E_VERTEX_TYPE vertexType) _IRR_OVERRIDE_
{
IVertexList *NewVertices=0;
@ -130,73 +130,73 @@ namespace scene
Vertices=NewVertices;
}
virtual void* getData() {return Vertices->pointer();}
virtual void* getData() _IRR_OVERRIDE_ {return Vertices->pointer();}
virtual video::E_VERTEX_TYPE getType() const {return Vertices->getType();}
virtual video::E_VERTEX_TYPE getType() const _IRR_OVERRIDE_ {return Vertices->getType();}
virtual u32 stride() const {return Vertices->stride();}
virtual u32 stride() const _IRR_OVERRIDE_ {return Vertices->stride();}
virtual u32 size() const
virtual u32 size() const _IRR_OVERRIDE_
{
return Vertices->size();
}
virtual void push_back (const video::S3DVertex &element)
virtual void push_back (const video::S3DVertex &element) _IRR_OVERRIDE_
{
Vertices->push_back(element);
}
virtual video::S3DVertex& operator [](const u32 index) const
virtual video::S3DVertex& operator [](const u32 index) const _IRR_OVERRIDE_
{
return (*Vertices)[index];
}
virtual video::S3DVertex& getLast()
virtual video::S3DVertex& getLast() _IRR_OVERRIDE_
{
return Vertices->getLast();
}
virtual void set_used(u32 usedNow)
virtual void set_used(u32 usedNow) _IRR_OVERRIDE_
{
Vertices->set_used(usedNow);
}
virtual void reallocate(u32 new_size)
virtual void reallocate(u32 new_size) _IRR_OVERRIDE_
{
Vertices->reallocate(new_size);
}
virtual u32 allocated_size() const
virtual u32 allocated_size() const _IRR_OVERRIDE_
{
return Vertices->allocated_size();
}
virtual video::S3DVertex* pointer()
virtual video::S3DVertex* pointer() _IRR_OVERRIDE_
{
return Vertices->pointer();
}
//! get the current hardware mapping hint
virtual E_HARDWARE_MAPPING getHardwareMappingHint() const
virtual E_HARDWARE_MAPPING getHardwareMappingHint() const _IRR_OVERRIDE_
{
return MappingHint;
}
//! set the hardware mapping hint, for driver
virtual void setHardwareMappingHint( E_HARDWARE_MAPPING NewMappingHint )
virtual void setHardwareMappingHint( E_HARDWARE_MAPPING NewMappingHint ) _IRR_OVERRIDE_
{
MappingHint=NewMappingHint;
}
//! flags the mesh as changed, reloads hardware buffers
virtual void setDirty()
virtual void setDirty() _IRR_OVERRIDE_
{
++ChangedID;
}
//! Get the currently used ID for identification of changes.
/** This shouldn't be used for anything outside the VideoDriver. */
virtual u32 getChangedID() const {return ChangedID;}
virtual u32 getChangedID() const _IRR_OVERRIDE_ {return ChangedID;}
E_HARDWARE_MAPPING MappingHint;
u32 ChangedID;

View File

@ -61,7 +61,7 @@ namespace scene
if getMeshType() returns EAMT_MD2 it's safe to cast the
IAnimatedMesh to IAnimatedMeshMD2.
\returns Type of the mesh. */
virtual E_ANIMATED_MESH_TYPE getMeshType() const
virtual E_ANIMATED_MESH_TYPE getMeshType() const _IRR_OVERRIDE_
{
return EAMT_UNKNOWN;
}

View File

@ -84,7 +84,7 @@ namespace scene
//! The render method.
/** Does nothing as bones are not visible. */
virtual void render() { }
virtual void render() _IRR_OVERRIDE_ { }
//! How the relative transformation of the bone is used
virtual void setSkinningSpace( E_BONE_SKINNING_SPACE space ) =0;

View File

@ -171,7 +171,7 @@ namespace scene
virtual bool getTargetAndRotationBinding(void) const =0;
//! Writes attributes of the camera node
virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0) const
virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0) const _IRR_OVERRIDE_
{
ISceneNode::serializeAttributes(out, options);
@ -181,7 +181,7 @@ namespace scene
}
//! Reads attributes of the camera node
virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0)
virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0) _IRR_OVERRIDE_
{
ISceneNode::deserializeAttributes(in, options);
if (!in)
@ -193,7 +193,7 @@ namespace scene
protected:
void cloneMembers(ICameraSceneNode* toCopyFrom)
void cloneMembers(const ICameraSceneNode* toCopyFrom)
{
IsOrthogonal = toCopyFrom->IsOrthogonal;
}

View File

@ -50,7 +50,7 @@ namespace scene
\param numVertices Number of vertices in the array.
\param indices Pointer to index array.
\param numIndices Number of indices in array. */
virtual void append(const void* const vertices, u32 numVertices, const u16* const indices, u32 numIndices)
virtual void append(const void* const vertices, u32 numVertices, const u16* const indices, u32 numIndices) _IRR_OVERRIDE_
{
}
@ -58,7 +58,7 @@ namespace scene
//! Append the meshbuffer to the current buffer
/** Only works for compatible vertex types
\param other Buffer to append to this one. */
virtual void append(const IMeshBuffer* const other)
virtual void append(const IMeshBuffer* const other) _IRR_OVERRIDE_
{
}
@ -66,19 +66,19 @@ namespace scene
// ------------------- To be removed? ------------------- //
//! get the current hardware mapping hint
virtual E_HARDWARE_MAPPING getHardwareMappingHint_Vertex() const
virtual E_HARDWARE_MAPPING getHardwareMappingHint_Vertex() const _IRR_OVERRIDE_
{
return getVertexBuffer().getHardwareMappingHint();
}
//! get the current hardware mapping hint
virtual E_HARDWARE_MAPPING getHardwareMappingHint_Index() const
virtual E_HARDWARE_MAPPING getHardwareMappingHint_Index() const _IRR_OVERRIDE_
{
return getIndexBuffer().getHardwareMappingHint();
}
//! set the hardware mapping hint, for driver
virtual void setHardwareMappingHint( E_HARDWARE_MAPPING NewMappingHint, E_BUFFER_TYPE Buffer=EBT_VERTEX_AND_INDEX )
virtual void setHardwareMappingHint( E_HARDWARE_MAPPING NewMappingHint, E_BUFFER_TYPE Buffer=EBT_VERTEX_AND_INDEX ) _IRR_OVERRIDE_
{
if (Buffer==EBT_VERTEX_AND_INDEX || Buffer==EBT_VERTEX)
getVertexBuffer().setHardwareMappingHint(NewMappingHint);
@ -87,7 +87,7 @@ namespace scene
}
//! flags the mesh as changed, reloads hardware buffers
virtual void setDirty(E_BUFFER_TYPE Buffer=EBT_VERTEX_AND_INDEX)
virtual void setDirty(E_BUFFER_TYPE Buffer=EBT_VERTEX_AND_INDEX) _IRR_OVERRIDE_
{
if (Buffer==EBT_VERTEX_AND_INDEX || Buffer==EBT_VERTEX)
getVertexBuffer().setDirty();
@ -95,12 +95,12 @@ namespace scene
getIndexBuffer().setDirty();
}
virtual u32 getChangedID_Vertex() const
virtual u32 getChangedID_Vertex() const _IRR_OVERRIDE_
{
return getVertexBuffer().getChangedID();
}
virtual u32 getChangedID_Index() const
virtual u32 getChangedID_Index() const _IRR_OVERRIDE_
{
return getIndexBuffer().getChangedID();
}
@ -109,7 +109,7 @@ namespace scene
//! Get type of vertex data which is stored in this meshbuffer.
/** \return Vertex type of this buffer. */
virtual video::E_VERTEX_TYPE getVertexType() const
virtual video::E_VERTEX_TYPE getVertexType() const _IRR_OVERRIDE_
{
return getVertexBuffer().getType();
}
@ -117,7 +117,7 @@ namespace scene
//! Get access to vertex data. The data is an array of vertices.
/** Which vertex type is used can be determined by getVertexType().
\return Pointer to array of vertices. */
virtual const void* getVertices() const
virtual const void* getVertices() const _IRR_OVERRIDE_
{
return getVertexBuffer().getData();
}
@ -125,78 +125,78 @@ namespace scene
//! Get access to vertex data. The data is an array of vertices.
/** Which vertex type is used can be determined by getVertexType().
\return Pointer to array of vertices. */
virtual void* getVertices()
virtual void* getVertices() _IRR_OVERRIDE_
{
return getVertexBuffer().getData();
}
//! Get amount of vertices in meshbuffer.
/** \return Number of vertices in this buffer. */
virtual u32 getVertexCount() const
virtual u32 getVertexCount() const _IRR_OVERRIDE_
{
return getVertexBuffer().size();
}
//! Get type of index data which is stored in this meshbuffer.
/** \return Index type of this buffer. */
virtual video::E_INDEX_TYPE getIndexType() const
virtual video::E_INDEX_TYPE getIndexType() const _IRR_OVERRIDE_
{
return getIndexBuffer().getType();
}
//! Get access to indices.
/** \return Pointer to indices array. */
virtual const u16* getIndices() const
virtual const u16* getIndices() const _IRR_OVERRIDE_
{
return (u16*)getIndexBuffer().getData();
}
//! Get access to indices.
/** \return Pointer to indices array. */
virtual u16* getIndices()
virtual u16* getIndices() _IRR_OVERRIDE_
{
return (u16*)getIndexBuffer().getData();
}
//! Get amount of indices in this meshbuffer.
/** \return Number of indices in this buffer. */
virtual u32 getIndexCount() const
{
virtual u32 getIndexCount() const _IRR_OVERRIDE_
{
return getIndexBuffer().size();
}
//! returns position of vertex i
virtual const core::vector3df& getPosition(u32 i) const
virtual const core::vector3df& getPosition(u32 i) const _IRR_OVERRIDE_
{
return getVertexBuffer()[i].Pos;
}
//! returns position of vertex i
virtual core::vector3df& getPosition(u32 i)
virtual core::vector3df& getPosition(u32 i) _IRR_OVERRIDE_
{
return getVertexBuffer()[i].Pos;
}
//! returns texture coords of vertex i
virtual const core::vector2df& getTCoords(u32 i) const
virtual const core::vector2df& getTCoords(u32 i) const _IRR_OVERRIDE_
{
return getVertexBuffer()[i].TCoords;
}
//! returns texture coords of vertex i
virtual core::vector2df& getTCoords(u32 i)
virtual core::vector2df& getTCoords(u32 i) _IRR_OVERRIDE_
{
return getVertexBuffer()[i].TCoords;
}
//! returns normal of vertex i
virtual const core::vector3df& getNormal(u32 i) const
virtual const core::vector3df& getNormal(u32 i) const _IRR_OVERRIDE_
{
return getVertexBuffer()[i].Normal;
}
//! returns normal of vertex i
virtual core::vector3df& getNormal(u32 i)
virtual core::vector3df& getNormal(u32 i) _IRR_OVERRIDE_
{
return getVertexBuffer()[i].Normal;
}

View File

@ -24,16 +24,6 @@ namespace video
class IVideoDriver;
class IShaderConstantSetCallBack;
//! Enumeration for different types of shading languages
enum E_GPU_SHADING_LANGUAGE
{
//! The default language, so HLSL for Direct3D and GLSL for OpenGL.
EGSL_DEFAULT = 0,
//! Cg shading language.*/
EGSL_CG
};
//! Interface making it possible to create and use programs running on the GPU.
class IGPUProgrammingServices
{
@ -78,7 +68,6 @@ public:
OnSetConstants(). In this way it is easily possible to use the same
callback method for multiple materials and distinguish between them
during the call.
\param shaderLang a type of shading language used in current shader.
\return Number of the material type which can be set in
SMaterial::MaterialType to use the renderer. -1 is returned if an error
occurred, e.g. if a shader program could not be compiled or a compile
@ -99,8 +88,7 @@ public:
u32 verticesOut = 0,
IShaderConstantSetCallBack* callback = 0,
E_MATERIAL_TYPE baseMaterial = video::EMT_SOLID,
s32 userData = 0,
E_GPU_SHADING_LANGUAGE shadingLang = EGSL_DEFAULT) = 0;
s32 userData = 0) = 0;
//! convenience function for use without geometry shaders
s32 addHighLevelShaderMaterial(
@ -112,8 +100,7 @@ public:
E_PIXEL_SHADER_TYPE psCompileTarget=EPST_PS_1_1,
IShaderConstantSetCallBack* callback=0,
E_MATERIAL_TYPE baseMaterial=video::EMT_SOLID,
s32 userData=0,
E_GPU_SHADING_LANGUAGE shadingLang=EGSL_DEFAULT)
s32 userData=0)
{
return addHighLevelShaderMaterial(
vertexShaderProgram, vertexShaderEntryPointName,
@ -121,7 +108,7 @@ public:
pixelShaderEntryPointName, psCompileTarget,
0, "main", EGST_GS_4_0,
scene::EPT_TRIANGLES, scene::EPT_TRIANGLE_STRIP, 0,
callback, baseMaterial, userData, shadingLang);
callback, baseMaterial, userData);
}
//! convenience function for use with many defaults, without geometry shader
@ -205,7 +192,6 @@ public:
OnSetConstants(). In this way it is easily possible to use the same
callback method for multiple materials and distinguish between them
during the call.
\param shaderLang a type of shading language used in current shader.
\return Number of the material type which can be set in
SMaterial::MaterialType to use the renderer. -1 is returned if an error
occurred, e.g. if a shader program could not be compiled or a compile
@ -226,8 +212,7 @@ public:
u32 verticesOut = 0,
IShaderConstantSetCallBack* callback = 0,
E_MATERIAL_TYPE baseMaterial = video::EMT_SOLID,
s32 userData = 0,
E_GPU_SHADING_LANGUAGE shadingLang = EGSL_DEFAULT) = 0;
s32 userData = 0) = 0;
//! convenience function for use without geometry shaders
s32 addHighLevelShaderMaterialFromFiles(
@ -239,8 +224,7 @@ public:
E_PIXEL_SHADER_TYPE psCompileTarget = EPST_PS_1_1,
IShaderConstantSetCallBack* callback = 0,
E_MATERIAL_TYPE baseMaterial = video::EMT_SOLID,
s32 userData = 0,
E_GPU_SHADING_LANGUAGE shadingLang = EGSL_DEFAULT)
s32 userData = 0)
{
return addHighLevelShaderMaterialFromFiles(
vertexShaderProgramFileName, vertexShaderEntryPointName,
@ -248,7 +232,7 @@ public:
pixelShaderEntryPointName, psCompileTarget,
"", "main", EGST_GS_4_0,
scene::EPT_TRIANGLES, scene::EPT_TRIANGLE_STRIP, 0,
callback, baseMaterial, userData, shadingLang);
callback, baseMaterial, userData);
}
//! convenience function for use with many defaults, without geometry shader
@ -330,7 +314,6 @@ public:
OnSetConstants(). In this way it is easily possible to use the same
callback method for multiple materials and distinguish between them
during the call.
\param shaderLang a type of shading language used in current shader.
\return Number of the material type which can be set in
SMaterial::MaterialType to use the renderer. -1 is returned if an
error occurred, e.g. if a shader program could not be compiled or a
@ -351,8 +334,7 @@ public:
u32 verticesOut = 0,
IShaderConstantSetCallBack* callback = 0,
E_MATERIAL_TYPE baseMaterial = video::EMT_SOLID,
s32 userData = 0,
E_GPU_SHADING_LANGUAGE shadingLang = EGSL_DEFAULT) = 0;
s32 userData = 0) = 0;
//! convenience function for use without geometry shaders
s32 addHighLevelShaderMaterialFromFiles(
@ -364,8 +346,7 @@ public:
E_PIXEL_SHADER_TYPE psCompileTarget = EPST_PS_1_1,
IShaderConstantSetCallBack* callback = 0,
E_MATERIAL_TYPE baseMaterial = video::EMT_SOLID,
s32 userData = 0,
E_GPU_SHADING_LANGUAGE shadingLang = EGSL_DEFAULT)
s32 userData = 0)
{
return addHighLevelShaderMaterialFromFiles(
vertexShaderProgram, vertexShaderEntryPointName,
@ -373,7 +354,7 @@ public:
pixelShaderEntryPointName, psCompileTarget,
0, "main", EGST_GS_4_0,
scene::EPT_TRIANGLES, scene::EPT_TRIANGLE_STRIP, 0,
callback, baseMaterial, userData, shadingLang);
callback, baseMaterial, userData);
}
//! Adds a new ASM shader material renderer to the VideoDriver

View File

@ -524,7 +524,7 @@ public:
//! Called if an event happened.
virtual bool OnEvent(const SEvent& event)
virtual bool OnEvent(const SEvent& event) _IRR_OVERRIDE_
{
return Parent ? Parent->OnEvent(event) : false;
}
@ -769,7 +769,7 @@ public:
//! Writes attributes of the scene node.
/** Implement this to expose the attributes of your scene node for
scripting languages, editors, debuggers or xml serialization purposes. */
virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0) const
virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0) const _IRR_OVERRIDE_
{
out->addString("Name", Name.c_str());
out->addInt("Id", ID );
@ -794,7 +794,7 @@ public:
//! Reads attributes of the scene node.
/** Implement this to set the attributes of your scene node for
scripting languages, editors, debuggers or xml deserialization purposes. */
virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0)
virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0) _IRR_OVERRIDE_
{
setName(in->getAttributeAsString("Name", Name));
setID(in->getAttributeAsInt("Id", ID));

View File

@ -19,7 +19,7 @@ class IGUIFontBitmap : public IGUIFont
public:
//! Returns the type of this font
virtual EGUI_FONT_TYPE getType() const { return EGFT_BITMAP; }
virtual EGUI_FONT_TYPE getType() const _IRR_OVERRIDE_ { return EGFT_BITMAP; }
//! returns the parsed Symbol Information
virtual IGUISpriteBank* getSpriteBank() const = 0;

View File

@ -158,7 +158,7 @@ namespace scene
//! Calculate how many geometric primitives are used by this meshbuffer
virtual u32 getPrimitiveCount() const
{
u32 indexCount = getIndexCount();
const u32 indexCount = getIndexCount();
switch (getPrimitiveType())
{
case scene::EPT_POINTS: return indexCount;

View File

@ -43,7 +43,7 @@ public:
virtual bool getEveryMeshVertex() const = 0;
//! Get emitter type
virtual E_PARTICLE_EMITTER_TYPE getType() const { return EPET_ANIMATED_MESH; }
virtual E_PARTICLE_EMITTER_TYPE getType() const _IRR_OVERRIDE_ { return EPET_ANIMATED_MESH; }
};
} // end namespace scene

View File

@ -54,7 +54,7 @@ public:
virtual bool getAffectZ() const = 0;
//! Get emitter type
virtual E_PARTICLE_AFFECTOR_TYPE getType() const { return EPAT_ATTRACT; }
virtual E_PARTICLE_AFFECTOR_TYPE getType() const _IRR_OVERRIDE_ { return EPAT_ATTRACT; }
};
} // end namespace scene

View File

@ -25,7 +25,7 @@ public:
virtual const core::aabbox3df& getBox() const = 0;
//! Get emitter type
virtual E_PARTICLE_EMITTER_TYPE getType() const { return EPET_BOX; }
virtual E_PARTICLE_EMITTER_TYPE getType() const _IRR_OVERRIDE_ { return EPET_BOX; }
};
} // end namespace scene

View File

@ -48,7 +48,7 @@ public:
virtual bool getOutlineOnly() const = 0;
//! Get emitter type
virtual E_PARTICLE_EMITTER_TYPE getType() const { return EPET_CYLINDER; }
virtual E_PARTICLE_EMITTER_TYPE getType() const _IRR_OVERRIDE_ { return EPET_CYLINDER; }
};
} // end namespace scene

View File

@ -30,7 +30,7 @@ public:
virtual u32 getFadeOutTime() const = 0;
//! Get emitter type
virtual E_PARTICLE_AFFECTOR_TYPE getType() const { return EPAT_FADE_OUT; }
virtual E_PARTICLE_AFFECTOR_TYPE getType() const _IRR_OVERRIDE_ { return EPAT_FADE_OUT; }
};
} // end namespace scene

View File

@ -31,7 +31,7 @@ public:
virtual const core::vector3df& getGravity() const = 0;
//! Get emitter type
virtual E_PARTICLE_AFFECTOR_TYPE getType() const { return EPAT_GRAVITY; }
virtual E_PARTICLE_AFFECTOR_TYPE getType() const _IRR_OVERRIDE_ { return EPAT_GRAVITY; }
};
} // end namespace scene

View File

@ -43,7 +43,7 @@ public:
virtual bool getEveryMeshVertex() const = 0;
//! Get emitter type
virtual E_PARTICLE_EMITTER_TYPE getType() const { return EPET_MESH; }
virtual E_PARTICLE_EMITTER_TYPE getType() const _IRR_OVERRIDE_ { return EPET_MESH; }
};
} // end namespace scene

View File

@ -36,7 +36,7 @@ public:
virtual f32 getRingThickness() const = 0;
//! Get emitter type
virtual E_PARTICLE_EMITTER_TYPE getType() const { return EPET_RING; }
virtual E_PARTICLE_EMITTER_TYPE getType() const _IRR_OVERRIDE_ { return EPET_RING; }
};
} // end namespace scene

View File

@ -30,7 +30,7 @@ public:
virtual const core::vector3df& getSpeed() const = 0;
//! Get emitter type
virtual E_PARTICLE_AFFECTOR_TYPE getType() const { return EPAT_ROTATE; }
virtual E_PARTICLE_AFFECTOR_TYPE getType() const _IRR_OVERRIDE_ { return EPAT_ROTATE; }
};
} // end namespace scene

View File

@ -30,7 +30,7 @@ public:
virtual f32 getRadius() const = 0;
//! Get emitter type
virtual E_PARTICLE_EMITTER_TYPE getType() const { return EPET_SPHERE; }
virtual E_PARTICLE_EMITTER_TYPE getType() const _IRR_OVERRIDE_ { return EPET_SPHERE; }
};
} // end namespace scene

View File

@ -693,13 +693,11 @@ namespace quake3
inline void dumpVarGroup ( core::stringc &dest, const SVarGroup * group, s32 stack )
{
core::stringc buf;
s32 i;
if ( stack > 0 )
{
buf = "";
for ( i = 0; i < stack - 1; ++i )
for (s32 i = 0; i < stack - 1; ++i )
buf += '\t';
buf += "{\n";
@ -709,7 +707,7 @@ namespace quake3
for ( u32 g = 0; g != group->Variable.size(); ++g )
{
buf = "";
for ( i = 0; i < stack; ++i )
for (s32 i = 0; i < stack; ++i )
buf += '\t';
buf += group->Variable[g].name;
@ -722,13 +720,12 @@ namespace quake3
if ( stack > 1 )
{
buf = "";
for ( i = 0; i < stack - 1; ++i )
for (s32 i = 0; i < stack - 1; ++i )
buf += '\t';
buf += "}\n";
dest.append ( buf );
}
}
/*!
@ -739,12 +736,10 @@ namespace quake3
if ( 0 == shader )
return dest;
const SVarGroup * group;
const u32 size = shader->VarGroup->VariableGroup.size ();
for ( u32 i = 0; i != size; ++i )
{
group = &shader->VarGroup->VariableGroup[ i ];
const SVarGroup * group = &shader->VarGroup->VariableGroup[ i ];
dumpVarGroup ( dest, group, core::clamp( (int)i, 0, 2 ) );
}
@ -767,7 +762,7 @@ namespace quake3
*/
inline void getTextures(tTexArray &textures,
const core::stringc &name, u32 &startPos,
io::IFileSystem *fileSystem,
const io::IFileSystem *fileSystem,
video::IVideoDriver* driver)
{
static const char * const extension[] =

View File

@ -697,7 +697,7 @@ namespace scene
\param out The attribute container to write into.
\param options Additional options which might influence the
serialization. */
virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0) const
virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0) const _IRR_OVERRIDE_
{
if (!out)
return;
@ -722,7 +722,7 @@ namespace scene
\param in The attribute container to read from.
\param options Additional options which might influence the
deserialization. */
virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0)
virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0) _IRR_OVERRIDE_
{
if (!in)
return;

View File

@ -69,7 +69,7 @@ enum E_TEXTURE_CREATION_FLAG
/** Enabling this makes calls to ITexture::lock a lot faster, but costs main memory.
Currently only used in combination with OpenGL drivers.
NOTE: Disabling this does not yet work correctly with alpha-textures.
So the default is off for now (but might change with Irrlicht 1.9 if we get the alpha-troubles fixed).
So the default is on for now (but might change with Irrlicht 1.9 if we get the alpha-troubles fixed).
*/
ETCF_ALLOW_MEMORY_COPY = 0x00000080,

View File

@ -27,7 +27,7 @@ namespace scene
: ISceneNode(parent, mgr, id, position, rotation, scale) {};
//! Returns type of the scene node
virtual ESCENE_NODE_TYPE getType() const { return ESNT_VOLUME_LIGHT; }
virtual ESCENE_NODE_TYPE getType() const _IRR_OVERRIDE_ { return ESNT_VOLUME_LIGHT; }
//! Sets the number of segments across the U axis
virtual void setSubDivideU(const u32 inU) =0;

View File

@ -212,17 +212,19 @@ define out. */
//! Define required options for OpenGL drivers.
#if defined(_IRR_COMPILE_WITH_OPENGL_)
#if defined(_IRR_COMPILE_WITH_WINDOWS_DEVICE_)
#define _IRR_OPENGL_USE_EXTPOINTER_
#define _IRR_COMPILE_WITH_WGL_MANAGER_
#elif defined(_IRR_COMPILE_WITH_X11_DEVICE_)
#define _IRR_OPENGL_USE_EXTPOINTER_
#define _IRR_COMPILE_WITH_GLX_MANAGER_
#elif defined(_IRR_COMPILE_WITH_OSX_DEVICE_)
#define _IRR_COMPILE_WITH_NSOGL_MANAGER_
#elif defined(_IRR_SOLARIS_PLATFORM_)
#define _IRR_COMPILE_WITH_GLX_MANAGER_
#endif
#if defined(_IRR_COMPILE_WITH_WINDOWS_DEVICE_)
#define _IRR_OPENGL_USE_EXTPOINTER_
#define _IRR_COMPILE_WITH_WGL_MANAGER_
#elif defined(_IRR_COMPILE_WITH_X11_DEVICE_)
#define _IRR_OPENGL_USE_EXTPOINTER_
#define _IRR_COMPILE_WITH_GLX_MANAGER_
#elif defined(_IRR_COMPILE_WITH_OSX_DEVICE_)
#define _IRR_COMPILE_WITH_NSOGL_MANAGER_
#elif defined(_IRR_SOLARIS_PLATFORM_)
#define _IRR_COMPILE_WITH_GLX_MANAGER_
#elif defined(_IRR_COMPILE_WITH_SDL_DEVICE_)
#define _IRR_OPENGL_USE_EXTPOINTER_
#endif
#endif
//! Define _IRR_COMPILE_WITH_OGLES1_ to compile the Irrlicht engine with OpenGL ES 1.1.
@ -279,6 +281,8 @@ define out. */
#endif
#endif
//! Define _IRR_COMPILE_WITH_SOFTWARE_ to compile the Irrlicht engine with software driver
/** If you do not need the software driver, or want to use Burning's Video instead,
comment this define out */

View File

@ -87,7 +87,8 @@ struct S3DVertex
((Pos == other.Pos) && (Normal == other.Normal) && (Color == other.Color) && (TCoords < other.TCoords)));
}
E_VERTEX_TYPE getType() const
//! Get type of the class
static E_VERTEX_TYPE getType()
{
return EVT_STANDARD;
}
@ -166,7 +167,7 @@ struct S3DVertex2TCoords : public S3DVertex
((static_cast<S3DVertex>(*this) == other) && (TCoords2 < other.TCoords2)));
}
E_VERTEX_TYPE getType() const
static E_VERTEX_TYPE getType()
{
return EVT_2TCOORDS;
}
@ -240,7 +241,7 @@ struct S3DVertexTangents : public S3DVertex
((static_cast<S3DVertex>(*this) == other) && (Tangent == other.Tangent) && (Binormal < other.Binormal)));
}
E_VERTEX_TYPE getType() const
static E_VERTEX_TYPE getType()
{
return EVT_TANGENTS;
}

View File

@ -38,14 +38,14 @@ namespace scene
//! Gets the frame count of the animated mesh.
/** \return Amount of frames. If the amount is 1, it is a static, non animated mesh. */
virtual u32 getFrameCount() const
virtual u32 getFrameCount() const _IRR_OVERRIDE_
{
return Meshes.size();
}
//! Gets the default animation speed of the animated mesh.
/** \return Amount of frames per second. If the amount is 0, it is a static, non animated mesh. */
virtual f32 getAnimationSpeed() const
virtual f32 getAnimationSpeed() const _IRR_OVERRIDE_
{
return FramesPerSecond;
}
@ -53,7 +53,7 @@ namespace scene
//! Gets the frame count of the animated mesh.
/** \param fps Frames per second to play the animation with. If the amount is 0, it is not animated.
The actual speed is set in the scene node the mesh is instantiated in.*/
virtual void setAnimationSpeed(f32 fps)
virtual void setAnimationSpeed(f32 fps) _IRR_OVERRIDE_
{
FramesPerSecond=fps;
}
@ -66,7 +66,7 @@ namespace scene
\param startFrameLoop: start frame
\param endFrameLoop: end frame
\return The animated mesh based on a detail level. */
virtual IMesh* getMesh(s32 frame, s32 detailLevel=255, s32 startFrameLoop=-1, s32 endFrameLoop=-1)
virtual IMesh* getMesh(s32 frame, s32 detailLevel=255, s32 startFrameLoop=-1, s32 endFrameLoop=-1) _IRR_OVERRIDE_
{
if (Meshes.empty())
return 0;
@ -86,13 +86,13 @@ namespace scene
//! Returns an axis aligned bounding box of the mesh.
/** \return A bounding box of this mesh is returned. */
virtual const core::aabbox3d<f32>& getBoundingBox() const
virtual const core::aabbox3d<f32>& getBoundingBox() const _IRR_OVERRIDE_
{
return Box;
}
//! set user axis aligned bounding box
virtual void setBoundingBox(const core::aabbox3df& box)
virtual void setBoundingBox(const core::aabbox3df& box) _IRR_OVERRIDE_
{
Box = box;
}
@ -112,13 +112,13 @@ namespace scene
}
//! Returns the type of the animated mesh.
virtual E_ANIMATED_MESH_TYPE getMeshType() const
virtual E_ANIMATED_MESH_TYPE getMeshType() const _IRR_OVERRIDE_
{
return Type;
}
//! returns amount of mesh buffers.
virtual u32 getMeshBufferCount() const
virtual u32 getMeshBufferCount() const _IRR_OVERRIDE_
{
if (Meshes.empty())
return 0;
@ -127,7 +127,7 @@ namespace scene
}
//! returns pointer to a mesh buffer
virtual IMeshBuffer* getMeshBuffer(u32 nr) const
virtual IMeshBuffer* getMeshBuffer(u32 nr) const _IRR_OVERRIDE_
{
if (Meshes.empty())
return 0;
@ -139,7 +139,7 @@ namespace scene
/** \param material: material to search for
\return Returns the pointer to the mesh buffer or
NULL if there is no such mesh buffer. */
virtual IMeshBuffer* getMeshBuffer( const video::SMaterial &material) const
virtual IMeshBuffer* getMeshBuffer( const video::SMaterial &material) const _IRR_OVERRIDE_
{
if (Meshes.empty())
return 0;
@ -148,21 +148,21 @@ namespace scene
}
//! Set a material flag for all meshbuffers of this mesh.
virtual void setMaterialFlag(video::E_MATERIAL_FLAG flag, bool newvalue)
virtual void setMaterialFlag(video::E_MATERIAL_FLAG flag, bool newvalue) _IRR_OVERRIDE_
{
for (u32 i=0; i<Meshes.size(); ++i)
Meshes[i]->setMaterialFlag(flag, newvalue);
}
//! set the hardware mapping hint, for driver
virtual void setHardwareMappingHint( E_HARDWARE_MAPPING newMappingHint, E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX )
virtual void setHardwareMappingHint( E_HARDWARE_MAPPING newMappingHint, E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX ) _IRR_OVERRIDE_
{
for (u32 i=0; i<Meshes.size(); ++i)
Meshes[i]->setHardwareMappingHint(newMappingHint, buffer);
}
//! flags the meshbuffer as changed, reloads hardware buffers
virtual void setDirty(E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX)
virtual void setDirty(E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX) _IRR_OVERRIDE_
{
for (u32 i=0; i<Meshes.size(); ++i)
Meshes[i]->setDirty(buffer);

View File

@ -503,7 +503,7 @@ namespace video
break;
case ECF_R8G8B8:
{
u8* p = (u8*)data;
const u8* p = (u8*)data;
set(255, p[0],p[1],p[2]);
}
break;

View File

@ -44,20 +44,20 @@ namespace scene
//! returns amount of mesh buffers.
virtual u32 getMeshBufferCount() const
virtual u32 getMeshBufferCount() const _IRR_OVERRIDE_
{
return MeshBuffers.size();
}
//! returns pointer to a mesh buffer
virtual IMeshBuffer* getMeshBuffer(u32 nr) const
virtual IMeshBuffer* getMeshBuffer(u32 nr) const _IRR_OVERRIDE_
{
return MeshBuffers[nr];
}
//! returns a meshbuffer which fits a material
/** reverse search */
virtual IMeshBuffer* getMeshBuffer( const video::SMaterial & material) const
virtual IMeshBuffer* getMeshBuffer( const video::SMaterial & material) const _IRR_OVERRIDE_
{
for (s32 i = (s32)MeshBuffers.size()-1; i >= 0; --i)
{
@ -69,13 +69,13 @@ namespace scene
}
//! returns an axis aligned bounding box
virtual const core::aabbox3d<f32>& getBoundingBox() const
virtual const core::aabbox3d<f32>& getBoundingBox() const _IRR_OVERRIDE_
{
return BoundingBox;
}
//! set user axis aligned bounding box
virtual void setBoundingBox( const core::aabbox3df& box)
virtual void setBoundingBox( const core::aabbox3df& box) _IRR_OVERRIDE_
{
BoundingBox = box;
}
@ -118,21 +118,21 @@ namespace scene
}
//! sets a flag of all contained materials to a new value
virtual void setMaterialFlag(video::E_MATERIAL_FLAG flag, bool newvalue)
virtual void setMaterialFlag(video::E_MATERIAL_FLAG flag, bool newvalue) _IRR_OVERRIDE_
{
for (u32 i=0; i<MeshBuffers.size(); ++i)
MeshBuffers[i]->getMaterial().setFlag(flag, newvalue);
}
//! set the hardware mapping hint, for driver
virtual void setHardwareMappingHint( E_HARDWARE_MAPPING newMappingHint, E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX )
virtual void setHardwareMappingHint( E_HARDWARE_MAPPING newMappingHint, E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX ) _IRR_OVERRIDE_
{
for (u32 i=0; i<MeshBuffers.size(); ++i)
MeshBuffers[i]->setHardwareMappingHint(newMappingHint, buffer);
}
//! flags the meshbuffer as changed, reloads hardware buffers
virtual void setDirty(E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX)
virtual void setDirty(E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX) _IRR_OVERRIDE_
{
for (u32 i=0; i<MeshBuffers.size(); ++i)
MeshBuffers[i]->setDirty(buffer);

View File

@ -16,28 +16,79 @@ namespace video
{
//! The Material values
SMaterial Material;
//! Which values are taken for override
//! Which values are overridden
/** OR'ed values from E_MATERIAL_FLAGS. */
u32 EnableFlags;
//! For those flags in EnableFlags which affect layers, set which of the layers are affected
bool EnableLayerFlags[MATERIAL_MAX_TEXTURES];
//! Which textures are overridden
bool EnableTextures[MATERIAL_MAX_TEXTURES];
//! Overwrite complete layers (settings of EnableLayerFlags and EnableTextures don't matter then for layer data)
bool EnableLayers[MATERIAL_MAX_TEXTURES];
//! Set in which render passes the material override is active.
/** OR'ed values from E_SCENE_NODE_RENDER_PASS. */
u16 EnablePasses;
//! Global enable flag, overwritten by the SceneManager in each pass
/** The Scenemanager uses the EnablePass array and sets Enabled to
true if the Override material is enabled in the current pass. */
bool Enabled;
struct SMaterialTypeReplacement
{
SMaterialTypeReplacement(s32 original, u32 replacement) : Original(original), Replacement(replacement) {}
SMaterialTypeReplacement(u32 replacement) : Original(-1), Replacement(replacement) {}
//! SMaterial.MaterialType to replace.
//! -1 for all types or a specific value to only replace that one (which is either one of E_MATERIAL_TYPE or a shader material id)
s32 Original;
//! MaterialType to used to override Original (either one of E_MATERIAL_TYPE or a shader material id)
u32 Replacement;
};
//! To overwrite SMaterial::MaterialType
core::array<SMaterialTypeReplacement> MaterialTypes;
//! Default constructor
SOverrideMaterial() : EnableFlags(0), EnablePasses(0), Enabled(false) {}
SOverrideMaterial() : EnableFlags(0), EnablePasses(0), Enabled(false)
{
}
//! disable overrides and reset all flags
void reset()
{
EnableFlags = 0;
EnablePasses = 0;
Enabled = false;
for (u32 i = 0; i < MATERIAL_MAX_TEXTURES; ++i)
{
EnableLayerFlags[i] = true; // doesn't do anything unless EnableFlags is set, just saying by default all texture layers are affected by flags
EnableTextures[i] = false;
EnableLayers[i] = false;
}
MaterialTypes.clear();
}
//! Apply the enabled overrides
void apply(SMaterial& material)
{
if (Enabled)
{
for (u32 i=0; i<32; ++i)
for (u32 i = 0; i < MaterialTypes.size(); ++i)
{
const u32 num=(1<<i);
const SMaterialTypeReplacement& mtr = MaterialTypes[i];
if (mtr.Original < 0 || (s32)mtr.Original == material.MaterialType)
material.MaterialType = (E_MATERIAL_TYPE)mtr.Replacement;
}
for (u32 f=0; f<32; ++f)
{
const u32 num=(1<<f);
if (EnableFlags & num)
{
switch (num)
@ -50,15 +101,45 @@ namespace video
case EMF_ZWRITE_ENABLE: material.ZWriteEnable = Material.ZWriteEnable; break;
case EMF_BACK_FACE_CULLING: material.BackfaceCulling = Material.BackfaceCulling; break;
case EMF_FRONT_FACE_CULLING: material.FrontfaceCulling = Material.FrontfaceCulling; break;
case EMF_BILINEAR_FILTER: material.TextureLayer[0].BilinearFilter = Material.TextureLayer[0].BilinearFilter; break;
case EMF_TRILINEAR_FILTER: material.TextureLayer[0].TrilinearFilter = Material.TextureLayer[0].TrilinearFilter; break;
case EMF_ANISOTROPIC_FILTER: material.TextureLayer[0].AnisotropicFilter = Material.TextureLayer[0].AnisotropicFilter; break;
case EMF_BILINEAR_FILTER:
for ( u32 i=0; i<MATERIAL_MAX_TEXTURES; ++i)
{
if ( EnableLayerFlags[i] )
{
material.TextureLayer[i].BilinearFilter = Material.TextureLayer[i].BilinearFilter;
}
}
break;
case EMF_TRILINEAR_FILTER:
for ( u32 i=0; i<MATERIAL_MAX_TEXTURES; ++i)
{
if ( EnableLayerFlags[i] )
{
material.TextureLayer[i].TrilinearFilter = Material.TextureLayer[i].TrilinearFilter;
}
}
break;
case EMF_ANISOTROPIC_FILTER:
for ( u32 i=0; i<MATERIAL_MAX_TEXTURES; ++i)
{
if ( EnableLayerFlags[i] )
{
material.TextureLayer[i].AnisotropicFilter = Material.TextureLayer[i].AnisotropicFilter;
}
}
break;
case EMF_FOG_ENABLE: material.FogEnable = Material.FogEnable; break;
case EMF_NORMALIZE_NORMALS: material.NormalizeNormals = Material.NormalizeNormals; break;
case EMF_TEXTURE_WRAP:
material.TextureLayer[0].TextureWrapU = Material.TextureLayer[0].TextureWrapU;
material.TextureLayer[0].TextureWrapV = Material.TextureLayer[0].TextureWrapV;
material.TextureLayer[0].TextureWrapW = Material.TextureLayer[0].TextureWrapW;
for ( u32 i=0; i<MATERIAL_MAX_TEXTURES; ++i)
{
if ( EnableLayerFlags[i] )
{
material.TextureLayer[i].TextureWrapU = Material.TextureLayer[i].TextureWrapU;
material.TextureLayer[i].TextureWrapV = Material.TextureLayer[i].TextureWrapV;
material.TextureLayer[i].TextureWrapW = Material.TextureLayer[i].TextureWrapW;
}
}
break;
case EMF_ANTI_ALIASING: material.AntiAliasing = Material.AntiAliasing; break;
case EMF_COLOR_MASK: material.ColorMask = Material.ColorMask; break;
@ -68,13 +149,24 @@ namespace video
case EMF_BLEND_FACTOR: material.BlendFactor = Material.BlendFactor; break;
case EMF_POLYGON_OFFSET:
material.PolygonOffsetDirection = Material.PolygonOffsetDirection;
material.PolygonOffsetFactor = Material.PolygonOffsetFactor;
material.PolygonOffsetFactor = Material.PolygonOffsetFactor;
material.PolygonOffsetDepthBias = Material.PolygonOffsetDepthBias;
material.PolygonOffsetSlopeScale = Material.PolygonOffsetSlopeScale;
break;
}
}
}
for(u32 i=0; i<MATERIAL_MAX_TEXTURES; ++i )
{
if ( EnableLayers[i] )
{
material.TextureLayer[i] = Material.TextureLayer[i];
}
else if ( EnableTextures[i] )
{
material.TextureLayer[i].Texture = Material.TextureLayer[i].Texture;
}
}
}
}

View File

@ -36,19 +36,19 @@ namespace scene
}
//! returns the material of this meshbuffer
virtual const video::SMaterial& getMaterial() const
virtual const video::SMaterial& getMaterial() const _IRR_OVERRIDE_
{
return Material;
}
//! returns the material of this meshbuffer
virtual video::SMaterial& getMaterial()
virtual video::SMaterial& getMaterial() _IRR_OVERRIDE_
{
return Material;
}
//! returns pointer to vertices
virtual const void* getVertices() const
virtual const void* getVertices() const _IRR_OVERRIDE_
{
if (Vertices)
return Vertices->const_pointer();
@ -57,7 +57,7 @@ namespace scene
}
//! returns pointer to vertices
virtual void* getVertices()
virtual void* getVertices() _IRR_OVERRIDE_
{
if (Vertices)
return Vertices->pointer();
@ -66,7 +66,7 @@ namespace scene
}
//! returns amount of vertices
virtual u32 getVertexCount() const
virtual u32 getVertexCount() const _IRR_OVERRIDE_
{
if (Vertices)
return Vertices->size();
@ -75,49 +75,49 @@ namespace scene
}
//! returns pointer to indices
virtual const u16* getIndices() const
virtual const u16* getIndices() const _IRR_OVERRIDE_
{
return Indices.const_pointer();
}
//! returns pointer to indices
virtual u16* getIndices()
virtual u16* getIndices() _IRR_OVERRIDE_
{
return Indices.pointer();
}
//! returns amount of indices
virtual u32 getIndexCount() const
virtual u32 getIndexCount() const _IRR_OVERRIDE_
{
return Indices.size();
}
//! Get type of index data which is stored in this meshbuffer.
virtual video::E_INDEX_TYPE getIndexType() const
virtual video::E_INDEX_TYPE getIndexType() const _IRR_OVERRIDE_
{
return video::EIT_16BIT;
}
//! returns an axis aligned bounding box
virtual const core::aabbox3d<f32>& getBoundingBox() const
virtual const core::aabbox3d<f32>& getBoundingBox() const _IRR_OVERRIDE_
{
return BoundingBox;
}
//! set user axis aligned bounding box
virtual void setBoundingBox( const core::aabbox3df& box)
virtual void setBoundingBox( const core::aabbox3df& box) _IRR_OVERRIDE_
{
BoundingBox = box;
}
//! returns which type of vertex data is stored.
virtual video::E_VERTEX_TYPE getVertexType() const
virtual video::E_VERTEX_TYPE getVertexType() const _IRR_OVERRIDE_
{
return video::EVT_STANDARD;
}
//! recalculates the bounding box. should be called if the mesh changed.
virtual void recalculateBoundingBox()
virtual void recalculateBoundingBox() _IRR_OVERRIDE_
{
if (!Vertices || Vertices->empty() || Indices.empty())
BoundingBox.reset(0,0,0);
@ -130,67 +130,66 @@ namespace scene
}
//! returns position of vertex i
virtual const core::vector3df& getPosition(u32 i) const
virtual const core::vector3df& getPosition(u32 i) const _IRR_OVERRIDE_
{
_IRR_DEBUG_BREAK_IF(!Vertices);
return (*Vertices)[Indices[i]].Pos;
}
//! returns position of vertex i
virtual core::vector3df& getPosition(u32 i)
virtual core::vector3df& getPosition(u32 i) _IRR_OVERRIDE_
{
_IRR_DEBUG_BREAK_IF(!Vertices);
return (*Vertices)[Indices[i]].Pos;
}
//! returns normal of vertex i
virtual const core::vector3df& getNormal(u32 i) const
virtual const core::vector3df& getNormal(u32 i) const _IRR_OVERRIDE_
{
_IRR_DEBUG_BREAK_IF(!Vertices);
return (*Vertices)[Indices[i]].Normal;
}
//! returns normal of vertex i
virtual core::vector3df& getNormal(u32 i)
virtual core::vector3df& getNormal(u32 i) _IRR_OVERRIDE_
{
_IRR_DEBUG_BREAK_IF(!Vertices);
return (*Vertices)[Indices[i]].Normal;
}
//! returns texture coord of vertex i
virtual const core::vector2df& getTCoords(u32 i) const
virtual const core::vector2df& getTCoords(u32 i) const _IRR_OVERRIDE_
{
_IRR_DEBUG_BREAK_IF(!Vertices);
return (*Vertices)[Indices[i]].TCoords;
}
//! returns texture coord of vertex i
virtual core::vector2df& getTCoords(u32 i)
virtual core::vector2df& getTCoords(u32 i) _IRR_OVERRIDE_
{
_IRR_DEBUG_BREAK_IF(!Vertices);
return (*Vertices)[Indices[i]].TCoords;
}
//! append the vertices and indices to the current buffer
virtual void append(const void* const vertices, u32 numVertices, const u16* const indices, u32 numIndices) {}
virtual void append(const void* const vertices, u32 numVertices, const u16* const indices, u32 numIndices) _IRR_OVERRIDE_ {}
//! append the meshbuffer to the current buffer
virtual void append(const IMeshBuffer* const other) {}
virtual void append(const IMeshBuffer* const other) _IRR_OVERRIDE_ {}
//! get the current hardware mapping hint
virtual E_HARDWARE_MAPPING getHardwareMappingHint_Vertex() const
virtual E_HARDWARE_MAPPING getHardwareMappingHint_Vertex() const _IRR_OVERRIDE_
{
return MappingHintVertex;
}
//! get the current hardware mapping hint
virtual E_HARDWARE_MAPPING getHardwareMappingHint_Index() const
virtual E_HARDWARE_MAPPING getHardwareMappingHint_Index() const _IRR_OVERRIDE_
{
return MappingHintIndex;
}
//! set the hardware mapping hint, for driver
virtual void setHardwareMappingHint( E_HARDWARE_MAPPING NewMappingHint, E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX )
virtual void setHardwareMappingHint( E_HARDWARE_MAPPING NewMappingHint, E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX ) _IRR_OVERRIDE_
{
if (buffer==EBT_VERTEX_AND_INDEX || buffer==EBT_VERTEX)
MappingHintVertex=NewMappingHint;
@ -199,19 +198,19 @@ namespace scene
}
//! Describe what kind of primitive geometry is used by the meshbuffer
virtual void setPrimitiveType(E_PRIMITIVE_TYPE type)
virtual void setPrimitiveType(E_PRIMITIVE_TYPE type) _IRR_OVERRIDE_
{
PrimitiveType = type;
}
//! Get the kind of primitive geometry which is used by the meshbuffer
virtual E_PRIMITIVE_TYPE getPrimitiveType() const
virtual E_PRIMITIVE_TYPE getPrimitiveType() const _IRR_OVERRIDE_
{
return PrimitiveType;
}
//! flags the mesh as changed, reloads hardware buffers
virtual void setDirty(E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX)
virtual void setDirty(E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX) _IRR_OVERRIDE_
{
if (buffer==EBT_VERTEX_AND_INDEX || buffer==EBT_VERTEX)
++ChangedID_Vertex;
@ -221,11 +220,11 @@ namespace scene
//! Get the currently used ID for identification of changes.
/** This shouldn't be used for anything outside the VideoDriver. */
virtual u32 getChangedID_Vertex() const {return ChangedID_Vertex;}
virtual u32 getChangedID_Vertex() const _IRR_OVERRIDE_ {return ChangedID_Vertex;}
//! Get the currently used ID for identification of changes.
/** This shouldn't be used for anything outside the VideoDriver. */
virtual u32 getChangedID_Index() const {return ChangedID_Index;}
virtual u32 getChangedID_Index() const _IRR_OVERRIDE_ {return ChangedID_Index;}
//! Material of this meshBuffer
video::SMaterial Material;

View File

@ -31,13 +31,13 @@ struct SSkinMeshBuffer : public IMeshBuffer
}
//! Get Material of this buffer.
virtual const video::SMaterial& getMaterial() const
virtual const video::SMaterial& getMaterial() const _IRR_OVERRIDE_
{
return Material;
}
//! Get Material of this buffer.
virtual video::SMaterial& getMaterial()
virtual video::SMaterial& getMaterial() _IRR_OVERRIDE_
{
return Material;
}
@ -57,7 +57,7 @@ struct SSkinMeshBuffer : public IMeshBuffer
}
//! Get pointer to vertex array
virtual const void* getVertices() const
virtual const void* getVertices() const _IRR_OVERRIDE_
{
switch (VertexType)
{
@ -71,7 +71,7 @@ struct SSkinMeshBuffer : public IMeshBuffer
}
//! Get pointer to vertex array
virtual void* getVertices()
virtual void* getVertices() _IRR_OVERRIDE_
{
switch (VertexType)
{
@ -85,7 +85,7 @@ struct SSkinMeshBuffer : public IMeshBuffer
}
//! Get vertex count
virtual u32 getVertexCount() const
virtual u32 getVertexCount() const _IRR_OVERRIDE_
{
switch (VertexType)
{
@ -100,43 +100,43 @@ struct SSkinMeshBuffer : public IMeshBuffer
//! Get type of index data which is stored in this meshbuffer.
/** \return Index type of this buffer. */
virtual video::E_INDEX_TYPE getIndexType() const
virtual video::E_INDEX_TYPE getIndexType() const _IRR_OVERRIDE_
{
return video::EIT_16BIT;
}
//! Get pointer to index array
virtual const u16* getIndices() const
virtual const u16* getIndices() const _IRR_OVERRIDE_
{
return Indices.const_pointer();
}
//! Get pointer to index array
virtual u16* getIndices()
virtual u16* getIndices() _IRR_OVERRIDE_
{
return Indices.pointer();
}
//! Get index count
virtual u32 getIndexCount() const
virtual u32 getIndexCount() const _IRR_OVERRIDE_
{
return Indices.size();
}
//! Get bounding box
virtual const core::aabbox3d<f32>& getBoundingBox() const
virtual const core::aabbox3d<f32>& getBoundingBox() const _IRR_OVERRIDE_
{
return BoundingBox;
}
//! Set bounding box
virtual void setBoundingBox( const core::aabbox3df& box)
virtual void setBoundingBox( const core::aabbox3df& box) _IRR_OVERRIDE_
{
BoundingBox = box;
}
//! Recalculate bounding box
virtual void recalculateBoundingBox()
virtual void recalculateBoundingBox() _IRR_OVERRIDE_
{
if(!BoundingBoxNeedsRecalculated)
return;
@ -185,13 +185,13 @@ struct SSkinMeshBuffer : public IMeshBuffer
}
//! Get vertex type
virtual video::E_VERTEX_TYPE getVertexType() const
virtual video::E_VERTEX_TYPE getVertexType() const _IRR_OVERRIDE_
{
return VertexType;
}
//! Convert to 2tcoords vertex type
virtual void convertTo2TCoords()
void convertTo2TCoords()
{
if (VertexType==video::EVT_STANDARD)
{
@ -210,7 +210,7 @@ struct SSkinMeshBuffer : public IMeshBuffer
}
//! Convert to tangents vertex type
virtual void convertToTangents()
void convertToTangents()
{
if (VertexType==video::EVT_STANDARD)
{
@ -243,7 +243,7 @@ struct SSkinMeshBuffer : public IMeshBuffer
}
//! returns position of vertex i
virtual const core::vector3df& getPosition(u32 i) const
virtual const core::vector3df& getPosition(u32 i) const _IRR_OVERRIDE_
{
switch (VertexType)
{
@ -257,7 +257,7 @@ struct SSkinMeshBuffer : public IMeshBuffer
}
//! returns position of vertex i
virtual core::vector3df& getPosition(u32 i)
virtual core::vector3df& getPosition(u32 i) _IRR_OVERRIDE_
{
switch (VertexType)
{
@ -271,7 +271,7 @@ struct SSkinMeshBuffer : public IMeshBuffer
}
//! returns normal of vertex i
virtual const core::vector3df& getNormal(u32 i) const
virtual const core::vector3df& getNormal(u32 i) const _IRR_OVERRIDE_
{
switch (VertexType)
{
@ -285,7 +285,7 @@ struct SSkinMeshBuffer : public IMeshBuffer
}
//! returns normal of vertex i
virtual core::vector3df& getNormal(u32 i)
virtual core::vector3df& getNormal(u32 i) _IRR_OVERRIDE_
{
switch (VertexType)
{
@ -299,7 +299,7 @@ struct SSkinMeshBuffer : public IMeshBuffer
}
//! returns texture coords of vertex i
virtual const core::vector2df& getTCoords(u32 i) const
virtual const core::vector2df& getTCoords(u32 i) const _IRR_OVERRIDE_
{
switch (VertexType)
{
@ -313,7 +313,7 @@ struct SSkinMeshBuffer : public IMeshBuffer
}
//! returns texture coords of vertex i
virtual core::vector2df& getTCoords(u32 i)
virtual core::vector2df& getTCoords(u32 i) _IRR_OVERRIDE_
{
switch (VertexType)
{
@ -327,25 +327,25 @@ struct SSkinMeshBuffer : public IMeshBuffer
}
//! append the vertices and indices to the current buffer
virtual void append(const void* const vertices, u32 numVertices, const u16* const indices, u32 numIndices) {}
virtual void append(const void* const vertices, u32 numVertices, const u16* const indices, u32 numIndices) _IRR_OVERRIDE_ {}
//! append the meshbuffer to the current buffer
virtual void append(const IMeshBuffer* const other) {}
virtual void append(const IMeshBuffer* const other) _IRR_OVERRIDE_ {}
//! get the current hardware mapping hint for vertex buffers
virtual E_HARDWARE_MAPPING getHardwareMappingHint_Vertex() const
virtual E_HARDWARE_MAPPING getHardwareMappingHint_Vertex() const _IRR_OVERRIDE_
{
return MappingHint_Vertex;
}
//! get the current hardware mapping hint for index buffers
virtual E_HARDWARE_MAPPING getHardwareMappingHint_Index() const
virtual E_HARDWARE_MAPPING getHardwareMappingHint_Index() const _IRR_OVERRIDE_
{
return MappingHint_Index;
}
//! set the hardware mapping hint, for driver
virtual void setHardwareMappingHint( E_HARDWARE_MAPPING NewMappingHint, E_BUFFER_TYPE Buffer=EBT_VERTEX_AND_INDEX )
virtual void setHardwareMappingHint( E_HARDWARE_MAPPING NewMappingHint, E_BUFFER_TYPE Buffer=EBT_VERTEX_AND_INDEX ) _IRR_OVERRIDE_
{
if (Buffer==EBT_VERTEX)
MappingHint_Vertex=NewMappingHint;
@ -359,19 +359,19 @@ struct SSkinMeshBuffer : public IMeshBuffer
}
//! Describe what kind of primitive geometry is used by the meshbuffer
virtual void setPrimitiveType(E_PRIMITIVE_TYPE type)
virtual void setPrimitiveType(E_PRIMITIVE_TYPE type) _IRR_OVERRIDE_
{
PrimitiveType = type;
}
//! Get the kind of primitive geometry which is used by the meshbuffer
virtual E_PRIMITIVE_TYPE getPrimitiveType() const
virtual E_PRIMITIVE_TYPE getPrimitiveType() const _IRR_OVERRIDE_
{
return PrimitiveType;
}
//! flags the mesh as changed, reloads hardware buffers
virtual void setDirty(E_BUFFER_TYPE Buffer=EBT_VERTEX_AND_INDEX)
virtual void setDirty(E_BUFFER_TYPE Buffer=EBT_VERTEX_AND_INDEX) _IRR_OVERRIDE_
{
if (Buffer==EBT_VERTEX_AND_INDEX || Buffer==EBT_VERTEX)
++ChangedID_Vertex;
@ -379,9 +379,9 @@ struct SSkinMeshBuffer : public IMeshBuffer
++ChangedID_Index;
}
virtual u32 getChangedID_Vertex() const {return ChangedID_Vertex;}
virtual u32 getChangedID_Vertex() const _IRR_OVERRIDE_ {return ChangedID_Vertex;}
virtual u32 getChangedID_Index() const {return ChangedID_Index;}
virtual u32 getChangedID_Index() const _IRR_OVERRIDE_ {return ChangedID_Index;}
//! Call this after changing the positions of any vertex.
void boundingBoxNeedsRecalculated(void) { BoundingBoxNeedsRecalculated = true; }

View File

@ -113,14 +113,12 @@ inline io::path& deletePathFromPath(io::path& filename, s32 pathCount)
//! 0 means in same directory. 1 means file is direct child of path
inline s32 isInSameDirectory ( const io::path& path, const io::path& file )
{
s32 subA = 0;
s32 subB = 0;
s32 pos;
if ( path.size() && !path.equalsn ( file, path.size() ) )
return -1;
pos = 0;
s32 subA = 0;
s32 subB = 0;
s32 pos = 0;
while ( (pos = path.findNext ( '/', pos )) >= 0 )
{
subA += 1;

View File

@ -324,8 +324,8 @@ inline const char* fast_atof_move(const char* in, f32& result)
if ( LOCALE_DECIMAL_POINTS.findFirst(*in) >= 0 )
{
const char* afterDecimal = ++in;
f32 decimal = strtof10(in, &afterDecimal);
size_t numDecimals = afterDecimal - in;
const f32 decimal = strtof10(in, &afterDecimal);
const size_t numDecimals = afterDecimal - in;
if (numDecimals < IRR_ATOF_TABLE_SIZE)
{
value += decimal * fast_atof_table[numDecimals];

View File

@ -76,7 +76,7 @@ public:
allocated = new_size;
// copy old data
s32 end = used < new_size ? used : new_size;
const s32 end = used < new_size ? used : new_size;
for (s32 i=0; i<end; ++i)
{

View File

@ -283,8 +283,8 @@ namespace core
// by one integer number. Also works the other way round, an integer of 1 interpreted as float
// is for example the smallest possible float number.
FloatIntUnion32 fa(a);
FloatIntUnion32 fb(b);
const FloatIntUnion32 fa(a);
const FloatIntUnion32 fb(b);
// Different signs, we could maybe get difference to 0, but so close to 0 using epsilons is better.
if ( fa.sign() != fb.sign() )
@ -296,7 +296,7 @@ namespace core
}
// Find the difference in ULPs.
int ulpsDiff = abs_(fa.i- fb.i);
const int ulpsDiff = abs_(fa.i- fb.i);
if (ulpsDiff <= maxUlpDiff)
return true;

View File

@ -686,7 +686,7 @@ public:
return *this;
--used;
u32 len = other.size()+1;
const u32 len = other.size()+1;
if (used + len > allocated)
reallocate(used + len);
@ -958,15 +958,14 @@ public:
string<T> o;
o.reserve(length+1);
s32 i;
if ( !make_lower )
{
for (i=0; i<length; ++i)
for (s32 i=0; i<length; ++i)
o.array[i] = array[i+begin];
}
else
{
for (i=0; i<length; ++i)
for (s32 i=0; i<length; ++i)
o.array[i] = locale_lower ( array[i+begin] );
}
@ -1435,7 +1434,7 @@ private:
array = allocator.allocate(new_size); //new T[new_size];
allocated = new_size;
u32 amount = used < new_size ? used : new_size;
const u32 amount = used < new_size ? used : new_size;
for (u32 i=0; i<amount; ++i)
array[i] = old_array[i];
@ -1479,7 +1478,7 @@ What the function does exactly depends on the LC_CTYPE of the current c locale.
\return The number of wide characters written to destination, not including the eventual terminating null character or -1 when conversion failed. */
static inline size_t multibyteToWString(string<wchar_t>& destination, const char* source)
{
u32 s = source ? (u32)strlen(source) : 0;
const u32 s = source ? (u32)strlen(source) : 0;
return multibyteToWString(destination, source, s);
}
@ -1493,7 +1492,7 @@ static size_t multibyteToWString(string<wchar_t>& destination, const char* sourc
#pragma warning(push)
#pragma warning(disable: 4996) // 'mbstowcs': This function or variable may be unsafe. Consider using mbstowcs_s instead.
#endif
size_t written = mbstowcs(destination.array, source, (size_t)sourceSize);
const size_t written = mbstowcs(destination.array, source, (size_t)sourceSize);
#if defined(_MSC_VER)
#pragma warning(pop)
#endif

View File

@ -329,13 +329,13 @@ class line2d
template <>
inline vector2df line2d<irr::f32>::getClosestPoint(const vector2df& point, bool checkOnlySegments) const
{
vector2df c = point - start;
const vector2df c = point - start;
vector2df v = end - start;
f32 d = (f32)v.getLength();
const f32 d = (f32)v.getLength();
if ( d == 0 ) // can't tell much when the line is just a single point
return start;
v /= d;
f32 t = v.dotProduct(c);
const f32 t = v.dotProduct(c);
if ( checkOnlySegments )
{

View File

@ -692,7 +692,7 @@ inline vector3df quaternion::operator* (const vector3df& v) const
// nVidia SDK implementation
vector3df uv, uuv;
vector3df qvec(X, Y, Z);
const vector3df qvec(X, Y, Z);
uv = qvec.crossProduct(v);
uuv = qvec.crossProduct(uv);
uv *= (2.0f * W);

View File

@ -253,10 +253,10 @@ namespace core
{
// This catches some floating point troubles.
// Unfortunately slightly expensive and we don't really know the best epsilon for iszero.
vector3d<f64> cp1 = bminusa.normalize().crossProduct((p1 - a).normalize());
if (core::iszero(cp1.X, (f64)ROUNDING_ERROR_f32)
&& core::iszero(cp1.Y, (f64)ROUNDING_ERROR_f32)
&& core::iszero(cp1.Z, (f64)ROUNDING_ERROR_f32) )
vector3d<f64> cp1n = bminusa.normalize().crossProduct((p1 - a).normalize());
if (core::iszero(cp1n.X, (f64)ROUNDING_ERROR_f32)
&& core::iszero(cp1n.Y, (f64)ROUNDING_ERROR_f32)
&& core::iszero(cp1n.Z, (f64)ROUNDING_ERROR_f32) )
{
res = 0.f;
}

View File

@ -315,7 +315,7 @@ public:
\return An interpolated vector. This vector is not modified. */
vector2d<T> getInterpolated(const vector2d<T>& other, f64 d) const
{
f64 inv = 1.0f - d;
const f64 inv = 1.0f - d;
return vector2d<T>((T)(other.X*inv + X*d), (T)(other.Y*inv + Y*d));
}

View File

@ -23,19 +23,17 @@ namespace scene
void AngleQuaternion(const core::vector3df& angles, vec4_hl quaternion)
{
double angle;
double sr, sp, sy, cr, cp, cy;
// FIXME: rescale the inputs to 1/2 angle
angle = angles.Z * 0.5;
sy = sin(angle);
cy = cos(angle);
double angle = angles.Z * 0.5;
const double sy = sin(angle);
const double cy = cos(angle);
angle = angles.Y * 0.5;
sp = sin(angle);
cp = cos(angle);
const double sp = sin(angle);
const double cp = cos(angle);
angle = angles.X * 0.5;
sr = sin(angle);
cr = cos(angle);
const double sr = sin(angle);
const double cr = cos(angle);
quaternion[0] = (irr::f32)(sr*cp*cy-cr*sp*sy); // X
quaternion[1] = (irr::f32)(cr*sp*cy+sr*cp*sy); // Y
@ -60,28 +58,26 @@ namespace scene
void QuaternionSlerp( const vec4_hl p, vec4_hl q, f32 t, vec4_hl qt )
{
s32 i;
double omega, cosom, sinom, sclp, sclq;
// decide if one of the quaternions is backwards
f32 a = 0;
f32 b = 0;
for (i = 0; i < 4; i++) {
for (s32 i = 0; i < 4; i++) {
a += (p[i]-q[i])*(p[i]-q[i]);
b += (p[i]+q[i])*(p[i]+q[i]);
}
if (a > b) {
for (i = 0; i < 4; i++) {
for (s32 i = 0; i < 4; i++) {
q[i] = -q[i];
}
}
cosom = p[0]*q[0] + p[1]*q[1] + p[2]*q[2] + p[3]*q[3];
double sclp, sclq;
const double cosom = p[0]*q[0] + p[1]*q[1] + p[2]*q[2] + p[3]*q[3];
if ((1.f + cosom) > 0.00000001) {
if ((1.f - cosom) > 0.00000001) {
omega = acos( cosom );
sinom = sin( omega );
const double omega = acos( cosom );
const double sinom = sin( omega );
sclp = sin( (1.f - t)*omega) / sinom;
sclq = sin( t*omega ) / sinom;
}
@ -89,7 +85,7 @@ namespace scene
sclp = 1.f - t;
sclq = t;
}
for (i = 0; i < 4; i++) {
for (s32 i = 0; i < 4; i++) {
qt[i] = f32(sclp * p[i] + sclq * q[i]);
}
}
@ -100,7 +96,7 @@ namespace scene
qt[3] = p[2];
sclp = sin( (1.f - t) * 0.5f * core::PI);
sclq = sin( t * 0.5f * core::PI);
for (i = 0; i < 3; i++) {
for (s32 i = 0; i < 3; i++) {
qt[i] = f32(sclp * p[i] + sclq * qt[i]);
}
}
@ -281,13 +277,12 @@ void CAnimatedMeshHalfLife::initModel()
// init Sequences to Animation
KeyFrameInterpolation ipol;
ipol.Name.reserve ( 64 );
u32 i;
AnimList.clear();
FrameCount = 0;
SHalflifeSequence *seq = (SHalflifeSequence*) ((u8*) Header + Header->seqindex);
for ( i = 0; i < Header->numseq; i++)
const SHalflifeSequence *seq = (SHalflifeSequence*) ((u8*) Header + Header->seqindex);
for (u32 i = 0; i < Header->numseq; i++)
{
ipol.Name = seq[i].label;
ipol.StartFrame = FrameCount;
@ -322,14 +317,14 @@ void CAnimatedMeshHalfLife::initModel()
// initBodyparts
u32 meshBuffer = 0;
BodyList.clear();
SHalflifeBody *body = (SHalflifeBody *) ((u8*) Header + Header->bodypartindex);
for (i=0; i < Header->numbodyparts; ++i)
const SHalflifeBody *body = (const SHalflifeBody *) ((u8*) Header + Header->bodypartindex);
for (u32 i=0; i < Header->numbodyparts; ++i)
{
BodyPart part;
part.name = body[i].name;
part.defaultModel = core::max_ ( 0, (s32) body[i].base - 1 );
SHalflifeModel * model = (SHalflifeModel *)((u8*) Header + body[i].modelindex);
const SHalflifeModel * model = (SHalflifeModel *)((u8*) Header + body[i].modelindex);
for ( u32 g = 0; g < body[i].nummodels; ++g)
{
SubModel sub;
@ -369,7 +364,7 @@ void CAnimatedMeshHalfLife::initModel()
for (u32 bodypart=0 ; bodypart < Header->numbodyparts ; ++bodypart)
{
const SHalflifeBody *body = (SHalflifeBody *)((u8*) Header + Header->bodypartindex) + bodypart;
body = (const SHalflifeBody *)((u8*) Header + Header->bodypartindex) + bodypart;
for (u32 modelnr = 0; modelnr < body->nummodels; ++modelnr)
{
@ -378,7 +373,7 @@ void CAnimatedMeshHalfLife::initModel()
const vec3_hl *studioverts = (vec3_hl *)((u8*)Header + model->vertindex);
const vec3_hl *studionorms = (vec3_hl *)((u8*)Header + model->normindex);
#endif
for (i = 0; i < model->nummesh; ++i)
for (u32 i = 0; i < model->nummesh; ++i)
{
const SHalflifeMesh *mesh = (SHalflifeMesh *)((u8*)Header + model->meshindex) + i;
const SHalflifeTexture *currentex = &tex[skinref[mesh->skinref]];
@ -531,10 +526,6 @@ void CAnimatedMeshHalfLife::buildVertices()
if (SkinGroupSelection != 0 && SkinGroupSelection < TextureHeader->numskinfamilies)
skinref += (SkinGroupSelection * TextureHeader->numskinref);
*/
u32 i;
s32 c,g;
const s16 *tricmd;
u32 meshBufferNr = 0;
for ( u32 bodypart = 0 ; bodypart < Header->numbodyparts; ++bodypart)
{
@ -548,7 +539,7 @@ void CAnimatedMeshHalfLife::buildVertices()
const vec3_hl *studioverts = (vec3_hl *)((u8*)Header + model->vertindex);
for ( i = 0; i < model->numverts; i++)
for (u32 i = 0; i < model->numverts; i++)
{
VectorTransform ( studioverts[i], BoneTransform[vertbone[i]], TransformedVerts[i] );
}
@ -560,20 +551,21 @@ void CAnimatedMeshHalfLife::buildVertices()
VectorTransform ( studionorms[i], BoneTransform[normbone[i]], TransformedNormals[i] );
}
*/
for (i = 0; i < model->nummesh; i++)
for (u32 i = 0; i < model->nummesh; i++)
{
const SHalflifeMesh *mesh = (SHalflifeMesh *)((u8*)Header + model->meshindex) + i;
IMeshBuffer * buffer = MeshIPol->getMeshBuffer ( meshBufferNr++ );
video::S3DVertex* v = (video::S3DVertex* ) buffer->getVertices();
tricmd = (s16*)((u8*)Header + mesh->triindex);
const s16 *tricmd = (s16*)((u8*)Header + mesh->triindex);
s32 c = 0;
while ( (c = *(tricmd++)) )
{
if (c < 0)
c = -c;
for ( g = 0; g < c; ++g, v += 1, tricmd += 4 )
for (s32 g = 0; g < c; ++g, v += 1, tricmd += 4 )
{
// fill vertex
const core::vector3df& av = TransformedVerts[tricmd[0]];
@ -596,17 +588,16 @@ void CAnimatedMeshHalfLife::buildVertices()
*/
void CAnimatedMeshHalfLife::renderModel(u32 param, IVideoDriver * driver, const core::matrix4 &absoluteTransformation)
{
SHalflifeBone *bone = (SHalflifeBone *) ((u8 *) Header + Header->boneindex);
const SHalflifeBone *bone = (SHalflifeBone *) ((u8 *) Header + Header->boneindex);
video::SColor blue(0xFF000080);
video::SColor red(0xFF800000);
video::SColor yellow(0xFF808000);
video::SColor cyan(0xFF008080);
const video::SColor blue(0xFF000080);
const video::SColor red(0xFF800000);
const video::SColor yellow(0xFF808000);
const video::SColor cyan(0xFF008080);
core::aabbox3df box;
u32 i;
for ( i = 0; i < Header->numbones; i++)
for (u32 i = 0; i < Header->numbones; i++)
{
if (bone[i].parent >= 0)
{
@ -632,9 +623,9 @@ void CAnimatedMeshHalfLife::renderModel(u32 param, IVideoDriver * driver, const
}
// attachements
SHalflifeAttachment *attach = (SHalflifeAttachment *) ((u8*) Header + Header->attachmentindex);
const SHalflifeAttachment *attach = (SHalflifeAttachment *) ((u8*) Header + Header->attachmentindex);
core::vector3df v[8];
for ( i = 0; i < Header->numattachments; i++)
for (u32 i = 0; i < Header->numattachments; i++)
{
getTransformedBoneVector ( v[0],attach[i].bone,attach[i].org );
getTransformedBoneVector ( v[1],attach[i].bone,attach[i].vectors[0] );
@ -647,12 +638,11 @@ void CAnimatedMeshHalfLife::renderModel(u32 param, IVideoDriver * driver, const
// hit boxes
SHalflifeBBox *hitbox = (SHalflifeBBox *) ((u8*) Header + Header->hitboxindex);
f32 *bbmin,*bbmax;
vec3_hl v2[8];
for (i = 0; i < Header->numhitboxes; i++)
for (u32 i = 0; i < Header->numhitboxes; i++)
{
bbmin = hitbox[i].bbmin;
bbmax = hitbox[i].bbmax;
f32 *bbmin = hitbox[i].bbmin;
f32 *bbmax = hitbox[i].bbmax;
v2[0][0] = bbmin[0];
v2[0][1] = bbmax[1];
@ -710,8 +700,8 @@ void CAnimatedMeshHalfLife::renderModel(u32 param, IVideoDriver * driver, const
//! Returns the animated mesh based on a detail level. 0 is the lowest, 255 the highest detail.
IMesh* CAnimatedMeshHalfLife::getMesh(s32 frameInt, s32 detailLevel, s32 startFrameLoop, s32 endFrameLoop)
{
f32 frame = frameInt + (detailLevel * 0.001f);
u32 frameA = core::floor32 ( frame );
const f32 frame = frameInt + (detailLevel * 0.001f);
const u32 frameA = core::floor32 ( frame );
// f32 blend = core::fract ( frame );
SHalflifeSequence *seq = (SHalflifeSequence*) ((u8*) Header + Header->seqindex);
@ -720,7 +710,7 @@ IMesh* CAnimatedMeshHalfLife::getMesh(s32 frameInt, s32 detailLevel, s32 startFr
u32 frameCount = 0;
for (u32 i = 0; i < Header->numseq; ++i)
{
u32 val = core::max_ ( 1, seq[i].numframes - 1 );
const u32 val = core::max_ ( 1, seq[i].numframes - 1 );
if ( frameCount + val > frameA )
{
SequenceIndex = i;
@ -752,22 +742,20 @@ IMesh* CAnimatedMeshHalfLife::getMesh(s32 frameInt, s32 detailLevel, s32 startFr
*/
void CAnimatedMeshHalfLife::initData ()
{
u32 i;
Header = 0;
TextureHeader = 0;
OwnTexModel = false;
for ( i = 0; i < 32; ++i )
for (u32 i = 0; i < 32; ++i )
AnimationHeader[i] = 0;
SequenceIndex = 0;
CurrentFrame = 0.f;
for ( i = 0; i < 5; ++i )
for (u32 i = 0; i < 5; ++i )
BoneController[i] = 0;
for ( i = 0; i < 2; ++i )
for (u32 i = 0; i < 2; ++i )
Blending[i] = 0;
SkinGroupSelection = 0;
@ -853,7 +841,6 @@ void STextureAtlas::getTranslation(const c8* name, core::vector2di& pos)
*/
void STextureAtlas::create(u32 border, E_TEXTURE_CLAMP texmode)
{
u32 i = 0;
u32 w = 0;
u32 w2;
u32 h2;
@ -869,7 +856,7 @@ void STextureAtlas::create(u32 border, E_TEXTURE_CLAMP texmode)
// split size
wsum = frame;
for (i = 0; i < atlas.size(); i++)
for (u32 i = 0; i < atlas.size(); i++)
{
// make space
w2 = atlas[i].width + border;
@ -886,7 +873,7 @@ void STextureAtlas::create(u32 border, E_TEXTURE_CLAMP texmode)
hsum = frame;
w = frame;
h = 0;
for (i = 0; i < atlas.size(); i++)
for (u32 i = 0; i < atlas.size(); i++)
{
if ( atlas[i].image->getColorFormat() == ECF_A8R8G8B8 )
{
@ -921,7 +908,7 @@ void STextureAtlas::create(u32 border, E_TEXTURE_CLAMP texmode)
wsum = core::s32_max ( wsum, w );
// build image
core::dimension2d<u32> dim = core::dimension2d<u32>( wsum, hsum ).getOptimalSize();
const core::dimension2d<u32> dim = core::dimension2d<u32>( wsum, hsum ).getOptimalSize();
IImage* master = new CImage(format, dim);
master->fill(0);
@ -935,16 +922,15 @@ void STextureAtlas::create(u32 border, E_TEXTURE_CLAMP texmode)
{0, 1} // ETC_MIRROR
};
s32 a,b;
for (i = 0; i < atlas.size(); i++)
for (u32 i = 0; i < atlas.size(); i++)
{
atlas[i].image->copyTo ( master, atlas[i].pos );
// clamp/wrap ( copy edges, filtering needs it )
for ( b = 0; b < frame; ++b )
for (s32 b = 0; b < frame; ++b )
{
for ( a = 0 - b; a <= (s32) atlas[i].width + b; ++a )
for (s32 a = 0 - b; a <= (s32) atlas[i].width + b; ++a )
{
col[0] = atlas[i].image->getPixel ( core::s32_clamp ( a, 0, atlas[i].width - 1 ), 0 );
col[1] = atlas[i].image->getPixel ( core::s32_clamp ( a, 0, atlas[i].width - 1 ), atlas[i].height - 1 );
@ -953,7 +939,7 @@ void STextureAtlas::create(u32 border, E_TEXTURE_CLAMP texmode)
master->setPixel ( atlas[i].pos.X + a, atlas[i].pos.Y + atlas[i].height - 1 + ( b + 1 ) * 1, col[wrap[texmode][1]] );
}
for ( a = -1 - b; a <= (s32) atlas[i].height + b; ++a )
for (s32 a = -1 - b; a <= (s32) atlas[i].height + b; ++a )
{
col[0] = atlas[i].image->getPixel ( 0, core::s32_clamp ( a, 0, atlas[i].height - 1 ) );
col[1] = atlas[i].image->getPixel ( atlas[i].width - 1, core::s32_clamp ( a, 0, atlas[i].height - 1 ) );
@ -1016,7 +1002,7 @@ SHalflifeHeader* CAnimatedMeshHalfLife::loadModel(io::IReadFile* file, const io:
core::splitFilename(file->getFileName(), &path, &fname, &ext);
TextureBaseName = path + fname + "_";
SHalflifeTexture *tex = (SHalflifeTexture *)(pin + header->textureindex);
const SHalflifeTexture *tex = (SHalflifeTexture *)(pin + header->textureindex);
u32 *palette = new u32[256];
for (u32 i = 0; i < header->numtextures; ++i)
{
@ -1109,7 +1095,7 @@ f32 CAnimatedMeshHalfLife::SetController( s32 controllerIndex, f32 value )
}
}
s32 range = controllerIndex == MOUTH_CONTROLLER ? 64 : 255;
const s32 range = controllerIndex == MOUTH_CONTROLLER ? 64 : 255;
s32 setting = (s32) ( (f32) range * (value - bonecontroller->start) / (bonecontroller->end - bonecontroller->start));
@ -1184,7 +1170,6 @@ void CAnimatedMeshHalfLife::dumpModelInfo(u32 level) const
{
const u8 *phdr = (const u8*) Header;
const SHalflifeHeader * hdr = Header;
u32 i;
if (level == 0)
{
@ -1228,7 +1213,7 @@ void CAnimatedMeshHalfLife::dumpModelInfo(u32 level) const
printf("flags: %d\n\n", hdr->flags);
printf("numbones: %u\n", hdr->numbones);
for (i = 0; i < hdr->numbones; i++)
for (u32 i = 0; i < hdr->numbones; i++)
{
const SHalflifeBone *bone = (const SHalflifeBone *) (phdr + hdr->boneindex);
printf("bone %u.name: \"%s\"\n", i + 1, bone[i].name);
@ -1241,7 +1226,7 @@ void CAnimatedMeshHalfLife::dumpModelInfo(u32 level) const
printf("\nnumbonecontrollers: %u\n", hdr->numbonecontrollers);
const SHalflifeBoneController *bonecontrollers = (const SHalflifeBoneController *) (phdr + hdr->bonecontrollerindex);
for (i = 0; i < hdr->numbonecontrollers; i++)
for (u32 i = 0; i < hdr->numbonecontrollers; i++)
{
printf("bonecontroller %u.bone: %d\n", i + 1, bonecontrollers[i].bone);
printf("bonecontroller %u.type: %d\n", i + 1, bonecontrollers[i].type);
@ -1253,7 +1238,7 @@ void CAnimatedMeshHalfLife::dumpModelInfo(u32 level) const
printf("\nnumhitboxes: %u\n", hdr->numhitboxes);
const SHalflifeBBox *box = (const SHalflifeBBox *) (phdr + hdr->hitboxindex);
for (i = 0; i < hdr->numhitboxes; i++)
for (u32 i = 0; i < hdr->numhitboxes; i++)
{
printf("hitbox %u.bone: %d\n", i + 1, box[i].bone);
printf("hitbox %u.group: %d\n", i + 1, box[i].group);
@ -1263,7 +1248,7 @@ void CAnimatedMeshHalfLife::dumpModelInfo(u32 level) const
printf("\nnumseq: %u\n", hdr->numseq);
const SHalflifeSequence *seq = (const SHalflifeSequence *) (phdr + hdr->seqindex);
for (i = 0; i < hdr->numseq; i++)
for (u32 i = 0; i < hdr->numseq; i++)
{
printf("seqdesc %u.label: \"%s\"\n", i + 1, seq[i].label);
printf("seqdesc %u.fps: %f\n", i + 1, seq[i].fps);
@ -1272,7 +1257,7 @@ void CAnimatedMeshHalfLife::dumpModelInfo(u32 level) const
}
printf("\nnumseqgroups: %u\n", hdr->numseqgroups);
for (i = 0; i < hdr->numseqgroups; i++)
for (u32 i = 0; i < hdr->numseqgroups; i++)
{
const SHalflifeSequenceGroup *group = (const SHalflifeSequenceGroup *) (phdr + hdr->seqgroupindex);
printf("\nseqgroup %u.label: \"%s\"\n", i + 1, group[i].label);
@ -1285,16 +1270,16 @@ void CAnimatedMeshHalfLife::dumpModelInfo(u32 level) const
printf("\nnumbodyparts: %u\n", hdr->numbodyparts);
const SHalflifeBody *pbodyparts = (const SHalflifeBody*) ((const u8*) hdr + hdr->bodypartindex);
for (i = 0; i < hdr->numbodyparts; i++)
for (u32 i = 0; i < hdr->numbodyparts; i++)
{
printf("bodypart %u.name: \"%s\"\n", i + 1, pbodyparts[i].name);
printf("bodypart %u.nummodels: %u\n", i + 1, pbodyparts[i].nummodels);
printf("bodypart %u.base: %u\n", i + 1, pbodyparts[i].base);
printf("bodypart %d.modelindex: %u\n", i + 1, pbodyparts[i].modelindex);
printf("bodypart %u.modelindex: %u\n", i + 1, pbodyparts[i].modelindex);
}
printf("\nnumattachments: %u\n", hdr->numattachments);
for (i = 0; i < hdr->numattachments; i++)
for (u32 i = 0; i < hdr->numattachments; i++)
{
const SHalflifeAttachment *attach = (const SHalflifeAttachment *) ((const u8*) hdr + hdr->attachmentindex);
printf("attachment %u.name: \"%s\"\n", i + 1, attach[i].name);
@ -1305,7 +1290,7 @@ void CAnimatedMeshHalfLife::dumpModelInfo(u32 level) const
printf("textureindex: %u\n", hdr->textureindex);
printf("texturedataindex: %u\n", hdr->texturedataindex);
const SHalflifeTexture *ptextures = (const SHalflifeTexture *) ((const u8*) hdr + hdr->textureindex);
for (i = 0; i < hdr->numtextures; i++)
for (u32 i = 0; i < hdr->numtextures; i++)
{
printf("texture %u.name: \"%s\"\n", i + 1, ptextures[i].name);
printf("texture %u.flags: %d\n", i + 1, ptextures[i].flags);
@ -1490,8 +1475,8 @@ void CAnimatedMeshHalfLife::calcBonePosition(const s32 frame, f32 s,
void CAnimatedMeshHalfLife::calcRotations(vec3_hl *pos, vec4_hl *q,
SHalflifeSequence *seq, SHalflifeAnimOffset *anim, f32 f)
{
s32 frame = (s32)f;
f32 s = (f - frame);
const s32 frame = (s32)f;
const f32 s = (f - frame);
// add in programatic controllers
calcBoneAdj();
@ -1616,7 +1601,7 @@ void CAnimatedMeshHalfLife::setUpBones()
}
}
SHalflifeBone *bone = (SHalflifeBone *)((u8*) Header + Header->boneindex);
const SHalflifeBone *bone = (SHalflifeBone *)((u8*) Header + Header->boneindex);
for (u32 i = 0; i < Header->numbones; i++)
{

View File

@ -1275,7 +1275,7 @@ public:
{
u32 c;
int characters;
int items = sscanf(text, "%08x%n", &c, &characters);
const int items = sscanf(text, "%08x%n", &c, &characters);
if (items != 1 || characters != 8 )
{
CNumbersAttribute::setString(text);
@ -1768,7 +1768,7 @@ public:
virtual void getBinary(void* outdata, s32 maxLength) const _IRR_OVERRIDE_
{
s32 dataSize = maxLength;
const s32 dataSize = maxLength;
c8* datac8 = (c8*)(outdata);
s32 p = 0;
const c8* dataString = Value.c_str();
@ -1790,8 +1790,8 @@ public:
virtual void setBinary(void* data, s32 maxLength) _IRR_OVERRIDE_
{
s32 dataSize = maxLength;
c8* datac8 = (c8*)(data);
const s32 dataSize = maxLength;
const c8* datac8 = (c8*)(data);
char tmp[3];
tmp[2] = 0;
Value = "";
@ -2050,9 +2050,9 @@ public:
case 8:
{
#ifdef _MSC_VER
unsigned __int64 tmp = _strtoui64(text, NULL, 16);
const unsigned __int64 tmp = _strtoui64(text, NULL, 16);
#else
unsigned long long tmp = strtoull(text, NULL, 16);
const unsigned long long tmp = strtoull(text, NULL, 16);
#endif
val = (size_t)tmp;
}

View File

@ -78,7 +78,7 @@ void CAttributes::setAttribute(const c8* attributeName, const c8* value)
//! or 0 if attribute is not set.
core::stringc CAttributes::getAttributeAsString(const c8* attributeName, const core::stringc& defaultNotFound) const
{
IAttribute* att = getAttributeP(attributeName);
const IAttribute* att = getAttributeP(attributeName);
if (att)
return att->getString();
else
@ -90,7 +90,7 @@ core::stringc CAttributes::getAttributeAsString(const c8* attributeName, const c
//! \param target: Buffer where the string is copied to.
void CAttributes::getAttributeAsString(const c8* attributeName, char* target) const
{
IAttribute* att = getAttributeP(attributeName);
const IAttribute* att = getAttributeP(attributeName);
if (att)
{
core::stringc str = att->getString();
@ -146,7 +146,7 @@ void CAttributes::setAttribute(const c8* attributeName, const wchar_t* value)
//! or 0 if attribute is not set.
core::stringw CAttributes::getAttributeAsStringW(const c8* attributeName, const core::stringw& defaultNotFound) const
{
IAttribute* att = getAttributeP(attributeName);
const IAttribute* att = getAttributeP(attributeName);
if (att)
return att->getStringW();
else
@ -158,7 +158,7 @@ core::stringw CAttributes::getAttributeAsStringW(const c8* attributeName, const
//! \param target: Buffer where the string is copied to.
void CAttributes::getAttributeAsStringW(const c8* attributeName, wchar_t* target) const
{
IAttribute* att = getAttributeP(attributeName);
const IAttribute* att = getAttributeP(attributeName);
if (att)
{
core::stringw str = att->getStringW();
@ -201,7 +201,7 @@ void CAttributes::setAttribute(const c8* attributeName, const core::array<core::
//! Gets an attribute as an array of wide strings.
core::array<core::stringw> CAttributes::getAttributeAsArray(const c8* attributeName, const core::array<core::stringw>& defaultNotFound) const
{
IAttribute* att = getAttributeP(attributeName);
const IAttribute* att = getAttributeP(attributeName);
if (att)
return att->getArray();
else
@ -268,7 +268,7 @@ void CAttributes::setAttribute(const c8* attributeName, bool value)
//! or 0 if attribute is not set.
bool CAttributes::getAttributeAsBool(const c8* attributeName, bool defaultNotFound) const
{
IAttribute* att = getAttributeP(attributeName);
const IAttribute* att = getAttributeP(attributeName);
if (att)
return att->getBool();
else
@ -293,7 +293,7 @@ void CAttributes::setAttribute(const c8* attributeName, s32 value)
//! or 0 if attribute is not set.
s32 CAttributes::getAttributeAsInt(const c8* attributeName, irr::s32 defaultNotFound) const
{
IAttribute* att = getAttributeP(attributeName);
const IAttribute* att = getAttributeP(attributeName);
if (att)
return att->getInt();
else
@ -316,7 +316,7 @@ void CAttributes::setAttribute(const c8* attributeName, f32 value)
//! or 0 if attribute is not set.
f32 CAttributes::getAttributeAsFloat(const c8* attributeName, irr::f32 defaultNotFound) const
{
IAttribute* att = getAttributeP(attributeName);
const IAttribute* att = getAttributeP(attributeName);
if (att)
return att->getFloat();
@ -338,7 +338,7 @@ void CAttributes::setAttribute(const c8* attributeName, video::SColor value)
//! \return Returns value of the attribute previously set by setAttribute()
video::SColor CAttributes::getAttributeAsColor(const c8* attributeName, const video::SColor& defaultNotFound) const
{
IAttribute* att = getAttributeP(attributeName);
const IAttribute* att = getAttributeP(attributeName);
if (att)
return att->getColor();
else
@ -360,7 +360,7 @@ void CAttributes::setAttribute(const c8* attributeName, video::SColorf value)
//! \return Returns value of the attribute previously set by setAttribute()
video::SColorf CAttributes::getAttributeAsColorf(const c8* attributeName, const video::SColorf& defaultNotFound) const
{
IAttribute* att = getAttributeP(attributeName);
const IAttribute* att = getAttributeP(attributeName);
if (att)
return att->getColorf();
else
@ -382,7 +382,7 @@ void CAttributes::setAttribute(const c8* attributeName, const core::position2di&
//! \return Returns value of the attribute previously set by setAttribute()
core::position2di CAttributes::getAttributeAsPosition2d(const c8* attributeName, const core::position2di& defaultNotFound) const
{
IAttribute* att = getAttributeP(attributeName);
const IAttribute* att = getAttributeP(attributeName);
if (att)
return att->getPosition();
else
@ -404,7 +404,7 @@ void CAttributes::setAttribute(const c8* attributeName, const core::rect<s32>& v
//! \return Returns value of the attribute previously set by setAttribute()
core::rect<s32> CAttributes::getAttributeAsRect(const c8* attributeName, const core::rect<s32>& defaultNotFound) const
{
IAttribute* att = getAttributeP(attributeName);
const IAttribute* att = getAttributeP(attributeName);
if (att)
return att->getRect();
else
@ -426,7 +426,7 @@ void CAttributes::setAttribute(const c8* attributeName, const core::dimension2d<
//! \return Returns value of the attribute previously set by setAttribute()
core::dimension2d<u32> CAttributes::getAttributeAsDimension2d(const c8* attributeName, const core::dimension2d<u32>& defaultNotFound) const
{
IAttribute* att = getAttributeP(attributeName);
const IAttribute* att = getAttributeP(attributeName);
if (att)
return att->getDimension2d();
else
@ -458,7 +458,7 @@ void CAttributes::setAttribute(const c8* attributeName, const core::vector2df& v
//! \return Returns value of the attribute previously set by setAttribute()
core::vector3df CAttributes::getAttributeAsVector3d(const c8* attributeName, const core::vector3df& defaultNotFound) const
{
IAttribute* att = getAttributeP(attributeName);
const IAttribute* att = getAttributeP(attributeName);
if (att)
return att->getVector();
else
@ -468,7 +468,7 @@ core::vector3df CAttributes::getAttributeAsVector3d(const c8* attributeName, con
//! Gets an attribute as vector
core::vector2df CAttributes::getAttributeAsVector2d(const c8* attributeName, const core::vector2df& defaultNotFound) const
{
IAttribute* att = getAttributeP(attributeName);
const IAttribute* att = getAttributeP(attributeName);
if (att)
return att->getVector2d();
else
@ -489,7 +489,7 @@ void CAttributes::setAttribute(const c8* attributeName, void* data, s32 dataSize
//! \param attributeName: Name of the attribute to get.
void CAttributes::getAttributeAsBinaryData(const c8* attributeName, void* outData, s32 maxSizeInBytes) const
{
IAttribute* att = getAttributeP(attributeName);
const IAttribute* att = getAttributeP(attributeName);
if (att)
att->getBinary(outData, maxSizeInBytes);
}
@ -509,7 +509,7 @@ void CAttributes::setAttribute(const c8* attributeName, const char* enumValue, c
//! \return Returns value of the attribute previously set by setAttribute()
const char* CAttributes::getAttributeAsEnumeration(const c8* attributeName, const c8* defaultNotFound) const
{
IAttribute* att = getAttributeP(attributeName);
const IAttribute* att = getAttributeP(attributeName);
if (att)
return att->getEnum();
else
@ -519,7 +519,7 @@ const char* CAttributes::getAttributeAsEnumeration(const c8* attributeName, cons
//! Gets an attribute as enumeration
s32 CAttributes::getAttributeAsEnumeration(const c8* attributeName, const char* const* enumerationLiteralsToUse, s32 defaultNotFound) const
{
IAttribute* att = getAttributeP(attributeName);
const IAttribute* att = getAttributeP(attributeName);
if (enumerationLiteralsToUse && att)
{
@ -539,7 +539,7 @@ s32 CAttributes::getAttributeAsEnumeration(const c8* attributeName, const char*
//! \param attributeName: Name of the attribute to get.
void CAttributes::getAttributeEnumerationLiteralsOfEnumeration(const c8* attributeName, core::array<core::stringc>& outLiterals) const
{
IAttribute* att = getAttributeP(attributeName);
const IAttribute* att = getAttributeP(attributeName);
if (att && att->getType() == EAT_ENUM)
outLiterals = ((CEnumAttribute*)att)->EnumLiterals;
@ -560,7 +560,7 @@ void CAttributes::setAttribute(const c8* attributeName, video::ITexture* value,
//! \param attributeName: Name of the attribute to get.
video::ITexture* CAttributes::getAttributeAsTexture(const c8* attributeName, video::ITexture* defaultNotFound) const
{
IAttribute* att = getAttributeP(attributeName);
const IAttribute* att = getAttributeP(attributeName);
if (att)
return att->getTexture();
else
@ -599,7 +599,7 @@ E_ATTRIBUTE_TYPE CAttributes::getAttributeType(const c8* attributeName) const
{
E_ATTRIBUTE_TYPE ret = EAT_UNKNOWN;
IAttribute* att = getAttributeP(attributeName);
const IAttribute* att = getAttributeP(attributeName);
if (att)
ret = att->getType();
@ -619,7 +619,7 @@ E_ATTRIBUTE_TYPE CAttributes::getAttributeType(s32 index) const
//! Returns the type of an attribute
const wchar_t* CAttributes::getAttributeTypeString(const c8* attributeName, const wchar_t* defaultNotFound) const
{
IAttribute* att = getAttributeP(attributeName);
const IAttribute* att = getAttributeP(attributeName);
if (att)
return att->getTypeString();
else
@ -766,7 +766,7 @@ s32 CAttributes::getAttributeAsEnumeration(s32 index, const char* const* enumera
{
if ((u32)index < Attributes.size())
{
IAttribute* att = Attributes[index];
const IAttribute* att = Attributes[index];
if (enumerationLiteralsToUse && att)
{
@ -1027,7 +1027,7 @@ void CAttributes::setAttribute(const c8* attributeName, const core::matrix4& v)
//! Gets an attribute as a matrix4
core::matrix4 CAttributes::getAttributeAsMatrix(const c8* attributeName, const core::matrix4& defaultNotFound) const
{
IAttribute* att = getAttributeP(attributeName);
const IAttribute* att = getAttributeP(attributeName);
if (att)
return att->getMatrix();
else
@ -1074,7 +1074,7 @@ void CAttributes::setAttribute(const c8* attributeName, const core::quaternion&
//! Gets an attribute as a quaternion
core::quaternion CAttributes::getAttributeAsQuaternion(const c8* attributeName, const core::quaternion& defaultNotFound) const
{
IAttribute* att = getAttributeP(attributeName);
const IAttribute* att = getAttributeP(attributeName);
if (att)
return att->getQuaternion();
else
@ -1120,7 +1120,7 @@ void CAttributes::setAttribute(const c8* attributeName, const core::aabbox3df& v
//! Gets an attribute as a axis aligned bounding box
core::aabbox3df CAttributes::getAttributeAsBox3d(const c8* attributeName, const core::aabbox3df& defaultNotFound) const
{
IAttribute* att = getAttributeP(attributeName);
const IAttribute* att = getAttributeP(attributeName);
if (att)
return att->getBBox();
else
@ -1166,7 +1166,7 @@ void CAttributes::setAttribute(const c8* attributeName, const core::plane3df& v)
//! Gets an attribute as a 3d plane
core::plane3df CAttributes::getAttributeAsPlane3d(const c8* attributeName, const core::plane3df& defaultNotFound) const
{
IAttribute* att = getAttributeP(attributeName);
const IAttribute* att = getAttributeP(attributeName);
if (att)
return att->getPlane();
else
@ -1212,7 +1212,7 @@ void CAttributes::setAttribute(const c8* attributeName, const core::triangle3df&
//! Gets an attribute as a 3d triangle
core::triangle3df CAttributes::getAttributeAsTriangle3d(const c8* attributeName, const core::triangle3df& defaultNotFound) const
{
IAttribute* att = getAttributeP(attributeName);
const IAttribute* att = getAttributeP(attributeName);
if (att)
return att->getTriangle();
else
@ -1259,7 +1259,7 @@ void CAttributes::setAttribute(const c8* attributeName, const core::line2df& v)
//! Gets an attribute as a 2d line
core::line2df CAttributes::getAttributeAsLine2d(const c8* attributeName, const core::line2df& defaultNotFound) const
{
IAttribute* att = getAttributeP(attributeName);
const IAttribute* att = getAttributeP(attributeName);
if (att)
return att->getLine2d();
else
@ -1305,7 +1305,7 @@ void CAttributes::setAttribute(const c8* attributeName, const core::line3df& v)
//! Gets an attribute as a 3d line
core::line3df CAttributes::getAttributeAsLine3d(const c8* attributeName, const core::line3df& defaultNotFound) const
{
IAttribute* att = getAttributeP(attributeName);
const IAttribute* att = getAttributeP(attributeName);
if (att)
return att->getLine3d();
else
@ -1354,7 +1354,7 @@ void CAttributes::setAttribute(const c8* attributeName, void* userPointer)
//! \param attributeName: Name of the attribute to get.
void* CAttributes::getAttributeAsUserPointer(const c8* attributeName, void* defaultNotFound) const
{
IAttribute* att = getAttributeP(attributeName);
const IAttribute* att = getAttributeP(attributeName);
if (att)
return att->getUserPointer();
else
@ -1427,7 +1427,7 @@ bool CAttributes::read(io::IXMLReader* reader, bool readCurrentElementOnly,
}
void CAttributes::readAttributeFromXML(io::IXMLReader* reader)
void CAttributes::readAttributeFromXML(const io::IXMLReader* reader)
{
#ifdef _IRR_COMPILE_WITH_XML_
core::stringw element = reader->getNodeName();
@ -1557,7 +1557,7 @@ void CAttributes::readAttributeFromXML(io::IXMLReader* reader)
{
core::array<core::stringw> tmpArray;
s32 count = reader->getAttributeValueAsInt(L"count");
const s32 count = reader->getAttributeValueAsInt(L"count");
s32 n=0;
const core::stringw tmpName(L"value");
for (; n<count; ++n)

View File

@ -722,7 +722,7 @@ public:
protected:
void readAttributeFromXML(io::IXMLReader* reader);
void readAttributeFromXML(const io::IXMLReader* reader);
core::array<IAttribute*> Attributes;

View File

@ -27,10 +27,10 @@ public:
CB3DMeshWriter();
//! Returns the type of the mesh writer
virtual EMESH_WRITER_TYPE getType() const;
virtual EMESH_WRITER_TYPE getType() const _IRR_OVERRIDE_;
//! writes a mesh
virtual bool writeMesh(io::IWriteFile* file, scene::IMesh* mesh, s32 flags=EMWF_NONE);
virtual bool writeMesh(io::IWriteFile* file, scene::IMesh* mesh, s32 flags=EMWF_NONE) _IRR_OVERRIDE_;
private:
u32 Size;

View File

@ -512,9 +512,9 @@ public:
CBurningShader_Raster_Reference(CBurningVideoDriver* driver);
//! draws an indexed triangle list
virtual void drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c );
virtual void drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c ) _IRR_OVERRIDE_;
virtual void setMaterial ( const SBurningShaderMaterial &material );
virtual void setMaterial ( const SBurningShaderMaterial &material ) _IRR_OVERRIDE_;
private:

View File

@ -143,14 +143,14 @@ namespace
//! creates an instance of this prefab
virtual scene::ISceneNode* addInstance(scene::ISceneNode* parent,
scene::ISceneManager* mgr)
scene::ISceneManager* mgr) _IRR_OVERRIDE_
{
// empty implementation
return 0;
}
//! returns id of this prefab
virtual const core::stringc& getId()
virtual const core::stringc& getId() _IRR_OVERRIDE_
{
return Id;
}
@ -177,7 +177,7 @@ namespace
//! creates an instance of this prefab
virtual scene::ISceneNode* addInstance(scene::ISceneNode* parent,
scene::ISceneManager* mgr)
scene::ISceneManager* mgr) _IRR_OVERRIDE_
{
#ifdef COLLADA_READER_DEBUG
os::Printer::log("COLLADA: Constructing light instance", Id.c_str(), ELL_DEBUG);
@ -213,7 +213,7 @@ namespace
//! creates an instance of this prefab
virtual scene::ISceneNode* addInstance(scene::ISceneNode* parent,
scene::ISceneManager* mgr)
scene::ISceneManager* mgr) _IRR_OVERRIDE_
{
#ifdef COLLADA_READER_DEBUG
os::Printer::log("COLLADA: Constructing mesh instance", Id.c_str(), ELL_DEBUG);
@ -251,7 +251,7 @@ namespace
//! creates an instance of this prefab
virtual scene::ISceneNode* addInstance(scene::ISceneNode* parent,
scene::ISceneManager* mgr)
scene::ISceneManager* mgr) _IRR_OVERRIDE_
{
#ifdef COLLADA_READER_DEBUG
os::Printer::log("COLLADA: Constructing camera instance", Id.c_str(), ELL_DEBUG);
@ -285,7 +285,7 @@ namespace
//! creates an instance of this prefab
virtual scene::ISceneNode* addInstance(scene::ISceneNode* parent,
scene::ISceneManager* mgr)
scene::ISceneManager* mgr) _IRR_OVERRIDE_
{
#ifdef COLLADA_READER_DEBUG
os::Printer::log("COLLADA: Constructing scene instance", Id.c_str(), ELL_DEBUG);

View File

@ -1491,7 +1491,7 @@ void CD3D9Driver::draw2DImage(const video::ITexture* texture,
s16 indices[6] = {0,1,2,0,2,3};
setActiveTexture(0, const_cast<video::ITexture*>(texture));
setActiveTexture(0, texture);
setRenderStates2DMode(useColor[0].getAlpha()<255 || useColor[1].getAlpha()<255 ||
useColor[2].getAlpha()<255 || useColor[3].getAlpha()<255,
@ -1528,7 +1528,7 @@ void CD3D9Driver::draw2DImageBatch(const video::ITexture* texture,
if (!texture)
return;
if (!setActiveTexture(0, const_cast<video::ITexture*>(texture)))
if (!setActiveTexture(0, texture))
return;
setRenderStates2DMode(color.getAlpha()<255, true, useAlphaChannelOfTexture);
@ -1678,7 +1678,7 @@ void CD3D9Driver::draw2DImage(const video::ITexture* texture,
if (!sourceRect.isValid())
return;
if (!setActiveTexture(0, const_cast<video::ITexture*>(texture)))
if (!setActiveTexture(0, texture))
return;
core::position2d<s32> targetPos = pos;
@ -2902,10 +2902,9 @@ bool CD3D9Driver::retrieveDevice(int numTries, int msSleepBetweenTries)
//! resets the device
bool CD3D9Driver::reset()
{
u32 i;
os::Printer::log("Resetting D3D9 device.", ELL_INFORMATION);
for (i = 0; i<RenderTargets.size(); ++i)
for (u32 i = 0; i<RenderTargets.size(); ++i)
{
if (RenderTargets[i]->getDriverType() == EDT_DIRECT3D9)
{
@ -2927,7 +2926,7 @@ bool CD3D9Driver::reset()
tex->releaseTexture();
}
}
for (i=0; i<Textures.size(); ++i)
for (u32 i=0; i<Textures.size(); ++i)
{
if (Textures[i].Surface->isRenderTarget())
{
@ -2937,7 +2936,7 @@ bool CD3D9Driver::reset()
tex->releaseTexture();
}
}
for (i=0; i<OcclusionQueries.size(); ++i)
for (u32 i=0; i<OcclusionQueries.size(); ++i)
{
if (OcclusionQueries[i].PID)
{
@ -3017,12 +3016,12 @@ bool CD3D9Driver::reset()
}
// restore RTTs
for (i=0; i<Textures.size(); ++i)
for (u32 i=0; i<Textures.size(); ++i)
{
if (Textures[i].Surface->isRenderTarget())
((CD3D9Texture*)(Textures[i].Surface))->generateRenderTarget();
}
for (i = 0; i<RenderTargets.size(); ++i)
for (u32 i = 0; i<RenderTargets.size(); ++i)
{
if (RenderTargets[i]->getDriverType() == EDT_DIRECT3D9)
{
@ -3046,7 +3045,7 @@ bool CD3D9Driver::reset()
}
// restore occlusion queries
for (i=0; i<OcclusionQueries.size(); ++i)
for (u32 i=0; i<OcclusionQueries.size(); ++i)
{
pID3DDevice->CreateQuery(D3DQUERYTYPE_OCCLUSION, reinterpret_cast<IDirect3DQuery9**>(&OcclusionQueries[i].PID));
}
@ -3224,7 +3223,7 @@ s32 CD3D9Driver::addHighLevelShaderMaterial(
scene::E_PRIMITIVE_TYPE inType, scene::E_PRIMITIVE_TYPE outType,
u32 verticesOut,
IShaderConstantSetCallBack* callback,
E_MATERIAL_TYPE baseMaterial, s32 userData, E_GPU_SHADING_LANGUAGE shadingLang)
E_MATERIAL_TYPE baseMaterial, s32 userData)
{
s32 nr = -1;

View File

@ -364,7 +364,7 @@ namespace video
//! vertex shaders to render geometry.
s32 addShaderMaterial(const c8* vertexShaderProgram, const c8* pixelShaderProgram,
IShaderConstantSetCallBack* callback,
E_MATERIAL_TYPE baseMaterial, s32 userData);
E_MATERIAL_TYPE baseMaterial, s32 userData) _IRR_OVERRIDE_;
//! Adds a new material renderer to the VideoDriver, based on a high level shading
//! language.
@ -383,8 +383,7 @@ namespace video
u32 verticesOut = 0,
IShaderConstantSetCallBack* callback = 0,
E_MATERIAL_TYPE baseMaterial = video::EMT_SOLID,
s32 userData = 0,
E_GPU_SHADING_LANGUAGE shadingLang = EGSL_DEFAULT) _IRR_OVERRIDE_;
s32 userData = 0) _IRR_OVERRIDE_;
void createMaterialRenderers();

View File

@ -56,7 +56,7 @@ public:
//! Int interface for the above.
virtual bool setVariable(bool vertexShader, s32 index, const s32* ints, int count);
bool OnRender(IMaterialRendererServices* service, E_VERTEX_TYPE vtxtype);
bool OnRender(IMaterialRendererServices* service, E_VERTEX_TYPE vtxtype) _IRR_OVERRIDE_;
protected:

View File

@ -51,136 +51,138 @@ namespace irr
void CD3D9RenderTarget::setTexture(const core::array<ITexture*>& texture, ITexture* depthStencil, const core::array<E_CUBE_SURFACE>& cubeSurfaces)
{
bool textureUpdate = (Texture != texture) || (CubeSurfaces != cubeSurfaces) ? true : false;
bool depthStencilUpdate = (DepthStencil != depthStencil) ? true : false;
bool needSizeUpdate = false;
if (textureUpdate || depthStencilUpdate)
// Set color attachments.
if ((Texture != texture) || (CubeSurfaces != cubeSurfaces))
{
// Set color attachments.
needSizeUpdate = true;
CubeSurfaces = cubeSurfaces;
if (textureUpdate)
if (texture.size() > Driver->ActiveRenderTarget.size())
{
CubeSurfaces = cubeSurfaces;
core::stringc message = "This GPU supports up to ";
message += Driver->ActiveRenderTarget.size();
message += " textures per render target.";
if (texture.size() > Driver->ActiveRenderTarget.size())
{
core::stringc message = "This GPU supports up to ";
message += Driver->ActiveRenderTarget.size();
message += " textures per render target.";
os::Printer::log(message.c_str(), ELL_WARNING);
}
const u32 size = core::min_(texture.size(), static_cast<u32>(Driver->ActiveRenderTarget.size()));
for (u32 i = 0; i < Surface.size(); ++i)
{
if (Surface[i])
Surface[i]->Release();
}
Surface.set_used(size);
for (u32 i = 0; i < Texture.size(); ++i)
{
if (Texture[i])
Texture[i]->drop();
}
Texture.set_used(size);
for (u32 i = 0; i < size; ++i)
{
CD3D9Texture* currentTexture = (texture[i] && texture[i]->getDriverType() == DriverType) ? static_cast<CD3D9Texture*>(texture[i]) : 0;
IDirect3DTexture9* textureID = 0;
IDirect3DCubeTexture9* cubeTextureId = 0;
UINT level = 0; // no support for rendering to to other mip-levels so far
if (currentTexture)
{
if (currentTexture->getType() == ETT_2D)
textureID = currentTexture->getDX9Texture();
else if ( currentTexture->getType() == ETT_CUBEMAP )
cubeTextureId = currentTexture->getDX9CubeTexture();
}
if (textureID)
{
Texture[i] = texture[i];
Texture[i]->grab();
IDirect3DSurface9* currentSurface = 0;
textureID->GetSurfaceLevel(level, &currentSurface);
Surface[i] = currentSurface;
}
else if ( cubeTextureId )
{
Texture[i] = texture[i];
Texture[i]->grab();
IDirect3DSurface9* currentSurface = 0;
D3DCUBEMAP_FACES face = (D3DCUBEMAP_FACES)CubeSurfaces[i]; // we use same numbering
cubeTextureId->GetCubeMapSurface(face, level, &currentSurface);
Surface[i] = currentSurface;
}
else
{
Surface[i] = 0;
Texture[i] = 0;
}
}
os::Printer::log(message.c_str(), ELL_WARNING);
}
// Set depth and stencil attachments.
const u32 size = core::min_(texture.size(), static_cast<u32>(Driver->ActiveRenderTarget.size()));
if (depthStencilUpdate)
for (u32 i = 0; i < Surface.size(); ++i)
{
if (DepthStencilSurface)
{
DepthStencilSurface->Release();
DepthStencilSurface = 0;
}
if (Surface[i])
Surface[i]->Release();
}
if (DepthStencil)
{
DepthStencil->drop();
DepthStencil = 0;
Surface.set_used(size);
DepthStencilSurface = 0;
}
for (u32 i = 0; i < Texture.size(); ++i)
{
if (Texture[i])
Texture[i]->drop();
}
CD3D9Texture* currentTexture = (depthStencil && depthStencil->getDriverType() == DriverType) ? static_cast<CD3D9Texture*>(depthStencil) : 0;
Texture.set_used(size);
for (u32 i = 0; i < size; ++i)
{
CD3D9Texture* currentTexture = (texture[i] && texture[i]->getDriverType() == DriverType) ? static_cast<CD3D9Texture*>(texture[i]) : 0;
IDirect3DTexture9* textureID = 0;
IDirect3DCubeTexture9* cubeTextureId = 0;
UINT level = 0; // no support for rendering to to other mip-levels so far
if (currentTexture)
{
if (currentTexture->getType() == ETT_2D)
textureID = currentTexture->getDX9Texture();
else
os::Printer::log("This driver doesn't support depth/stencil to cubemaps.", ELL_WARNING);
else if ( currentTexture->getType() == ETT_CUBEMAP )
cubeTextureId = currentTexture->getDX9CubeTexture();
}
if (textureID)
{
const ECOLOR_FORMAT textureFormat = (depthStencil) ? depthStencil->getColorFormat() : ECF_UNKNOWN;
Texture[i] = texture[i];
Texture[i]->grab();
if (IImage::isDepthFormat(textureFormat))
{
DepthStencil = depthStencil;
DepthStencil->grab();
IDirect3DSurface9* currentSurface = 0;
textureID->GetSurfaceLevel(level, &currentSurface);
IDirect3DSurface9* currentSurface = 0;
textureID->GetSurfaceLevel(0, &currentSurface);
Surface[i] = currentSurface;
}
else if ( cubeTextureId )
{
Texture[i] = texture[i];
Texture[i]->grab();
DepthStencilSurface = currentSurface;
}
IDirect3DSurface9* currentSurface = 0;
D3DCUBEMAP_FACES face = (D3DCUBEMAP_FACES)CubeSurfaces[i]; // we use same numbering
cubeTextureId->GetCubeMapSurface(face, level, &currentSurface);
Surface[i] = currentSurface;
}
else
{
Surface[i] = 0;
Texture[i] = 0;
}
}
}
// Set depth and stencil attachments.
if (DepthStencil != depthStencil)
{
if (DepthStencilSurface)
{
DepthStencilSurface->Release();
DepthStencilSurface = 0;
}
if (DepthStencil)
{
DepthStencil->drop();
DepthStencil = 0;
DepthStencilSurface = 0;
}
needSizeUpdate = true;
CD3D9Texture* currentTexture = (depthStencil && depthStencil->getDriverType() == DriverType) ? static_cast<CD3D9Texture*>(depthStencil) : 0;
if (currentTexture)
{
if (currentTexture->getType() == ETT_2D)
{
IDirect3DTexture9* textureID = currentTexture->getDX9Texture();
if (textureID)
{
const ECOLOR_FORMAT textureFormat = depthStencil->getColorFormat();
if (IImage::isDepthFormat(textureFormat))
{
DepthStencil = depthStencil;
DepthStencil->grab();
IDirect3DSurface9* currentSurface = 0;
textureID->GetSurfaceLevel(0, &currentSurface);
DepthStencilSurface = currentSurface;
}
else
{
os::Printer::log("Ignoring depth/stencil texture without depth color format.", ELL_WARNING);
}
}
}
else
os::Printer::log("This driver doesn't support depth/stencil to cubemaps.", ELL_WARNING);
}
}
if (needSizeUpdate)
{
// Set size required for a viewport.
bool sizeDetected = false;

View File

@ -289,12 +289,12 @@ bool CGUIContextMenu::OnEvent(const SEvent& event)
{
setEventParent(p);
SEvent event;
event.EventType = EET_GUI_EVENT;
event.GUIEvent.Caller = this;
event.GUIEvent.Element = 0;
event.GUIEvent.EventType = EGET_ELEMENT_CLOSED;
if ( !p->OnEvent(event) )
SEvent eventClose;
eventClose.EventType = EET_GUI_EVENT;
eventClose.GUIEvent.Caller = this;
eventClose.GUIEvent.Element = 0;
eventClose.GUIEvent.EventType = EGET_ELEMENT_CLOSED;
if ( !p->OnEvent(eventClose) )
{
if ( CloseHandling & ECMC_HIDE )
{

View File

@ -1472,10 +1472,7 @@ void CGUIEditBox::calculateScrollPos()
if (!AutoScroll)
return;
IGUISkin* skin = Environment->getSkin();
if (!skin)
return;
IGUIFont* font = OverrideFont ? OverrideFont : skin->getFont();
IGUIFont* font = getActiveFont();
if (!font)
return;
@ -1489,10 +1486,6 @@ void CGUIEditBox::calculateScrollPos()
// NOTE: Calculations different to vertical scrolling because setTextRect interprets VAlign relative to line but HAlign not relative to row
{
// get cursor position
IGUIFont* font = getActiveFont();
if (!font)
return;
// get cursor area
irr::u32 cursorWidth = font->getDimension(CursorChar.c_str()).Width;
core::stringw *txtLine = hasBrokenText ? &BrokenText[cursLine] : &Text;

View File

@ -113,11 +113,11 @@ void CGUIProfiler::updateDisplay()
{
for ( u32 i=1; i<Profiler->getGroupCount(); ++i )
{
const SProfileData& groupData = Profiler->getGroupData(i);
if ( groupData.getCallsCounter() >= MinCalls )
const SProfileData& groupDataOv = Profiler->getGroupData(i);
if (groupDataOv.getCallsCounter() >= MinCalls )
{
rowIndex = DisplayTable->addRow(rowIndex);
fillRow(rowIndex, groupData, false, false);
fillRow(rowIndex, groupDataOv, false, false);
++rowIndex;
}
}

View File

@ -19,44 +19,44 @@ class CGeometryCreator : public IGeometryCreator
{
void addToBuffer(const video::S3DVertex& v, SMeshBuffer* Buffer) const;
public:
IMesh* createCubeMesh(const core::vector3df& size) const;
virtual IMesh* createCubeMesh(const core::vector3df& size) const _IRR_OVERRIDE_;
IMesh* createHillPlaneMesh(
virtual IMesh* createHillPlaneMesh(
const core::dimension2d<f32>& tileSize, const core::dimension2d<u32>& tileCount,
video::SMaterial* material, f32 hillHeight, const core::dimension2d<f32>& countHills,
const core::dimension2d<f32>& textureRepeatCount) const;
const core::dimension2d<f32>& textureRepeatCount) const _IRR_OVERRIDE_;
IMesh* createGeoplaneMesh(f32 radius, u32 rows, u32 columns) const;
virtual IMesh* createGeoplaneMesh(f32 radius, u32 rows, u32 columns) const _IRR_OVERRIDE_;
IMesh* createTerrainMesh(video::IImage* texture,
virtual IMesh* createTerrainMesh(video::IImage* texture,
video::IImage* heightmap, const core::dimension2d<f32>& stretchSize,
f32 maxHeight, video::IVideoDriver* driver,
const core::dimension2d<u32>& defaultVertexBlockSize,
bool debugBorders=false) const;
bool debugBorders=false) const _IRR_OVERRIDE_;
IMesh* createArrowMesh(const u32 tesselationCylinder,
virtual IMesh* createArrowMesh(const u32 tesselationCylinder,
const u32 tesselationCone, const f32 height,
const f32 cylinderHeight, const f32 width0,
const f32 width1, const video::SColor vtxColor0,
const video::SColor vtxColor1) const;
const video::SColor vtxColor1) const _IRR_OVERRIDE_;
IMesh* createSphereMesh(f32 radius, u32 polyCountX, u32 polyCountY) const;
virtual IMesh* createSphereMesh(f32 radius, u32 polyCountX, u32 polyCountY) const _IRR_OVERRIDE_;
IMesh* createCylinderMesh(f32 radius, f32 length, u32 tesselation,
virtual IMesh* createCylinderMesh(f32 radius, f32 length, u32 tesselation,
const video::SColor& color=0xffffffff,
bool closeTop=true, f32 oblique=0.f) const;
bool closeTop=true, f32 oblique=0.f) const _IRR_OVERRIDE_;
IMesh* createConeMesh(f32 radius, f32 length, u32 tesselation,
virtual IMesh* createConeMesh(f32 radius, f32 length, u32 tesselation,
const video::SColor& colorTop=0xffffffff,
const video::SColor& colorBottom=0xffffffff,
f32 oblique=0.f) const;
f32 oblique=0.f) const _IRR_OVERRIDE_;
IMesh* createVolumeLightMesh(
virtual IMesh* createVolumeLightMesh(
const u32 subdivideU=32, const u32 subdivideV=32,
const video::SColor footColor=0xffffffff,
const video::SColor tailColor=0xffffffff,
const f32 lpDistance = 8.f,
const core::vector3df& lightDim = core::vector3df(1.f,1.2f,1.f)) const;
const core::vector3df& lightDim = core::vector3df(1.f,1.2f,1.f)) const _IRR_OVERRIDE_;
};

View File

@ -39,13 +39,13 @@ struct SPVRHeader
class CImageLoaderPVR : public IImageLoader
{
public:
virtual bool isALoadableFileExtension(const io::path& filename) const;
virtual bool isALoadableFileExtension(const io::path& filename) const _IRR_OVERRIDE_;
virtual bool isALoadableFileFormat(io::IReadFile* file) const;
virtual bool isALoadableFileFormat(io::IReadFile* file) const _IRR_OVERRIDE_;
virtual IImage* loadImage(io::IReadFile* file) const;
virtual IImage* loadImage(io::IReadFile* file) const _IRR_OVERRIDE_;
virtual core::array<IImage*> loadImages(io::IReadFile* file, E_TEXTURE_TYPE* type) const;
virtual core::array<IImage*> loadImages(io::IReadFile* file, E_TEXTURE_TYPE* type) const _IRR_OVERRIDE_;
};
}

View File

@ -297,22 +297,22 @@ namespace
{
struct SDefaultRandomizer : public IRandomizer
{
virtual void reset(s32 value=0x0f0f0f0f)
virtual void reset(s32 value=0x0f0f0f0f) _IRR_OVERRIDE_
{
os::Randomizer::reset(value);
}
virtual s32 rand() const
virtual s32 rand() const _IRR_OVERRIDE_
{
return os::Randomizer::rand();
}
virtual f32 frand() const
virtual f32 frand() const _IRR_OVERRIDE_
{
return os::Randomizer::frand();
}
virtual s32 randMax() const
virtual s32 randMax() const _IRR_OVERRIDE_
{
return os::Randomizer::randMax();
}

View File

@ -171,8 +171,7 @@ IAnimatedMesh* CLWOMeshFileLoader::createMesh(io::IReadFile* file)
os::Printer::log("LWO loader: Creating geometry.");
os::Printer::log("LWO loader: Assigning UV maps.");
#endif
u32 i;
for (i=0; i<Materials.size(); ++i)
for (u32 i=0; i<Materials.size(); ++i)
{
u16 uvTag;
for (u32 j=0; j<2; ++j) // max 2 texture coords
@ -206,11 +205,11 @@ IAnimatedMesh* CLWOMeshFileLoader::createMesh(io::IReadFile* file)
{
core::array<u32> vertexCount;
vertexCount.reallocate(Materials.size());
for (i=0; i<Materials.size(); ++i)
for (u32 i=0; i<Materials.size(); ++i)
vertexCount.push_back(0);
for (u32 polyIndex=0; polyIndex<Indices.size(); ++polyIndex)
vertexCount[MaterialMapping[polyIndex]] += Indices[polyIndex].size();
for (i=0; i<Materials.size(); ++i)
for (u32 i=0; i<Materials.size(); ++i)
{
Materials[i]->Meshbuffer->Vertices.reallocate(vertexCount[i]);
Materials[i]->Meshbuffer->Indices.reallocate(vertexCount[i]);

View File

@ -2385,7 +2385,7 @@ s32 CNullDriver::addHighLevelShaderMaterial(
u32 verticesOut,
IShaderConstantSetCallBack* callback,
E_MATERIAL_TYPE baseMaterial,
s32 userData, E_GPU_SHADING_LANGUAGE shadingLang)
s32 userData)
{
os::Printer::log("High level shader materials not available (yet) in this driver, sorry");
return -1;
@ -2408,7 +2408,7 @@ s32 CNullDriver::addHighLevelShaderMaterialFromFiles(
u32 verticesOut,
IShaderConstantSetCallBack* callback,
E_MATERIAL_TYPE baseMaterial,
s32 userData, E_GPU_SHADING_LANGUAGE shadingLang)
s32 userData)
{
io::IReadFile* vsfile = 0;
io::IReadFile* psfile = 0;
@ -2449,7 +2449,7 @@ s32 CNullDriver::addHighLevelShaderMaterialFromFiles(
psfile, pixelShaderEntryPointName, psCompileTarget,
gsfile, geometryShaderEntryPointName, gsCompileTarget,
inType, outType, verticesOut,
callback, baseMaterial, userData, shadingLang);
callback, baseMaterial, userData);
if (psfile)
psfile->drop();
@ -2480,7 +2480,7 @@ s32 CNullDriver::addHighLevelShaderMaterialFromFiles(
u32 verticesOut,
IShaderConstantSetCallBack* callback,
E_MATERIAL_TYPE baseMaterial,
s32 userData, E_GPU_SHADING_LANGUAGE shadingLang)
s32 userData)
{
c8* vs = 0;
c8* ps = 0;
@ -2531,7 +2531,7 @@ s32 CNullDriver::addHighLevelShaderMaterialFromFiles(
ps, pixelShaderEntryPointName, psCompileTarget,
gs, geometryShaderEntryPointName, gsCompileTarget,
inType, outType, verticesOut,
callback, baseMaterial, userData, shadingLang);
callback, baseMaterial, userData);
delete [] vs;
delete [] ps;

View File

@ -561,7 +561,7 @@ namespace video
u32 verticesOut = 0,
IShaderConstantSetCallBack* callback = 0,
E_MATERIAL_TYPE baseMaterial = video::EMT_SOLID,
s32 userData = 0, E_GPU_SHADING_LANGUAGE shadingLang = EGSL_DEFAULT) _IRR_OVERRIDE_;
s32 userData = 0) _IRR_OVERRIDE_;
//! Like IGPUProgrammingServices::addShaderMaterial() (look there for a detailed description),
//! but tries to load the programs from files.
@ -580,7 +580,7 @@ namespace video
u32 verticesOut = 0,
IShaderConstantSetCallBack* callback = 0,
E_MATERIAL_TYPE baseMaterial = video::EMT_SOLID,
s32 userData = 0, E_GPU_SHADING_LANGUAGE shadingLang = EGSL_DEFAULT) _IRR_OVERRIDE_;
s32 userData = 0) _IRR_OVERRIDE_;
//! Like IGPUProgrammingServices::addShaderMaterial() (look there for a detailed description),
//! but tries to load the programs from files.
@ -599,7 +599,7 @@ namespace video
u32 verticesOut = 0,
IShaderConstantSetCallBack* callback = 0,
E_MATERIAL_TYPE baseMaterial = video::EMT_SOLID,
s32 userData = 0, E_GPU_SHADING_LANGUAGE shadingLang = EGSL_DEFAULT) _IRR_OVERRIDE_;
s32 userData = 0) _IRR_OVERRIDE_;
//! Returns a pointer to the mesh manipulator.
virtual scene::IMeshManipulator* getMeshManipulator() _IRR_OVERRIDE_;

View File

@ -259,115 +259,115 @@ COGLES2Driver::~COGLES2Driver()
core::stringc FragmentShader = OGLES2ShaderPath + "COGLES2Solid.fsh";
addHighLevelShaderMaterialFromFiles(VertexShader, "main", EVST_VS_2_0, FragmentShader, "main", EPST_PS_2_0, "", "main",
EGST_GS_4_0, scene::EPT_TRIANGLES, scene::EPT_TRIANGLE_STRIP, 0, SolidCB, EMT_SOLID, 0, EGSL_DEFAULT);
EGST_GS_4_0, scene::EPT_TRIANGLES, scene::EPT_TRIANGLE_STRIP, 0, SolidCB, EMT_SOLID, 0);
VertexShader = OGLES2ShaderPath + "COGLES2Solid2.vsh";
FragmentShader = OGLES2ShaderPath + "COGLES2Solid2Layer.fsh";
addHighLevelShaderMaterialFromFiles(VertexShader, "main", EVST_VS_2_0, FragmentShader, "main", EPST_PS_2_0, "", "main",
EGST_GS_4_0, scene::EPT_TRIANGLES, scene::EPT_TRIANGLE_STRIP, 0, Solid2LayerCB, EMT_SOLID, 0, EGSL_DEFAULT);
EGST_GS_4_0, scene::EPT_TRIANGLES, scene::EPT_TRIANGLE_STRIP, 0, Solid2LayerCB, EMT_SOLID, 0);
VertexShader = OGLES2ShaderPath + "COGLES2Solid2.vsh";
FragmentShader = OGLES2ShaderPath + "COGLES2LightmapModulate.fsh";
addHighLevelShaderMaterialFromFiles(VertexShader, "main", EVST_VS_2_0, FragmentShader, "main", EPST_PS_2_0, "", "main",
EGST_GS_4_0, scene::EPT_TRIANGLES, scene::EPT_TRIANGLE_STRIP, 0, LightmapCB, EMT_SOLID, 0, EGSL_DEFAULT);
EGST_GS_4_0, scene::EPT_TRIANGLES, scene::EPT_TRIANGLE_STRIP, 0, LightmapCB, EMT_SOLID, 0);
FragmentShader = OGLES2ShaderPath + "COGLES2LightmapAdd.fsh";
addHighLevelShaderMaterialFromFiles(VertexShader, "main", EVST_VS_2_0, FragmentShader, "main", EPST_PS_2_0, "", "main",
EGST_GS_4_0, scene::EPT_TRIANGLES, scene::EPT_TRIANGLE_STRIP, 0, LightmapAddCB, EMT_SOLID, 0, EGSL_DEFAULT);
EGST_GS_4_0, scene::EPT_TRIANGLES, scene::EPT_TRIANGLE_STRIP, 0, LightmapAddCB, EMT_SOLID, 0);
FragmentShader = OGLES2ShaderPath + "COGLES2LightmapModulate.fsh";
addHighLevelShaderMaterialFromFiles(VertexShader, "main", EVST_VS_2_0, FragmentShader, "main", EPST_PS_2_0, "", "main",
EGST_GS_4_0, scene::EPT_TRIANGLES, scene::EPT_TRIANGLE_STRIP, 0, LightmapM2CB, EMT_SOLID, 0, EGSL_DEFAULT);
EGST_GS_4_0, scene::EPT_TRIANGLES, scene::EPT_TRIANGLE_STRIP, 0, LightmapM2CB, EMT_SOLID, 0);
addHighLevelShaderMaterialFromFiles(VertexShader, "main", EVST_VS_2_0, FragmentShader, "main", EPST_PS_2_0, "", "main",
EGST_GS_4_0, scene::EPT_TRIANGLES, scene::EPT_TRIANGLE_STRIP, 0, LightmapM4CB, EMT_SOLID, 0, EGSL_DEFAULT);
EGST_GS_4_0, scene::EPT_TRIANGLES, scene::EPT_TRIANGLE_STRIP, 0, LightmapM4CB, EMT_SOLID, 0);
addHighLevelShaderMaterialFromFiles(VertexShader, "main", EVST_VS_2_0, FragmentShader, "main", EPST_PS_2_0, "", "main",
EGST_GS_4_0, scene::EPT_TRIANGLES, scene::EPT_TRIANGLE_STRIP, 0, LightmapLightingCB, EMT_SOLID, 0, EGSL_DEFAULT);
EGST_GS_4_0, scene::EPT_TRIANGLES, scene::EPT_TRIANGLE_STRIP, 0, LightmapLightingCB, EMT_SOLID, 0);
addHighLevelShaderMaterialFromFiles(VertexShader, "main", EVST_VS_2_0, FragmentShader, "main", EPST_PS_2_0, "", "main",
EGST_GS_4_0, scene::EPT_TRIANGLES, scene::EPT_TRIANGLE_STRIP, 0, LightmapLightingM2CB, EMT_SOLID, 0, EGSL_DEFAULT);
EGST_GS_4_0, scene::EPT_TRIANGLES, scene::EPT_TRIANGLE_STRIP, 0, LightmapLightingM2CB, EMT_SOLID, 0);
addHighLevelShaderMaterialFromFiles(VertexShader, "main", EVST_VS_2_0, FragmentShader, "main", EPST_PS_2_0, "", "main",
EGST_GS_4_0, scene::EPT_TRIANGLES, scene::EPT_TRIANGLE_STRIP, 0, LightmapLightingM4CB, EMT_SOLID, 0, EGSL_DEFAULT);
EGST_GS_4_0, scene::EPT_TRIANGLES, scene::EPT_TRIANGLE_STRIP, 0, LightmapLightingM4CB, EMT_SOLID, 0);
VertexShader = OGLES2ShaderPath + "COGLES2Solid2.vsh";
FragmentShader = OGLES2ShaderPath + "COGLES2DetailMap.fsh";
addHighLevelShaderMaterialFromFiles(VertexShader, "main", EVST_VS_2_0, FragmentShader, "main", EPST_PS_2_0, "", "main",
EGST_GS_4_0, scene::EPT_TRIANGLES, scene::EPT_TRIANGLE_STRIP, 0, DetailMapCB, EMT_SOLID, 0, EGSL_DEFAULT);
EGST_GS_4_0, scene::EPT_TRIANGLES, scene::EPT_TRIANGLE_STRIP, 0, DetailMapCB, EMT_SOLID, 0);
VertexShader = OGLES2ShaderPath + "COGLES2SphereMap.vsh";
FragmentShader = OGLES2ShaderPath + "COGLES2SphereMap.fsh";
addHighLevelShaderMaterialFromFiles(VertexShader, "main", EVST_VS_2_0, FragmentShader, "main", EPST_PS_2_0, "", "main",
EGST_GS_4_0, scene::EPT_TRIANGLES, scene::EPT_TRIANGLE_STRIP, 0, SphereMapCB, EMT_SOLID, 0, EGSL_DEFAULT);
EGST_GS_4_0, scene::EPT_TRIANGLES, scene::EPT_TRIANGLE_STRIP, 0, SphereMapCB, EMT_SOLID, 0);
VertexShader = OGLES2ShaderPath + "COGLES2Reflection2Layer.vsh";
FragmentShader = OGLES2ShaderPath + "COGLES2Reflection2Layer.fsh";
addHighLevelShaderMaterialFromFiles(VertexShader, "main", EVST_VS_2_0, FragmentShader, "main", EPST_PS_2_0, "", "main",
EGST_GS_4_0, scene::EPT_TRIANGLES, scene::EPT_TRIANGLE_STRIP, 0, Reflection2LayerCB, EMT_SOLID, 0, EGSL_DEFAULT);
EGST_GS_4_0, scene::EPT_TRIANGLES, scene::EPT_TRIANGLE_STRIP, 0, Reflection2LayerCB, EMT_SOLID, 0);
VertexShader = OGLES2ShaderPath + "COGLES2Solid.vsh";
FragmentShader = OGLES2ShaderPath + "COGLES2Solid.fsh";
addHighLevelShaderMaterialFromFiles(VertexShader, "main", EVST_VS_2_0, FragmentShader, "main", EPST_PS_2_0, "", "main",
EGST_GS_4_0, scene::EPT_TRIANGLES, scene::EPT_TRIANGLE_STRIP, 0, TransparentAddColorCB, EMT_TRANSPARENT_ADD_COLOR, 0, EGSL_DEFAULT);
EGST_GS_4_0, scene::EPT_TRIANGLES, scene::EPT_TRIANGLE_STRIP, 0, TransparentAddColorCB, EMT_TRANSPARENT_ADD_COLOR, 0);
FragmentShader = OGLES2ShaderPath + "COGLES2TransparentAlphaChannel.fsh";
addHighLevelShaderMaterialFromFiles(VertexShader, "main", EVST_VS_2_0, FragmentShader, "main", EPST_PS_2_0, "", "main",
EGST_GS_4_0, scene::EPT_TRIANGLES, scene::EPT_TRIANGLE_STRIP, 0, TransparentAlphaChannelCB, EMT_TRANSPARENT_ALPHA_CHANNEL, 0, EGSL_DEFAULT);
EGST_GS_4_0, scene::EPT_TRIANGLES, scene::EPT_TRIANGLE_STRIP, 0, TransparentAlphaChannelCB, EMT_TRANSPARENT_ALPHA_CHANNEL, 0);
FragmentShader = OGLES2ShaderPath + "COGLES2TransparentAlphaChannelRef.fsh";
addHighLevelShaderMaterialFromFiles(VertexShader, "main", EVST_VS_2_0, FragmentShader, "main", EPST_PS_2_0, "", "main",
EGST_GS_4_0, scene::EPT_TRIANGLES, scene::EPT_TRIANGLE_STRIP, 0, TransparentAlphaChannelRefCB, EMT_SOLID, 0, EGSL_DEFAULT);
EGST_GS_4_0, scene::EPT_TRIANGLES, scene::EPT_TRIANGLE_STRIP, 0, TransparentAlphaChannelRefCB, EMT_SOLID, 0);
FragmentShader = OGLES2ShaderPath + "COGLES2TransparentVertexAlpha.fsh";
addHighLevelShaderMaterialFromFiles(VertexShader, "main", EVST_VS_2_0, FragmentShader, "main", EPST_PS_2_0, "", "main",
EGST_GS_4_0, scene::EPT_TRIANGLES, scene::EPT_TRIANGLE_STRIP, 0, TransparentVertexAlphaCB, EMT_TRANSPARENT_ALPHA_CHANNEL, 0, EGSL_DEFAULT);
EGST_GS_4_0, scene::EPT_TRIANGLES, scene::EPT_TRIANGLE_STRIP, 0, TransparentVertexAlphaCB, EMT_TRANSPARENT_ALPHA_CHANNEL, 0);
VertexShader = OGLES2ShaderPath + "COGLES2Reflection2Layer.vsh";
FragmentShader = OGLES2ShaderPath + "COGLES2Reflection2Layer.fsh";
addHighLevelShaderMaterialFromFiles(VertexShader, "main", EVST_VS_2_0, FragmentShader, "main", EPST_PS_2_0, "", "main",
EGST_GS_4_0, scene::EPT_TRIANGLES, scene::EPT_TRIANGLE_STRIP, 0, TransparentReflection2LayerCB, EMT_TRANSPARENT_ALPHA_CHANNEL, 0, EGSL_DEFAULT);
EGST_GS_4_0, scene::EPT_TRIANGLES, scene::EPT_TRIANGLE_STRIP, 0, TransparentReflection2LayerCB, EMT_TRANSPARENT_ALPHA_CHANNEL, 0);
VertexShader = OGLES2ShaderPath + "COGLES2NormalMap.vsh";
FragmentShader = OGLES2ShaderPath + "COGLES2NormalMap.fsh";
addHighLevelShaderMaterialFromFiles(VertexShader, "main", EVST_VS_2_0, FragmentShader, "main", EPST_PS_2_0, "", "main",
EGST_GS_4_0, scene::EPT_TRIANGLES, scene::EPT_TRIANGLE_STRIP, 0, NormalMapCB, EMT_SOLID, 0, EGSL_DEFAULT);
EGST_GS_4_0, scene::EPT_TRIANGLES, scene::EPT_TRIANGLE_STRIP, 0, NormalMapCB, EMT_SOLID, 0);
addHighLevelShaderMaterialFromFiles(VertexShader, "main", EVST_VS_2_0, FragmentShader, "main", EPST_PS_2_0, "", "main",
EGST_GS_4_0, scene::EPT_TRIANGLES, scene::EPT_TRIANGLE_STRIP, 0, NormalMapAddColorCB, EMT_TRANSPARENT_ADD_COLOR, 0, EGSL_DEFAULT);
EGST_GS_4_0, scene::EPT_TRIANGLES, scene::EPT_TRIANGLE_STRIP, 0, NormalMapAddColorCB, EMT_TRANSPARENT_ADD_COLOR, 0);
addHighLevelShaderMaterialFromFiles(VertexShader, "main", EVST_VS_2_0, FragmentShader, "main", EPST_PS_2_0, "", "main",
EGST_GS_4_0, scene::EPT_TRIANGLES, scene::EPT_TRIANGLE_STRIP, 0, NormalMapVertexAlphaCB, EMT_TRANSPARENT_ALPHA_CHANNEL, 0, EGSL_DEFAULT);
EGST_GS_4_0, scene::EPT_TRIANGLES, scene::EPT_TRIANGLE_STRIP, 0, NormalMapVertexAlphaCB, EMT_TRANSPARENT_ALPHA_CHANNEL, 0);
VertexShader = OGLES2ShaderPath + "COGLES2ParallaxMap.vsh";
FragmentShader = OGLES2ShaderPath + "COGLES2ParallaxMap.fsh";
addHighLevelShaderMaterialFromFiles(VertexShader, "main", EVST_VS_2_0, FragmentShader, "main", EPST_PS_2_0, "", "main",
EGST_GS_4_0, scene::EPT_TRIANGLES, scene::EPT_TRIANGLE_STRIP, 0, ParallaxMapCB, EMT_SOLID, 0, EGSL_DEFAULT);
EGST_GS_4_0, scene::EPT_TRIANGLES, scene::EPT_TRIANGLE_STRIP, 0, ParallaxMapCB, EMT_SOLID, 0);
addHighLevelShaderMaterialFromFiles(VertexShader, "main", EVST_VS_2_0, FragmentShader, "main", EPST_PS_2_0, "", "main",
EGST_GS_4_0, scene::EPT_TRIANGLES, scene::EPT_TRIANGLE_STRIP, 0, ParallaxMapAddColorCB, EMT_TRANSPARENT_ADD_COLOR, 0, EGSL_DEFAULT);
EGST_GS_4_0, scene::EPT_TRIANGLES, scene::EPT_TRIANGLE_STRIP, 0, ParallaxMapAddColorCB, EMT_TRANSPARENT_ADD_COLOR, 0);
addHighLevelShaderMaterialFromFiles(VertexShader, "main", EVST_VS_2_0, FragmentShader, "main", EPST_PS_2_0, "", "main",
EGST_GS_4_0, scene::EPT_TRIANGLES, scene::EPT_TRIANGLE_STRIP, 0, ParallaxMapVertexAlphaCB, EMT_TRANSPARENT_ALPHA_CHANNEL, 0, EGSL_DEFAULT);
EGST_GS_4_0, scene::EPT_TRIANGLES, scene::EPT_TRIANGLE_STRIP, 0, ParallaxMapVertexAlphaCB, EMT_TRANSPARENT_ALPHA_CHANNEL, 0);
VertexShader = OGLES2ShaderPath + "COGLES2Solid.vsh";
FragmentShader = OGLES2ShaderPath + "COGLES2OneTextureBlend.fsh";
addHighLevelShaderMaterialFromFiles(VertexShader, "main", EVST_VS_2_0, FragmentShader, "main", EPST_PS_2_0, "", "main",
EGST_GS_4_0, scene::EPT_TRIANGLES, scene::EPT_TRIANGLE_STRIP, 0, OneTextureBlendCB, EMT_ONETEXTURE_BLEND, 0, EGSL_DEFAULT);
EGST_GS_4_0, scene::EPT_TRIANGLES, scene::EPT_TRIANGLE_STRIP, 0, OneTextureBlendCB, EMT_ONETEXTURE_BLEND, 0);
// Drop callbacks.
@ -2350,7 +2350,7 @@ COGLES2Driver::~COGLES2Driver()
u32 verticesOut,
IShaderConstantSetCallBack* callback,
E_MATERIAL_TYPE baseMaterial,
s32 userData, E_GPU_SHADING_LANGUAGE shadingLang)
s32 userData)
{
s32 nr = -1;
COGLES2MaterialRenderer* r = new COGLES2MaterialRenderer(

View File

@ -256,8 +256,7 @@ namespace video
u32 verticesOut = 0,
IShaderConstantSetCallBack* callback = 0,
E_MATERIAL_TYPE baseMaterial = video::EMT_SOLID,
s32 userData=0,
E_GPU_SHADING_LANGUAGE shadingLang = EGSL_DEFAULT) _IRR_OVERRIDE_;
s32 userData=0) _IRR_OVERRIDE_;
//! Returns pointer to the IGPUProgrammingServices interface.
virtual IGPUProgrammingServices* getGPUProgrammingServices() _IRR_OVERRIDE_;

View File

@ -2661,8 +2661,7 @@ s32 COGLES1Driver::addHighLevelShaderMaterial(
u32 verticesOut,
IShaderConstantSetCallBack* callback,
E_MATERIAL_TYPE baseMaterial,
s32 userData,
E_GPU_SHADING_LANGUAGE shadingLang)
s32 userData)
{
os::Printer::log("No shader support.");
return -1;

View File

@ -240,7 +240,7 @@ namespace video
E_PIXEL_SHADER_TYPE psCompileTarget, const c8* geometryShaderProgram, const c8* geometryShaderEntryPointName,
E_GEOMETRY_SHADER_TYPE gsCompileTarget, scene::E_PRIMITIVE_TYPE inType, scene::E_PRIMITIVE_TYPE outType,
u32 verticesOut, IShaderConstantSetCallBack* callback, E_MATERIAL_TYPE baseMaterial,
s32 userData, E_GPU_SHADING_LANGUAGE shadingLang) _IRR_OVERRIDE_;
s32 userData) _IRR_OVERRIDE_;
//! Returns pointer to the IGPUProgrammingServices interface.
virtual IGPUProgrammingServices* getGPUProgrammingServices() _IRR_OVERRIDE_;

View File

@ -134,6 +134,10 @@ public:
DepthStencil = depthStencil;
DepthStencil->grab();
}
else
{
os::Printer::log("Ignoring depth/stencil texture without depth color format.", ELL_WARNING);
}
}
else
{

View File

@ -3726,7 +3726,7 @@ s32 COpenGLDriver::addHighLevelShaderMaterial(
u32 verticesOut,
IShaderConstantSetCallBack* callback,
E_MATERIAL_TYPE baseMaterial,
s32 userData, E_GPU_SHADING_LANGUAGE shadingLang)
s32 userData)
{
s32 nr = -1;

View File

@ -325,8 +325,7 @@ namespace video
u32 verticesOut = 0,
IShaderConstantSetCallBack* callback = 0,
E_MATERIAL_TYPE baseMaterial = video::EMT_SOLID,
s32 userData = 0,
E_GPU_SHADING_LANGUAGE shadingLang = EGSL_DEFAULT) _IRR_OVERRIDE_;
s32 userData = 0) _IRR_OVERRIDE_;
//! Returns a pointer to the IVideoDriver interface. (Implementation for
//! IMaterialRendererServices)

View File

@ -751,8 +751,10 @@ void COpenGLExtensionHandler::initExtensions(bool stencilBuffer)
#endif
OcclusionQuerySupport=false;
Feature.BlendOperation = (Version >= 140) || FeatureAvailable[IRR_EXT_blend_minmax] || FeatureAvailable[IRR_EXT_blend_subtract] ||
FeatureAvailable[IRR_EXT_blend_logic_op];
Feature.BlendOperation = (Version >= 140) ||
FeatureAvailable[IRR_EXT_blend_minmax] ||
FeatureAvailable[IRR_EXT_blend_subtract] ||
FeatureAvailable[IRR_EXT_blend_logic_op];
#ifdef _DEBUG
if (FeatureAvailable[IRR_NVX_gpu_memory_info])

View File

@ -2399,14 +2399,18 @@ struct dreadglobal
irr::io::IFileSystem* io;
irr::video::IImagePresenter* presenter;
};
dreadglobal b;
namespace
{
dreadglobal burning_dread;
}
DWORD WINAPI dreadFun( void *p)
{
printf("Hi This is burning dread\n");
b.driver = new irr::video::CBurningVideoDriver(*b.params, b.io, b.presenter);
burning_dread.driver = new irr::video::CBurningVideoDriver(*burning_dread.params, burning_dread.io, burning_dread.presenter);
SetEvent ( b.sync );
SetEvent (burning_dread.sync );
while ( 1 )
{
Sleep ( 1000 );
@ -2427,13 +2431,13 @@ IVideoDriver* createBurningVideoDriver(const irr::SIrrlichtCreationParameters& p
#ifdef _IRR_COMPILE_WITH_BURNINGSVIDEO_
#ifdef _IRR_WINDOWS_
b.sync = CreateEventA ( 0, 0, 0, "burnevent0" );
b.params = &params;
b.io = io;
b.presenter = presenter;
b.dread = CreateThread ( 0, 0, dreadFun, 0, 0, &b.dreadid );
WaitForSingleObject ( b.sync, INFINITE );
return b.driver;
burning_dread.sync = CreateEventA ( 0, 0, 0, "burnevent0" );
burning_dread.params = &params;
burning_dread.io = io;
burning_dread.presenter = presenter;
burning_dread.dread = CreateThread ( 0, 0, dreadFun, 0, 0, &burning_dread.dreadid );
WaitForSingleObject (burning_dread.sync, INFINITE );
return burning_dread.driver;
#else
return new CBurningVideoDriver(params, io, presenter);
#endif

View File

@ -25,7 +25,7 @@ public:
}
//! draws an indexed triangle list
virtual void drawIndexedTriangleList(S2DVertex* vertices, s32 vertexCount, const u16* indexList, s32 triangleCount)
virtual void drawIndexedTriangleList(S2DVertex* vertices, s32 vertexCount, const u16* indexList, s32 triangleCount) _IRR_OVERRIDE_
{
const S2DVertex *v1, *v2, *v3;

View File

@ -25,7 +25,7 @@ public:
}
//! draws an indexed triangle list
virtual void drawIndexedTriangleList(S2DVertex* vertices, s32 vertexCount, const u16* indexList, s32 triangleCount)
virtual void drawIndexedTriangleList(S2DVertex* vertices, s32 vertexCount, const u16* indexList, s32 triangleCount) _IRR_OVERRIDE_
{
const S2DVertex *v1, *v2, *v3;

View File

@ -26,7 +26,7 @@ public:
}
//! draws an indexed triangle list
virtual void drawIndexedTriangleList(S2DVertex* vertices, s32 vertexCount, const u16* indexList, s32 triangleCount)
virtual void drawIndexedTriangleList(S2DVertex* vertices, s32 vertexCount, const u16* indexList, s32 triangleCount) _IRR_OVERRIDE_
{
const S2DVertex *v1, *v2, *v3;

View File

@ -83,7 +83,7 @@ public:
CTRGouraud2(CBurningVideoDriver* driver);
//! draws an indexed triangle list
virtual void drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c );
virtual void drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c ) _IRR_OVERRIDE_;
private:

View File

@ -84,7 +84,7 @@ public:
CTRGouraudAlpha2(CBurningVideoDriver* driver);
//! draws an indexed triangle list
virtual void drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c );
virtual void drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c ) _IRR_OVERRIDE_;
private:

View File

@ -84,7 +84,7 @@ public:
CTRGouraudAlphaNoZ2(CBurningVideoDriver* driver);
//! draws an indexed triangle list
virtual void drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c );
virtual void drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c ) _IRR_OVERRIDE_;
private:

View File

@ -25,7 +25,7 @@ public:
}
//! draws an indexed triangle list
virtual void drawIndexedTriangleList(S2DVertex* vertices, s32 vertexCount, const u16* indexList, s32 triangleCount)
virtual void drawIndexedTriangleList(S2DVertex* vertices, s32 vertexCount, const u16* indexList, s32 triangleCount) _IRR_OVERRIDE_
{
const S2DVertex *v1, *v2, *v3;

View File

@ -87,7 +87,7 @@ public:
CTRNormalMap(CBurningVideoDriver* driver);
//! draws an indexed triangle list
virtual void drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c );
virtual void drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c ) _IRR_OVERRIDE_;
private:

View File

@ -84,8 +84,8 @@ public:
CTRStencilShadow(CBurningVideoDriver* driver);
//! draws an indexed triangle list
virtual void drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c );
virtual void setParam ( u32 index, f32 value);
virtual void drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c ) _IRR_OVERRIDE_;
virtual void setParam ( u32 index, f32 value) _IRR_OVERRIDE_;
private:
// fragment shader

View File

@ -84,10 +84,10 @@ public:
CTRTextureBlend(CBurningVideoDriver* driver);
//! draws an indexed triangle list
virtual void drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c );
virtual void drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c ) _IRR_OVERRIDE_;
virtual void setZCompareFunc ( u32 func);
virtual void setParam ( u32 index, f32 value);
virtual void setZCompareFunc ( u32 func) _IRR_OVERRIDE_;
virtual void setParam ( u32 index, f32 value) _IRR_OVERRIDE_;
private:

View File

@ -84,7 +84,7 @@ public:
CTRTextureDetailMap2(CBurningVideoDriver* driver);
//! draws an indexed triangle list
virtual void drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c );
virtual void drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c ) _IRR_OVERRIDE_;
private:

View File

@ -25,7 +25,7 @@ public:
}
//! draws an indexed triangle list
virtual void drawIndexedTriangleList(S2DVertex* vertices, s32 vertexCount, const u16* indexList, s32 triangleCount)
virtual void drawIndexedTriangleList(S2DVertex* vertices, s32 vertexCount, const u16* indexList, s32 triangleCount) _IRR_OVERRIDE_
{
const S2DVertex *v1, *v2, *v3;

View File

@ -25,7 +25,7 @@ public:
}
//! draws an indexed triangle list
virtual void drawIndexedTriangleList(S2DVertex* vertices, s32 vertexCount, const u16* indexList, s32 triangleCount)
virtual void drawIndexedTriangleList(S2DVertex* vertices, s32 vertexCount, const u16* indexList, s32 triangleCount) _IRR_OVERRIDE_
{
const S2DVertex *v1, *v2, *v3;

View File

@ -83,7 +83,7 @@ public:
CTRTextureGouraud2(CBurningVideoDriver* driver);
//! draws an indexed triangle list
virtual void drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c );
virtual void drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c ) _IRR_OVERRIDE_;
private:

View File

@ -20,7 +20,7 @@ public:
CTRTextureGouraudAdd(IZBuffer* zbuffer);
//! draws an indexed triangle list
virtual void drawIndexedTriangleList(S2DVertex* vertices, s32 vertexCount, const u16* indexList, s32 triangleCount);
virtual void drawIndexedTriangleList(S2DVertex* vertices, s32 vertexCount, const u16* indexList, s32 triangleCount) _IRR_OVERRIDE_;
protected:

View File

@ -84,7 +84,7 @@ public:
CTRTextureGouraudAdd2(CBurningVideoDriver* driver);
//! draws an indexed triangle list
virtual void drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c );
virtual void drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c ) _IRR_OVERRIDE_;
private:

View File

@ -83,7 +83,7 @@ public:
CTRTextureGouraudAddNoZ2(CBurningVideoDriver* driver);
//! draws an indexed triangle list
virtual void drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c );
virtual void drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c ) _IRR_OVERRIDE_;
private:

View File

@ -84,9 +84,9 @@ public:
CTRTextureGouraudAlpha2(CBurningVideoDriver* driver);
//! draws an indexed triangle list
virtual void drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c );
virtual void drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c ) _IRR_OVERRIDE_;
virtual void setParam ( u32 index, f32 value);
virtual void setParam ( u32 index, f32 value) _IRR_OVERRIDE_;
private:

View File

@ -84,9 +84,9 @@ public:
CTRTextureGouraudAlphaNoZ(CBurningVideoDriver* driver);
//! draws an indexed triangle list
virtual void drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c );
virtual void drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c ) _IRR_OVERRIDE_;
virtual void setParam ( u32 index, f32 value);
virtual void setParam ( u32 index, f32 value) _IRR_OVERRIDE_;
private:

View File

@ -26,7 +26,7 @@ public:
}
//! draws an indexed triangle list
virtual void drawIndexedTriangleList(S2DVertex* vertices, s32 vertexCount, const u16* indexList, s32 triangleCount)
virtual void drawIndexedTriangleList(S2DVertex* vertices, s32 vertexCount, const u16* indexList, s32 triangleCount) _IRR_OVERRIDE_
{
const S2DVertex *v1, *v2, *v3;

View File

@ -88,7 +88,7 @@ public:
CTRTextureGouraudNoZ2(CBurningVideoDriver* driver);
//! draws an indexed triangle list
virtual void drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c );
virtual void drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c ) _IRR_OVERRIDE_;
private:

View File

@ -82,7 +82,7 @@ public:
CTRTextureVertexAlpha2(CBurningVideoDriver* driver);
//! draws an indexed triangle list
virtual void drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c );
virtual void drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c ) _IRR_OVERRIDE_;
private:

View File

@ -25,7 +25,7 @@ public:
}
//! draws an indexed triangle list
virtual void drawIndexedTriangleList(S2DVertex* vertices, s32 vertexCount, const u16* indexList, s32 triangleCount)
virtual void drawIndexedTriangleList(S2DVertex* vertices, s32 vertexCount, const u16* indexList, s32 triangleCount) _IRR_OVERRIDE_
{
const S2DVertex *v1, *v2, *v3;

View File

@ -82,7 +82,7 @@ public:
CTRTextureLightMap2_Add(CBurningVideoDriver* driver);
//! draws an indexed triangle list
virtual void drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c );
virtual void drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c ) _IRR_OVERRIDE_;
private:

View File

@ -82,7 +82,7 @@ public:
CTRTextureLightMap2_M1(CBurningVideoDriver* driver);
//! draws an indexed triangle list
virtual void drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c );
virtual void drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c ) _IRR_OVERRIDE_;
private:

View File

@ -82,7 +82,7 @@ public:
CTRTextureLightMap2_M2(CBurningVideoDriver* driver);
//! draws an indexed triangle list
virtual void drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c );
virtual void drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c ) _IRR_OVERRIDE_;
private:

View File

@ -82,7 +82,7 @@ public:
CTRTextureLightMap2_M4(CBurningVideoDriver* driver);
//! draws an indexed triangle list
virtual void drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c );
virtual void drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c ) _IRR_OVERRIDE_;
private:

Some files were not shown because too many files have changed in this diff Show More