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


Java EGL10.EGL_NONE属性代码示例

本文整理汇总了Java中javax.microedition.khronos.egl.EGL10.EGL_NONE属性的典型用法代码示例。如果您正苦于以下问题:Java EGL10.EGL_NONE属性的具体用法?Java EGL10.EGL_NONE怎么用?Java EGL10.EGL_NONE使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在javax.microedition.khronos.egl.EGL10的用法示例。


在下文中一共展示了EGL10.EGL_NONE属性的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: chooseConfig

@Override
public  EGLConfig chooseConfig(EGL10 egl, EGLDisplay display){
    final int EGL_OPENGL_ES2_BIT = 0x0004;

    int[] attribList = {
            EGL10.EGL_RED_SIZE, 8,
            EGL10.EGL_GREEN_SIZE, 8,
            EGL10.EGL_BLUE_SIZE, 8,
            EGL10.EGL_ALPHA_SIZE, 8,
            EGL10.EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,
            EGL10.EGL_SURFACE_TYPE, EGL10.EGL_PBUFFER_BIT,
            EGL10.EGL_NONE
    };
    EGLConfig[] configs = new EGLConfig[1];
    int[] numConfigs = new int[1];
    if (!egl.eglChooseConfig(display, attribList, configs, configs.length,
            numConfigs)) {
        throw new RuntimeException("unable to find RGB888+recordable ES2 EGL config");
    }

    return  configs[0];
}
 
开发者ID:lzmlsfe,项目名称:19porn,代码行数:22,代码来源:EGLUtil.java

示例2: createContext

public EGLContext createContext(EGL10 egl, EGLDisplay display, EGLConfig eglConfig) {
    Log.d(LOG_TAG, "createContext " + egl + " " + display + " " + eglConfig);
    checkEglError("before createContext", egl);
    int[] attrib_list = {EGL_CONTEXT_CLIENT_VERSION, 2, EGL10.EGL_NONE};

    EGLContext ctx;

    if (mRenderer.mEGLCurrentContext == null) {
        mRenderer.mEGLCurrentContext = egl.eglCreateContext(display, eglConfig,
                EGL10.EGL_NO_CONTEXT, attrib_list);
        ctx = mRenderer.mEGLCurrentContext;
    } else {
        ctx = mRenderer.mEGLCurrentContext;
    }
    checkEglError("after createContext", egl);
    return ctx;
}
 
开发者ID:AgoraIO,项目名称:Agora-Video-Source-Android,代码行数:17,代码来源:CustomizedCameraRenderer.java

示例3: createContext

@Override
public EGLContext createContext(
        EGL10 egl,
        EGLDisplay display,
        EGLConfig eglConfig)
{
    Log.w(ConstantsUI.TAG, "creating OpenGL ES 2.0 context");
    checkEglError(egl, "Before eglCreateContext");
    int[] attrib_list = {EGL_CONTEXT_CLIENT_VERSION, 2, EGL10.EGL_NONE};
    mEglContext =
            egl.eglCreateContext(display, eglConfig, EGL10.EGL_NO_CONTEXT, attrib_list);
    if (EGL10.EGL_NO_CONTEXT == mEglContext) {
        throwEglException(egl, "eglCreateContext");
    }
    return mEglContext;
}
 
开发者ID:nextgis,项目名称:android_nextgis_mobile,代码行数:16,代码来源:MapGlView.java

示例4: filterConfigSpec

private int[] filterConfigSpec(int[] configSpec) {
    if (mEGLContextClientVersion != 2 && mEGLContextClientVersion != 3) {
        return configSpec;
    }
    /* We know none of the subclasses define EGL_RENDERABLE_TYPE.
     * And we know the configSpec is well formed.
     */
    int len = configSpec.length;
    int[] newConfigSpec = new int[len + 2];
    System.arraycopy(configSpec, 0, newConfigSpec, 0, len - 1);
    newConfigSpec[len - 1] = EGL10.EGL_RENDERABLE_TYPE;
    if (mEGLContextClientVersion == 2) {
        newConfigSpec[len] = EGL14.EGL_OPENGL_ES2_BIT;  /* EGL_OPENGL_ES2_BIT */
    } else {
        newConfigSpec[len] = EGLExt.EGL_OPENGL_ES3_BIT_KHR; /* EGL_OPENGL_ES3_BIT_KHR */
    }
    newConfigSpec[len + 1] = EGL10.EGL_NONE;
    return newConfigSpec;
}
 
开发者ID:uestccokey,项目名称:EZFilter,代码行数:19,代码来源:GLSurfaceView.java

示例5: createSurfaceInternal

private void createSurfaceInternal(Object nativeWindow) {
  if (!(nativeWindow instanceof SurfaceHolder) && !(nativeWindow instanceof SurfaceTexture)) {
    throw new IllegalStateException("Input must be either a SurfaceHolder or SurfaceTexture");
  }
  checkIsNotReleased();
  if (eglSurface != EGL10.EGL_NO_SURFACE) {
    throw new RuntimeException("Already has an EGLSurface");
  }
  int[] surfaceAttribs = {EGL10.EGL_NONE};
  eglSurface = egl.eglCreateWindowSurface(eglDisplay, eglConfig, nativeWindow, surfaceAttribs);
  if (eglSurface == EGL10.EGL_NO_SURFACE) {
    throw new RuntimeException(
        "Failed to create window surface: 0x" + Integer.toHexString(egl.eglGetError()));
  }
}
 
开发者ID:lgyjg,项目名称:AndroidRTC,代码行数:15,代码来源:EglBase10.java

示例6: ComponentSizeChooser

public ComponentSizeChooser(int redSize, int greenSize, int blueSize,
		int alphaSize, int depthSize, int stencilSize, int eglContextClientVersion) {
	super(new int[] { EGL10.EGL_RED_SIZE, redSize,
			EGL10.EGL_GREEN_SIZE, greenSize, EGL10.EGL_BLUE_SIZE,
			blueSize, EGL10.EGL_ALPHA_SIZE, alphaSize,
			EGL10.EGL_DEPTH_SIZE, depthSize, EGL10.EGL_STENCIL_SIZE,
			stencilSize, EGL10.EGL_NONE }, eglContextClientVersion);
	mValue = new int[1];
	mRedSize = redSize;
	mGreenSize = greenSize;
	mBlueSize = blueSize;
	mAlphaSize = alphaSize;
	mDepthSize = depthSize;
	mStencilSize = stencilSize;
}
 
开发者ID:biezhihua,项目名称:Android_OpenGL_Demo,代码行数:15,代码来源:GLWallpaperService.java

示例7: createPbufferSurface

@Override
public void createPbufferSurface(int width, int height) {
  checkIsNotReleased();
  if (eglSurface != EGL10.EGL_NO_SURFACE) {
    throw new RuntimeException("Already has an EGLSurface");
  }
  int[] surfaceAttribs = {EGL10.EGL_WIDTH, width, EGL10.EGL_HEIGHT, height, EGL10.EGL_NONE};
  eglSurface = egl.eglCreatePbufferSurface(eglDisplay, eglConfig, surfaceAttribs);
  if (eglSurface == EGL10.EGL_NO_SURFACE) {
    throw new RuntimeException("Failed to create pixel buffer surface with size " + width + "x"
        + height + ": 0x" + Integer.toHexString(egl.eglGetError()));
  }
}
 
开发者ID:lgyjg,项目名称:AndroidRTC,代码行数:13,代码来源:EglBase10.java

示例8: filterConfigSpec

private int[] filterConfigSpec(int[] configSpec) {
    if (mEGLContextClientVersion != 2) {
        return configSpec;
    }
    /* We know none of the subclasses define EGL_RENDERABLE_TYPE.
     * And we know the configSpec is well formed.
     */
    int len = configSpec.length;
    int[] newConfigSpec = new int[len + 2];
    System.arraycopy(configSpec, 0, newConfigSpec, 0, len-1);
    newConfigSpec[len-1] = EGL10.EGL_RENDERABLE_TYPE;
    newConfigSpec[len] = 4; /* EGL_OPENGL_ES2_BIT */
    newConfigSpec[len+1] = EGL10.EGL_NONE;
    return newConfigSpec;
}
 
开发者ID:pavelsemak,项目名称:alpha-movie,代码行数:15,代码来源:GLTextureView.java

示例9: ComponentSizeChooser

public ComponentSizeChooser(int redSize, int greenSize, int blueSize,
	int alphaSize, int depthSize, int stencilSize, boolean isGles2, boolean isGles3) {
super(new int[] {EGL10.EGL_NONE}); // Get all possible configs
mValue = new int[1];
mRedSize = redSize;
mGreenSize = greenSize;
mBlueSize = blueSize;
mAlphaSize = alphaSize;
mDepthSize = depthSize;
mStencilSize = stencilSize;
mIsGles2 = isGles2;
mIsGles3 = isGles3;
 }
 
开发者ID:NeoTerm,项目名称:NeoTerm,代码行数:13,代码来源:GLSurfaceView_SDL.java

示例10: clearSurface

/**
 * clear data from surface using opengl
 */
private void clearSurface(Object texture) {
  EGL10 egl = (EGL10) EGLContext.getEGL();
  EGLDisplay display = egl.eglGetDisplay(EGL10.EGL_DEFAULT_DISPLAY);
  egl.eglInitialize(display, null);

  int[] attribList = {
      EGL10.EGL_RED_SIZE, 8, EGL10.EGL_GREEN_SIZE, 8, EGL10.EGL_BLUE_SIZE, 8,
      EGL10.EGL_ALPHA_SIZE, 8, EGL10.EGL_RENDERABLE_TYPE, EGL10.EGL_WINDOW_BIT, EGL10.EGL_NONE, 0,
      // placeholder for recordable [@-3]
      EGL10.EGL_NONE
  };
  EGLConfig[] configs = new EGLConfig[1];
  int[] numConfigs = new int[1];
  egl.eglChooseConfig(display, attribList, configs, configs.length, numConfigs);
  EGLConfig config = configs[0];
  EGLContext context = egl.eglCreateContext(display, config, EGL10.EGL_NO_CONTEXT, new int[] {
      12440, 2, EGL10.EGL_NONE
  });
  EGLSurface eglSurface = egl.eglCreateWindowSurface(display, config, texture, new int[] {
      EGL10.EGL_NONE
  });

  egl.eglMakeCurrent(display, eglSurface, eglSurface, context);
  GLES20.glClearColor(0, 0, 0, 1);
  GLES20.glClear(GLES20.GL_COLOR_BUFFER_BIT);
  egl.eglSwapBuffers(display, eglSurface);
  egl.eglDestroySurface(display, eglSurface);
  egl.eglMakeCurrent(display, EGL10.EGL_NO_SURFACE, EGL10.EGL_NO_SURFACE, EGL10.EGL_NO_CONTEXT);
  egl.eglDestroyContext(display, context);
  egl.eglTerminate(display);
}
 
开发者ID:pedroSG94,项目名称:rtmp-rtsp-stream-client-java,代码行数:34,代码来源:Camera1ApiManager.java

示例11: ComponentSizeChooser

public ComponentSizeChooser(int redSize, int greenSize, int blueSize, int alphaSize, int depthSize, int stencilSize) {
  super(new int[]{EGL10.EGL_RED_SIZE, redSize, EGL10.EGL_GREEN_SIZE, greenSize, EGL10.EGL_BLUE_SIZE, blueSize, EGL10.EGL_ALPHA_SIZE, alphaSize, EGL10.EGL_DEPTH_SIZE, depthSize, EGL10.EGL_STENCIL_SIZE, stencilSize, EGL10.EGL_NONE});
  mValue = new int[1];
  mRedSize = redSize;
  mGreenSize = greenSize;
  mBlueSize = blueSize;
  mAlphaSize = alphaSize;
  mDepthSize = depthSize;
  mStencilSize = stencilSize;
}
 
开发者ID:coding-dream,项目名称:TPlayer,代码行数:10,代码来源:EGL.java

示例12: eglSetup

private void eglSetup(int width, int height) {
    mEGL = (EGL10) EGLContext.getEGL();
    mEGLDisplay = mEGL.eglGetDisplay(EGL10.EGL_DEFAULT_DISPLAY);

    if (mEGLDisplay == EGL10.EGL_NO_DISPLAY) {
        throw new RuntimeException("unable to get EGL10 display");
    }

    if (!mEGL.eglInitialize(mEGLDisplay, null)) {
        mEGLDisplay = null;
        throw new RuntimeException("unable to initialize EGL10");
    }

    int[] attribList = {
            EGL10.EGL_RED_SIZE, 8,
            EGL10.EGL_GREEN_SIZE, 8,
            EGL10.EGL_BLUE_SIZE, 8,
            EGL10.EGL_ALPHA_SIZE, 8,
            EGL10.EGL_SURFACE_TYPE, EGL10.EGL_PBUFFER_BIT,
            EGL10.EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,
            EGL10.EGL_NONE
    };
    EGLConfig[] configs = new EGLConfig[1];
    int[] numConfigs = new int[1];
    if (!mEGL.eglChooseConfig(mEGLDisplay, attribList, configs, configs.length, numConfigs)) {
        throw new RuntimeException("unable to find RGB888+pbuffer EGL config");
    }
    int[] attrib_list = {
            EGL_CONTEXT_CLIENT_VERSION, 2,
            EGL10.EGL_NONE
    };
    mEGLContext = mEGL.eglCreateContext(mEGLDisplay, configs[0], EGL10.EGL_NO_CONTEXT, attrib_list);
    checkEglError("eglCreateContext");
    if (mEGLContext == null) {
        throw new RuntimeException("null context");
    }
    int[] surfaceAttribs = {
            EGL10.EGL_WIDTH, width,
            EGL10.EGL_HEIGHT, height,
            EGL10.EGL_NONE
    };
    mEGLSurface = mEGL.eglCreatePbufferSurface(mEGLDisplay, configs[0], surfaceAttribs);
    checkEglError("eglCreatePbufferSurface");
    if (mEGLSurface == null) {
        throw new RuntimeException("surface was null");
    }
}
 
开发者ID:fishwjy,项目名称:VideoCompressor,代码行数:47,代码来源:OutputSurface.java

示例13: build

int[] build(){
    return new int[]{0x3098,version, EGL10.EGL_NONE};
}
 
开发者ID:aiyaapp,项目名称:AAVT,代码行数:3,代码来源:EGLContextAttrs.java

示例14: start

/**
 * Initialize EGL for a given configuration spec.
 * @param configSpec
 */
public void start(){

	Log.v("SDL", "GLSurfaceView_SDL::EglHelper::start(): creating GL context");
	/*
	 * Get an EGL instance
	 */
	mEgl = (EGL10) EGLContext.getEGL();

	/*
	 * Get to the default display.
	 */
	mEglDisplay = mEgl.eglGetDisplay(EGL10.EGL_DEFAULT_DISPLAY);

	/*
	 * We can now initialize EGL for that display
	 */
	int[] version = new int[2];
	mEgl.eglInitialize(mEglDisplay, version);
	mEglConfig = mEGLConfigChooser.chooseConfig(mEgl, mEglDisplay);
	if( mEglConfig == null )
		Log.e("SDL", "GLSurfaceView_SDL::EglHelper::start(): mEglConfig is NULL");

	/*
	* Create an OpenGL ES context. This must be done only once, an
	* OpenGL context is a somewhat heavy object.
	*/
	final int EGL_CONTEXT_CLIENT_VERSION = 0x3098;
	final int[] gles2_attrib_list = {EGL_CONTEXT_CLIENT_VERSION, 2, EGL10.EGL_NONE };
	final int[] gles3_attrib_list = {EGL_CONTEXT_CLIENT_VERSION, 3, EGL10.EGL_NONE };

	mEglContext = mEgl.eglCreateContext(mEglDisplay, mEglConfig,
			EGL10.EGL_NO_CONTEXT,
			mEGLConfigChooser.isGles3Required() ? gles3_attrib_list :
			mEGLConfigChooser.isGles2Required() ? gles2_attrib_list : null );

	if( mEglContext == null || mEglContext == EGL10.EGL_NO_CONTEXT )
		Log.e("SDL", "GLSurfaceView_SDL::EglHelper::start(): mEglContext is EGL_NO_CONTEXT, error: " + mEgl.eglGetError());

	mEglSurface = null;
}
 
开发者ID:NeoTerm,项目名称:NeoTerm,代码行数:44,代码来源:GLSurfaceView_SDL.java

示例15: createContext

public EGLContext createContext(EGL10 egl, EGLDisplay display, EGLConfig config) {
  int[] attrib_list = {EGL_CONTEXT_CLIENT_VERSION, 2, EGL10.EGL_NONE};

  return egl.eglCreateContext(display, config, EGL10.EGL_NO_CONTEXT, attrib_list);
}
 
开发者ID:Leavessilent,项目名称:QuanMinTV,代码行数:5,代码来源:EGL.java


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