本文整理匯總了Java中android.opengl.GLSurfaceView.Renderer類的典型用法代碼示例。如果您正苦於以下問題:Java Renderer類的具體用法?Java Renderer怎麽用?Java Renderer使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
Renderer類屬於android.opengl.GLSurfaceView包,在下文中一共展示了Renderer類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: setRenderer
import android.opengl.GLSurfaceView.Renderer; //導入依賴的package包/類
public void setRenderer(Renderer renderer) {
checkRenderThreadState();
if (mEGLConfigChooser == null) {
mEGLConfigChooser = new SimpleEGLConfigChooser(true, mEGLContextClientVersion);
}
if (mEGLContextFactory == null) {
mEGLContextFactory = new DefaultContextFactory();
}
if (mEGLWindowSurfaceFactory == null) {
mEGLWindowSurfaceFactory = new DefaultWindowSurfaceFactory();
}
mGLThread = new GLThread(renderer, mEGLConfigChooser,
mEGLContextFactory, mEGLWindowSurfaceFactory, mGLWrapper,
mEGLContextClientVersion);
mGLThread.start();
}
示例2: GLThread
import android.opengl.GLSurfaceView.Renderer; //導入依賴的package包/類
GLThread(Renderer renderer, EGLConfigChooser chooser,
EGLContextFactory contextFactory,
EGLWindowSurfaceFactory surfaceFactory, GLWrapper wrapper,
int eglContextClientVersion) {
super();
mDone = false;
mWidth = 0;
mHeight = 0;
mRequestRender = true;
mRenderMode = GLWallpaperService.RgbrnGLEngine.RENDERMODE_CONTINUOUSLY;
mRenderer = renderer;
this.mEGLConfigChooser = chooser;
this.mEGLContextFactory = contextFactory;
this.mEGLWindowSurfaceFactory = surfaceFactory;
this.mGLWrapper = wrapper;
this.mEGLContextClientVersion = eglContextClientVersion;
}
示例3: GLThread
import android.opengl.GLSurfaceView.Renderer; //導入依賴的package包/類
GLThread(Renderer renderer, EGLConfigChooser chooser,
EGLContextFactory contextFactory,
EGLWindowSurfaceFactory surfaceFactory, GLWrapper wrapper,
int eglContextClientVersion) {
super();
mDone = false;
mWidth = 0;
mHeight = 0;
mRequestRender = true;
mRenderMode = GLWallpaperService.GLEngine.RENDERMODE_CONTINUOUSLY;
mRenderer = renderer;
this.mEGLConfigChooser = chooser;
this.mEGLContextFactory = contextFactory;
this.mEGLWindowSurfaceFactory = surfaceFactory;
this.mGLWrapper = wrapper;
this.mEGLContextClientVersion = eglContextClientVersion;
}
示例4: GLRenderWrapper
import android.opengl.GLSurfaceView.Renderer; //導入依賴的package包/類
/**
* Constructs this object.
*
* @param view the current glSurfaceView
* @param renderer the renderer to wrap
* @param latch the count down latch
*/
public GLRenderWrapper(GLSurfaceView view,
Renderer renderer, CountDownLatch latch) {
this.view = view;
this.renderer = renderer;
this.latch = latch;
this.width = view.getWidth();
this.height = view.getHeight();
Integer out = new Reflect(view).field("mEGLContextClientVersion")
.out(Integer.class);
if ( out != null ) {
this.glVersion = out.intValue();
} else {
this.glVersion = -1;
this.takeScreenshot = false;
}
}
示例5: RendererHelper
import android.opengl.GLSurfaceView.Renderer; //導入依賴的package包/類
public RendererHelper(CardboardView.Renderer renderer) {
this.mRenderer = renderer;
this.mHmd = new HeadMountedDisplay(CardboardView.this.mHmd);
this.mHeadTransform = new HeadTransform();
this.mMonocular = new EyeParams(0);
this.mLeftEye = new EyeParams(1);
this.mRightEye = new EyeParams(2);
updateFieldOfView(this.mLeftEye.getFov(), this.mRightEye.getFov());
CardboardView.this.mDistortionRenderer = new DistortionRenderer();
this.mLeftEyeTranslate = new float[16];
this.mRightEyeTranslate = new float[16];
this.mVRMode = CardboardView.this.mVRMode;
this.mDistortionCorrectionEnabled = CardboardView.this.mDistortionCorrectionEnabled;
this.mDistortionCorrectionScale = CardboardView.this.mDistortionCorrectionScale;
this.mZNear = CardboardView.this.mZNear;
this.mZFar = CardboardView.this.mZFar;
this.mProjectionChanged = true;
}
示例6: onDrawFrame
import android.opengl.GLSurfaceView.Renderer; //導入依賴的package包/類
@Override
public void onDrawFrame(GL10 gl) {
GLES20.glClear(GLES20.GL_COLOR_BUFFER_BIT | GLES20.GL_DEPTH_BUFFER_BIT);
GLES20.glDisable(GLES20.GL_BLEND);
com.qualcomm.vuforia.Renderer renderer = com.qualcomm.vuforia.Renderer
.getInstance();
State state = renderer.begin();
renderer.drawVideoBackground();
maybeCreateTrackable();
if (state.getNumTrackableResults() > 0) {
generateMvpMatrices(state);
GLES20.glEnable(GLES20.GL_DEPTH_TEST);
GLES20.glEnable(GLES20.GL_BLEND);
texture.bindTexture();
drawClip();
drawBackground();
drawFeature();
drawWhite();
drawDetails();
drawStatus();
}
renderer.end();
}
示例7: setRenderer
import android.opengl.GLSurfaceView.Renderer; //導入依賴的package包/類
protected void setRenderer(Renderer renderer) {
if (LoggerConfig.ON) {
Log.d(TAG, "setRenderer(" + renderer + ")");
}
glSurfaceView.setRenderer(renderer);
rendererHasBeenSet = true;
}
示例8: onDestroy
import android.opengl.GLSurfaceView.Renderer; //導入依賴的package包/類
/**
* {@inheritDoc}
*/
@Override
public void onDestroy() {
if (DEBUG) Log.d(TAG, "onDestroy");
super.onDestroy();
for (Renderer renderer : mRenderers) {
((PhotoPhaseRenderer) renderer).onDestroy();
}
}
示例9: onLowMemory
import android.opengl.GLSurfaceView.Renderer; //導入依賴的package包/類
/**
* {@inheritDoc}
*/
@Override
public void onLowMemory() {
super.onLowMemory();
Log.i(TAG, "onLowMemory");
for (Renderer renderer : mRenderers) {
// Pause the wallpaper and destroy the cached textures
((PhotoPhaseRenderer) renderer).onPause();
((PhotoPhaseRenderer) renderer).onLowMemory();
}
}
示例10: onDestroyEGLView
import android.opengl.GLSurfaceView.Renderer; //導入依賴的package包/類
/**
* {@inheritDoc}
*/
@Override
public void onDestroyEGLView(GLSurfaceView view, Renderer renderer) {
if (DEBUG) Log.d(TAG, "onDestroyEGLView" + renderer);
mRenderers.remove(renderer);
((PhotoPhaseRenderer)renderer).onPause();
((PhotoPhaseRenderer)renderer).onDestroy();
}
示例11: getNewRenderer
import android.opengl.GLSurfaceView.Renderer; //導入依賴的package包/類
/**
* {@inheritDoc}
*/
@Override
public Renderer getNewRenderer(GLSurfaceView view) {
if (DEBUG) Log.d(TAG, "getNewRenderer()");
PhotoPhaseRenderer renderer = new PhotoPhaseRenderer(this,
new GLESSurfaceDispatcher(view), mEngine.isPreview());
renderer.onCreate();
mRenderers.add(renderer);
if (DEBUG) Log.d(TAG, "renderer" + renderer);
return renderer;
}
示例12: setRenderer
import android.opengl.GLSurfaceView.Renderer; //導入依賴的package包/類
public void setRenderer(GLSurfaceView.Renderer paramRenderer)
{
checkRenderThreadState();
if (this.mEGLConfigChooser == null)
this.mEGLConfigChooser = new GLBaseSurfaceView.SimpleEGLConfigChooser(true);
if (this.mEGLContextFactory == null)
this.mEGLContextFactory = new GLBaseSurfaceView.DefaultContextFactory();
if (this.mEGLWindowSurfaceFactory == null)
this.mEGLWindowSurfaceFactory = new GLBaseSurfaceView.DefaultWindowSurfaceFactory();
this.mGLThread = new GLBaseSurfaceView.GLThread(this, paramRenderer);
this.mGLThread.start();
}
示例13: getNewRenderer
import android.opengl.GLSurfaceView.Renderer; //導入依賴的package包/類
@Override
Renderer getNewRenderer() {
return new LessonThreeRenderer();
}
示例14: setRenderer
import android.opengl.GLSurfaceView.Renderer; //導入依賴的package包/類
public void setRenderer(Renderer renderer) {
if (mRenderThread != null) {
throw new IllegalArgumentException("Renderer already set");
}
mRenderThread = new RenderThread(renderer);
}
示例15: RenderThread
import android.opengl.GLSurfaceView.Renderer; //導入依賴的package包/類
public RenderThread(Renderer renderer) {
super("RenderThread");
mRenderer = renderer;
start();
}