Add support for point_size_array. We use normal.X for storing the thickness, as long as we don't have a flexible vertex format.
git-svn-id: http://svn.code.sf.net/p/irrlicht/code/branches/ogl-es@2387 dfc29bdd-3216-0410-991c-e03cc46cb475
This commit is contained in:
parent
2f4a0ddd4e
commit
8344276d93
@ -846,6 +846,10 @@ void COGLES1Driver::drawVertexPrimitiveList2d3d(const void* vertices, u32 vertex
|
|||||||
glEnableClientState(GL_VERTEX_ARRAY);
|
glEnableClientState(GL_VERTEX_ARRAY);
|
||||||
if ((pType!=scene::EPT_POINTS) && (pType!=scene::EPT_POINT_SPRITES))
|
if ((pType!=scene::EPT_POINTS) && (pType!=scene::EPT_POINT_SPRITES))
|
||||||
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
|
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
|
||||||
|
#ifdef GL_OES_point_size_array
|
||||||
|
else if (FeatureAvailable[IRR_OES_point_size_array] && (Material.Thickness==0.0f))
|
||||||
|
glEnableClientState(GL_POINT_SIZE_ARRAY_OES);
|
||||||
|
#endif
|
||||||
if (threed && (pType!=scene::EPT_POINTS) && (pType!=scene::EPT_POINT_SPRITES))
|
if (threed && (pType!=scene::EPT_POINTS) && (pType!=scene::EPT_POINT_SPRITES))
|
||||||
glEnableClientState(GL_NORMAL_ARRAY);
|
glEnableClientState(GL_NORMAL_ARRAY);
|
||||||
|
|
||||||
@ -857,6 +861,14 @@ void COGLES1Driver::drawVertexPrimitiveList2d3d(const void* vertices, u32 vertex
|
|||||||
case EVT_STANDARD:
|
case EVT_STANDARD:
|
||||||
if (vertices)
|
if (vertices)
|
||||||
{
|
{
|
||||||
|
#ifdef GL_OES_point_size_array
|
||||||
|
if ((pType==scene::EPT_POINTS) || (pType==scene::EPT_POINT_SPRITES))
|
||||||
|
{
|
||||||
|
if (FeatureAvailable[IRR_OES_point_size_array] && (Material.Thickness==0.0f))
|
||||||
|
glPointSizePointerOES(GL_FLOAT, sizeof(S3DVertex), &(static_cast<const S3DVertex*>(vertices))[0].Normal.X);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
#endif
|
||||||
if (threed)
|
if (threed)
|
||||||
glNormalPointer(GL_FLOAT, sizeof(S3DVertex), &(static_cast<const S3DVertex*>(vertices))[0].Normal);
|
glNormalPointer(GL_FLOAT, sizeof(S3DVertex), &(static_cast<const S3DVertex*>(vertices))[0].Normal);
|
||||||
glTexCoordPointer(2, GL_FLOAT, sizeof(S3DVertex), &(static_cast<const S3DVertex*>(vertices))[0].TCoords);
|
glTexCoordPointer(2, GL_FLOAT, sizeof(S3DVertex), &(static_cast<const S3DVertex*>(vertices))[0].TCoords);
|
||||||
@ -1044,6 +1056,10 @@ void COGLES1Driver::drawVertexPrimitiveList2d3d(const void* vertices, u32 vertex
|
|||||||
}
|
}
|
||||||
extGlClientActiveTexture(GL_TEXTURE0);
|
extGlClientActiveTexture(GL_TEXTURE0);
|
||||||
}
|
}
|
||||||
|
#ifdef GL_OES_point_size_array
|
||||||
|
if (FeatureAvailable[IRR_OES_point_size_array] && (Material.Thickness==0.0f))
|
||||||
|
glDisableClientState(GL_POINT_SIZE_ARRAY_OES);
|
||||||
|
#endif
|
||||||
glDisableClientState(GL_COLOR_ARRAY);
|
glDisableClientState(GL_COLOR_ARRAY);
|
||||||
glDisableClientState(GL_VERTEX_ARRAY);
|
glDisableClientState(GL_VERTEX_ARRAY);
|
||||||
glDisableClientState(GL_NORMAL_ARRAY);
|
glDisableClientState(GL_NORMAL_ARRAY);
|
||||||
|
@ -259,7 +259,7 @@ public:
|
|||||||
virtual void OnUnsetMaterial()
|
virtual void OnUnsetMaterial()
|
||||||
{
|
{
|
||||||
// default values
|
// default values
|
||||||
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE);
|
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
|
||||||
glTexEnvf(GL_TEXTURE_ENV, GL_COMBINE_ALPHA, GL_MODULATE );
|
glTexEnvf(GL_TEXTURE_ENV, GL_COMBINE_ALPHA, GL_MODULATE );
|
||||||
glTexEnvf(GL_TEXTURE_ENV, GL_SRC0_ALPHA, GL_TEXTURE );
|
glTexEnvf(GL_TEXTURE_ENV, GL_SRC0_ALPHA, GL_TEXTURE );
|
||||||
glTexEnvf(GL_TEXTURE_ENV, GL_SRC1_ALPHA, GL_PREVIOUS );
|
glTexEnvf(GL_TEXTURE_ENV, GL_SRC1_ALPHA, GL_PREVIOUS );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user