diff --git a/lib/irrlicht/source/Irrlicht/COGLES2Driver.cpp b/lib/irrlicht/source/Irrlicht/COGLES2Driver.cpp index aad4b0867..87b87b73e 100644 --- a/lib/irrlicht/source/Irrlicht/COGLES2Driver.cpp +++ b/lib/irrlicht/source/Irrlicht/COGLES2Driver.cpp @@ -825,6 +825,16 @@ namespace video 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, const void* indexList, u32 primitiveCount, diff --git a/lib/irrlicht/source/Irrlicht/COGLES2Driver.h b/lib/irrlicht/source/Irrlicht/COGLES2Driver.h index 8329080c4..846214e66 100644 --- a/lib/irrlicht/source/Irrlicht/COGLES2Driver.h +++ b/lib/irrlicht/source/Irrlicht/COGLES2Driver.h @@ -127,6 +127,10 @@ namespace video const void* indexList, u32 primitiveCount, 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, const void* indexList, u32 primitiveCount, E_VERTEX_TYPE vType, scene::E_PRIMITIVE_TYPE pType, diff --git a/src/states_screens/race_gui.cpp b/src/states_screens/race_gui.cpp index ce1208ee1..b1a871c77 100644 --- a/src/states_screens/race_gui.cpp +++ b/src/states_screens/race_gui.cpp @@ -996,6 +996,8 @@ void RaceGUI::drawMeterTexture(video::ITexture *meter_texture, video::S3DVertex { #ifndef SERVER_ONLY //Should be greater or equal than the greatest vertices_count used by the meter functions + if (count < 2) + return; short int index[12]; for(unsigned int i=0; i