Commit ed29e8ad authored by hybrid's avatar hybrid

Make some convenience functions non-virtual

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@2725 dfc29bdd-3216-0410-991c-e03cc46cb475
parent dbe744d1
......@@ -548,8 +548,11 @@ namespace video
\param vertexCount Amount of vertices in the array.
\param indexList Pointer to array of indices.
\param triangleCount Amount of Triangles. Usually amount of indices / 3. */
virtual void drawIndexedTriangleList(const S3DVertex* vertices,
u32 vertexCount, const u16* indexList, u32 triangleCount) =0;
void drawIndexedTriangleList(const S3DVertex* vertices,
u32 vertexCount, const u16* indexList, u32 triangleCount)
{
drawVertexPrimitiveList(vertices, vertexCount, indexList, triangleCount, EVT_STANDARD, scene::EPT_TRIANGLES, EIT_16BIT);
}
//! Draws an indexed triangle list.
/** Note that there may be at maximum 65536 vertices, because
......@@ -560,8 +563,11 @@ namespace video
\param vertexCount Amount of vertices in the array.
\param indexList Pointer to array of indices.
\param triangleCount Amount of Triangles. Usually amount of indices / 3. */
virtual void drawIndexedTriangleList(const S3DVertex2TCoords* vertices,
u32 vertexCount, const u16* indexList, u32 triangleCount) =0;
void drawIndexedTriangleList(const S3DVertex2TCoords* vertices,
u32 vertexCount, const u16* indexList, u32 triangleCount)
{
drawVertexPrimitiveList(vertices, vertexCount, indexList, triangleCount, EVT_2TCOORDS, scene::EPT_TRIANGLES, EIT_16BIT);
}
//! Draws an indexed triangle list.
/** Note that there may be at maximum 65536 vertices, because
......@@ -572,8 +578,26 @@ namespace video
\param vertexCount Amount of vertices in the array.
\param indexList Pointer to array of indices.
\param triangleCount Amount of Triangles. Usually amount of indices / 3. */
virtual void drawIndexedTriangleList(const S3DVertexTangents* vertices,
u32 vertexCount, const u16* indexList, u32 triangleCount) =0;
void drawIndexedTriangleList(const S3DVertexTangents* vertices,
u32 vertexCount, const u16* indexList, u32 triangleCount)
{
drawVertexPrimitiveList(vertices, vertexCount, indexList, triangleCount, EVT_TANGENTS, scene::EPT_TRIANGLES, EIT_16BIT);
}
//! Draws an indexed triangle fan.
/** Note that there may be at maximum 65536 vertices, because
the index list is an array of 16 bit values each with a maximum
value of 65536. If there are more than 65536 vertices in the
list, results of this operation are not defined.
\param vertices Pointer to array of vertices.
\param vertexCount Amount of vertices in the array.
\param indexList Pointer to array of indices.
\param triangleCount Amount of Triangles. Usually amount of indices - 2. */
void drawIndexedTriangleFan(const S3DVertex* vertices,
u32 vertexCount, const u16* indexList, u32 triangleCount)
{
drawVertexPrimitiveList(vertices, vertexCount, indexList, triangleCount, EVT_STANDARD, scene::EPT_TRIANGLE_FAN, EIT_16BIT);
}
//! Draws an indexed triangle fan.
/** Note that there may be at maximum 65536 vertices, because
......@@ -584,8 +608,11 @@ namespace video
\param vertexCount Amount of vertices in the array.
\param indexList Pointer to array of indices.
\param triangleCount Amount of Triangles. Usually amount of indices - 2. */
virtual void drawIndexedTriangleFan(const S3DVertex* vertices,
u32 vertexCount, const u16* indexList, u32 triangleCount) =0;
void drawIndexedTriangleFan(const S3DVertex2TCoords* vertices,
u32 vertexCount, const u16* indexList, u32 triangleCount)
{
drawVertexPrimitiveList(vertices, vertexCount, indexList, triangleCount, EVT_2TCOORDS, scene::EPT_TRIANGLE_FAN, EIT_16BIT);
}
//! Draws an indexed triangle fan.
/** Note that there may be at maximum 65536 vertices, because
......@@ -596,8 +623,11 @@ namespace video
\param vertexCount Amount of vertices in the array.
\param indexList Pointer to array of indices.
\param triangleCount Amount of Triangles. Usually amount of indices - 2. */
virtual void drawIndexedTriangleFan(const S3DVertex2TCoords* vertices,
u32 vertexCount, const u16* indexList, u32 triangleCount) =0;
void drawIndexedTriangleFan(const S3DVertexTangents* vertices,
u32 vertexCount, const u16* indexList, u32 triangleCount)
{
drawVertexPrimitiveList(vertices, vertexCount, indexList, triangleCount, EVT_TANGENTS, scene::EPT_TRIANGLE_FAN, EIT_16BIT);
}
//! Draws a 3d line.
/** For some implementations, this method simply calls
......
......@@ -585,54 +585,6 @@ void CNullDriver::draw2DVertexPrimitiveList(const void* vertices, u32 vertexCoun
}
//! draws an indexed triangle list
void CNullDriver::drawIndexedTriangleList(const S3DVertex* vertices, u32 vertexCount, const u16* indexList, u32 triangleCount)
{
drawVertexPrimitiveList(vertices, vertexCount, indexList, triangleCount, EVT_STANDARD, scene::EPT_TRIANGLES, EIT_16BIT);
}
//! draws an indexed triangle list
void CNullDriver::drawIndexedTriangleList(const S3DVertex2TCoords* vertices, u32 vertexCount, const u16* indexList, u32 triangleCount)
{
drawVertexPrimitiveList(vertices, vertexCount, indexList, triangleCount, EVT_2TCOORDS, scene::EPT_TRIANGLES, EIT_16BIT);
}
//! Draws an indexed triangle list.
void CNullDriver::drawIndexedTriangleList(const S3DVertexTangents* vertices,
u32 vertexCount, const u16* indexList, u32 triangleCount)
{
drawVertexPrimitiveList(vertices, vertexCount, indexList, triangleCount, EVT_TANGENTS, scene::EPT_TRIANGLES, EIT_16BIT);
}
//! Draws an indexed triangle fan.
void CNullDriver::drawIndexedTriangleFan(const S3DVertex* vertices,
u32 vertexCount, const u16* indexList, u32 triangleCount)
{
drawVertexPrimitiveList(vertices, vertexCount, indexList, triangleCount, EVT_STANDARD, scene::EPT_TRIANGLE_FAN, EIT_16BIT);
}
//! Draws an indexed triangle fan.
void CNullDriver::drawIndexedTriangleFan(const S3DVertex2TCoords* vertices,
u32 vertexCount, const u16* indexList, u32 triangleCount)
{
drawVertexPrimitiveList(vertices, vertexCount, indexList, triangleCount, EVT_2TCOORDS, scene::EPT_TRIANGLE_FAN, EIT_16BIT);
}
//! Draws an indexed triangle fan.
void CNullDriver::drawIndexedTriangleFan(const S3DVertexTangents* vertices,
u32 vertexCount, const u16* indexList, u32 triangleCount)
{
drawVertexPrimitiveList(vertices, vertexCount, indexList, triangleCount, EVT_TANGENTS, scene::EPT_TRIANGLE_FAN, EIT_16BIT);
}
//! Draws a 3d line.
void CNullDriver::draw3DLine(const core::vector3df& start,
const core::vector3df& end, SColor color)
......
......@@ -107,34 +107,12 @@ namespace video
//! draws a vertex primitive list
virtual void drawVertexPrimitiveList(const void* vertices, u32 vertexCount,
const void* indexList, u32 primitiveCount,
E_VERTEX_TYPE vType, scene::E_PRIMITIVE_TYPE pType, E_INDEX_TYPE iType);
E_VERTEX_TYPE vType=EVT_STANDARD, scene::E_PRIMITIVE_TYPE pType=scene::EPT_TRIANGLES, E_INDEX_TYPE iType=EIT_16BIT);
//! draws a vertex primitive list in 2d
virtual void draw2DVertexPrimitiveList(const void* vertices, u32 vertexCount,
const void* indexList, u32 primitiveCount,
E_VERTEX_TYPE vType, scene::E_PRIMITIVE_TYPE pType, E_INDEX_TYPE iType);
//! draws an indexed triangle list
virtual void drawIndexedTriangleList(const S3DVertex* vertices, u32 vertexCount, const u16* indexList, u32 triangleCount);
//! draws an indexed triangle list
virtual void drawIndexedTriangleList(const S3DVertex2TCoords* vertices, u32 vertexCount, const u16* indexList, u32 triangleCount);
//! Draws an indexed triangle list.
virtual void drawIndexedTriangleList(const S3DVertexTangents* vertices,
u32 vertexCount, const u16* indexList, u32 triangleCount);
//! Draws an indexed triangle fan.
virtual void drawIndexedTriangleFan(const S3DVertex* vertices,
u32 vertexCount, const u16* indexList, u32 triangleCount);
//! Draws an indexed triangle list.
virtual void drawIndexedTriangleFan(const S3DVertex2TCoords* vertices,
u32 vertexCount, const u16* indexList, u32 triangleCount);
//! Draws an indexed triangle fan.
virtual void drawIndexedTriangleFan(const S3DVertexTangents* vertices,
u32 vertexCount, const u16* indexList, u32 triangleCount);
E_VERTEX_TYPE vType=EVT_STANDARD, scene::E_PRIMITIVE_TYPE pType=scene::EPT_TRIANGLES, E_INDEX_TYPE iType=EIT_16BIT);
//! Draws a 3d line.
virtual void draw3DLine(const core::vector3df& start,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment