Remove useless slot from ProgramVertex. Optimize GL state setup.

This commit is contained in:
Jason Sams
2009-08-05 13:57:03 -07:00
parent 9d1a3149f3
commit 9bee51c42e
20 changed files with 123 additions and 114 deletions

View File

@@ -909,19 +909,11 @@ nProgramVertexBegin(JNIEnv *_env, jobject _this, jint in, jint out)
}
static void
nProgramVertexBindAllocation(JNIEnv *_env, jobject _this, jint vpv, jint slot, jint a)
nProgramVertexBindAllocation(JNIEnv *_env, jobject _this, jint vpv, jint a)
{
RsContext con = (RsContext)(_env->GetIntField(_this, gContextId));
LOG_API("nProgramVertexBindAllocation, con(%p), vpf(%p), slot(%i), a(%p)", con, (RsProgramVertex)vpv, slot, (RsAllocation)a);
rsProgramVertexBindAllocation((RsProgramFragment)vpv, slot, (RsAllocation)a);
}
static void
nProgramVertexSetType(JNIEnv *_env, jobject _this, jint slot, jint t)
{
RsContext con = (RsContext)(_env->GetIntField(_this, gContextId));
LOG_API("nProgramVertexSetType, con(%p), vpf(%p), slot(%i), a(%p)", con, (RsProgramVertex)vpv, slot, (RsType)t);
rsProgramVertexSetType(slot, (RsType)t);
rsProgramVertexBindAllocation((RsProgramFragment)vpv, (RsAllocation)a);
}
static void
@@ -1186,9 +1178,8 @@ static JNINativeMethod methods[] = {
{"nProgramFragmentDestroy", "(I)V", (void*)nProgramFragmentDestroy },
{"nProgramVertexDestroy", "(I)V", (void*)nProgramVertexDestroy },
{"nProgramVertexBindAllocation", "(III)V", (void*)nProgramVertexBindAllocation },
{"nProgramVertexBindAllocation", "(II)V", (void*)nProgramVertexBindAllocation },
{"nProgramVertexBegin", "(II)V", (void*)nProgramVertexBegin },
{"nProgramVertexSetType", "(II)V", (void*)nProgramVertexSetType },
{"nProgramVertexSetTextureMatrixEnable", "(Z)V", (void*)nProgramVertexSetTextureMatrixEnable },
{"nProgramVertexAddLight", "(I)V", (void*)nProgramVertexAddLight },
{"nProgramVertexCreate", "()I", (void*)nProgramVertexCreate },