當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。