本文整理匯總了Java中com.panoramagl.PLIRenderer類的典型用法代碼示例。如果您正苦於以下問題:Java PLIRenderer類的具體用法?Java PLIRenderer怎麽用?Java PLIRenderer使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
PLIRenderer類屬於com.panoramagl包,在下文中一共展示了PLIRenderer類的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: touchDown
import com.panoramagl.PLIRenderer; //導入依賴的package包/類
/**touch methods*/
@Override
public boolean touchDown(Object sender)
{
if(super.touchDown(sender))
{
if(mOnClick != null && mOnClick.length() > 0)
{
PLIInterpreter commandInterpreter = new PLCommandInterpreter();
if(sender instanceof PLIScene)
commandInterpreter.interpret(((PLIScene)sender).getInternalView(), mOnClick);
else if(sender instanceof PLIRenderer)
commandInterpreter.interpret(((PLIRenderer)sender).getInternalView(), mOnClick);
}
return true;
}
return false;
}
示例2: internalRender
import com.panoramagl.PLIRenderer; //導入依賴的package包/類
/**render methods*/
@Override
protected void internalRender(GL10 gl, PLIRenderer renderer)
{
this.calculateCoords(gl);
List<PLITexture> textures = this.getTextures();
int textureId = (textures.size() > 0 ? textures.get(0).getTextureId(gl) : 0);
if(textureId == 0 || mVertexsBuffer == null || mTextureCoordsBuffer == null)
return;
gl.glEnable(GL10.GL_TEXTURE_2D);
PLIView view = renderer.getInternalView();
gl.glColor4f(1.0f, 1.0f, 1.0f, (view != null && view.isValidForTransition()) || this.getTouchStatus() == PLSceneElementTouchStatus.PLSceneElementTouchStatusOut ? this.getAlpha() : mOverAlpha);
gl.glVertexPointer(3, GL10.GL_FLOAT, 0, mVertexsBuffer);
gl.glTexCoordPointer(2, GL10.GL_FLOAT, 0, mTextureCoordsBuffer);
gl.glEnableClientState(GL10.GL_VERTEX_ARRAY);
gl.glEnableClientState(GL10.GL_TEXTURE_COORD_ARRAY);
gl.glEnable(GL10.GL_CULL_FACE);
gl.glCullFace(GL10.GL_FRONT);
gl.glShadeModel(GL10.GL_SMOOTH);
gl.glBindTexture(GL10.GL_TEXTURE_2D, textureId);
gl.glDrawArrays(GL10.GL_TRIANGLE_STRIP, 0, 4);
gl.glDisable(GL10.GL_TEXTURE_2D);
gl.glDisable(GL10.GL_BLEND);
gl.glDisableClientState(GL10.GL_VERTEX_ARRAY);
gl.glDisableClientState(GL10.GL_TEXTURE_COORD_ARRAY);
}