Fix meter missing in race gui for GLES 2
This commit is contained in:
parent
5c7133699e
commit
8b825bf7df
@ -825,6 +825,16 @@ namespace video
|
|||||||
drawVertexPrimitiveList2d3d(vertices, vertexCount, (const u16*)indexList, primitiveCount, vType, pType, iType);
|
drawVertexPrimitiveList2d3d(vertices, vertexCount, (const u16*)indexList, primitiveCount, vType, pType, iType);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void COGLES2Driver::draw2DVertexPrimitiveList(const void* vertices,
|
||||||
|
u32 vertexCount, const void* indexList, u32 primitiveCount,
|
||||||
|
E_VERTEX_TYPE vType, scene::E_PRIMITIVE_TYPE pType, E_INDEX_TYPE iType)
|
||||||
|
{
|
||||||
|
testGLError();
|
||||||
|
if (!checkPrimitiveCount(primitiveCount))
|
||||||
|
return;
|
||||||
|
setRenderStates2DMode(Material.MaterialType==EMT_TRANSPARENT_VERTEX_ALPHA, (Material.getTexture(0) != 0), Material.MaterialType==EMT_TRANSPARENT_ALPHA_CHANNEL);
|
||||||
|
drawVertexPrimitiveList2d3d(vertices, vertexCount, (const u16*)indexList, primitiveCount, vType, pType, iType, false);
|
||||||
|
}
|
||||||
|
|
||||||
void COGLES2Driver::drawVertexPrimitiveList2d3d(const void* vertices, u32 vertexCount,
|
void COGLES2Driver::drawVertexPrimitiveList2d3d(const void* vertices, u32 vertexCount,
|
||||||
const void* indexList, u32 primitiveCount,
|
const void* indexList, u32 primitiveCount,
|
||||||
|
@ -127,6 +127,10 @@ namespace video
|
|||||||
const void* indexList, u32 primitiveCount,
|
const void* indexList, u32 primitiveCount,
|
||||||
E_VERTEX_TYPE vType, scene::E_PRIMITIVE_TYPE pType, E_INDEX_TYPE iType);
|
E_VERTEX_TYPE vType, scene::E_PRIMITIVE_TYPE pType, E_INDEX_TYPE iType);
|
||||||
|
|
||||||
|
virtual void draw2DVertexPrimitiveList(const void* vertices, u32 vertexCount,
|
||||||
|
const void* indexList, u32 primitiveCount,
|
||||||
|
E_VERTEX_TYPE vType=EVT_STANDARD, scene::E_PRIMITIVE_TYPE pType=scene::EPT_TRIANGLES, E_INDEX_TYPE iType=EIT_16BIT);
|
||||||
|
|
||||||
void drawVertexPrimitiveList2d3d(const void* vertices, u32 vertexCount,
|
void drawVertexPrimitiveList2d3d(const void* vertices, u32 vertexCount,
|
||||||
const void* indexList, u32 primitiveCount,
|
const void* indexList, u32 primitiveCount,
|
||||||
E_VERTEX_TYPE vType, scene::E_PRIMITIVE_TYPE pType,
|
E_VERTEX_TYPE vType, scene::E_PRIMITIVE_TYPE pType,
|
||||||
|
@ -996,6 +996,8 @@ void RaceGUI::drawMeterTexture(video::ITexture *meter_texture, video::S3DVertex
|
|||||||
{
|
{
|
||||||
#ifndef SERVER_ONLY
|
#ifndef SERVER_ONLY
|
||||||
//Should be greater or equal than the greatest vertices_count used by the meter functions
|
//Should be greater or equal than the greatest vertices_count used by the meter functions
|
||||||
|
if (count < 2)
|
||||||
|
return;
|
||||||
short int index[12];
|
short int index[12];
|
||||||
for(unsigned int i=0; i<count; i++)
|
for(unsigned int i=0; i<count; i++)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user