am 2d496bfe: Fix point sprites.
Merge commit '2d496bfebc010f26d65dd5e3a3c4a8170919cf0a' into eclair-plus-aosp * commit '2d496bfebc010f26d65dd5e3a3c4a8170919cf0a': Fix point sprites.
This commit is contained in:
@@ -56,6 +56,11 @@ void ProgramFragment::setupGL(const Context *rsc, ProgramFragmentState *state)
|
||||
|
||||
glEnable(GL_TEXTURE_2D);
|
||||
if (rsc->checkVersion1_1()) {
|
||||
if (mPointSpriteEnable) {
|
||||
glEnable(GL_POINT_SPRITE_OES);
|
||||
} else {
|
||||
glDisable(GL_POINT_SPRITE_OES);
|
||||
}
|
||||
glTexEnvi(GL_POINT_SPRITE_OES, GL_COORD_REPLACE_OES, mPointSpriteEnable);
|
||||
}
|
||||
glBindTexture(GL_TEXTURE_2D, mTextures[ct]->getTextureID());
|
||||
|
||||
@@ -800,6 +800,12 @@ static void SC_shininess(float s)
|
||||
glMaterialf(GL_FRONT_AND_BACK, GL_SHININESS, s);
|
||||
}
|
||||
|
||||
static void SC_pointAttenuation(float a, float b, float c)
|
||||
{
|
||||
GLfloat params[] = { a, b, c };
|
||||
glPointParameterfv(GL_POINT_DISTANCE_ATTENUATION, params);
|
||||
}
|
||||
|
||||
static void SC_hsbToRgb(float h, float s, float b, float* rgb)
|
||||
{
|
||||
float red = 0.0f;
|
||||
@@ -1185,6 +1191,8 @@ ScriptCState::SymbolTable_t ScriptCState::gSyms[] = {
|
||||
"void", "(float, float, float, float)" },
|
||||
{ "shininess", (void *)&SC_shininess,
|
||||
"void", "(float)" },
|
||||
{ "pointAttenuation", (void *)&SC_pointAttenuation,
|
||||
"void", "(float, float, float)" },
|
||||
|
||||
{ "uploadToTexture", (void *)&SC_uploadToTexture,
|
||||
"void", "(int, int)" },
|
||||
|
||||
Reference in New Issue
Block a user