当前位置: 首页>>代码示例>>Java>>正文


Java Renderer类代码示例

本文整理汇总了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();
}
 
开发者ID:biezhihua,项目名称:Android_OpenGL_Demo,代码行数:17,代码来源:GLWallpaperService.java

示例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;
}
 
开发者ID:biezhihua,项目名称:Android_OpenGL_Demo,代码行数:18,代码来源:GLWallpaperService.java

示例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;
}
 
开发者ID:biezhihua,项目名称:Android_OpenGL_Demo,代码行数:18,代码来源:GLWallpaperService.java

示例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;
	}
}
 
开发者ID:IfengAutomation,项目名称:test_agent_android,代码行数:27,代码来源:GLRenderWrapper.java

示例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;
}
 
开发者ID:Zomega,项目名称:Cardboard,代码行数:22,代码来源:CardboardView.java

示例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();
}
 
开发者ID:DrPaulT,项目名称:play-store-ar,代码行数:24,代码来源:ListingRenderer.java

示例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;
}
 
开发者ID:biezhihua,项目名称:Android_OpenGL_Demo,代码行数:9,代码来源:GLWallpaperService.java

示例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();
    }
}
 
开发者ID:jruesga,项目名称:PhotoPhase,代码行数:12,代码来源:PhotoPhaseWallpaper.java

示例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();
    }
}
 
开发者ID:jruesga,项目名称:PhotoPhase,代码行数:14,代码来源:PhotoPhaseWallpaper.java

示例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();
}
 
开发者ID:jruesga,项目名称:PhotoPhase,代码行数:11,代码来源:PhotoPhaseWallpaper.java

示例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;
}
 
开发者ID:jruesga,项目名称:PhotoPhase,代码行数:14,代码来源:PhotoPhaseWallpaper.java

示例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();
}
 
开发者ID:isnuryusuf,项目名称:ingress-indonesia-dev,代码行数:13,代码来源:GLBaseSurfaceView.java

示例13: getNewRenderer

import android.opengl.GLSurfaceView.Renderer; //导入依赖的package包/类
@Override
Renderer getNewRenderer() {
	return new LessonThreeRenderer();
}
 
开发者ID:biezhihua,项目名称:Android_OpenGL_Demo,代码行数:5,代码来源:LessonThreeWallpaperService.java

示例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);
}
 
开发者ID:Phonemetra,项目名称:TurboLauncher,代码行数:7,代码来源:BlockingGLTextureView.java

示例15: RenderThread

import android.opengl.GLSurfaceView.Renderer; //导入依赖的package包/类
public RenderThread(Renderer renderer) {
    super("RenderThread");
    mRenderer = renderer;
    start();
}
 
开发者ID:Phonemetra,项目名称:TurboLauncher,代码行数:6,代码来源:BlockingGLTextureView.java


注:本文中的android.opengl.GLSurfaceView.Renderer类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。