本文整理汇总了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();
}