Best code examples for Java 8 GL10 class (javax.microedition.khronos.opengles.GL10)

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Java 8 GL10 class.
You can now enable Codota on your own code to easily search and navigate your Java codebase.

Java 8 GL10 examples from Open Source projects
This code example shows how to use the following methods: glDisable, glDisableClientState
      - GL_VERTEX_ARRAY 
      - GL_TEXTURE_COORD_ARRAY 
      - GL_COLOR_ARRAY 
      */ 
    public static final void CC_DISABLE_DEFAULT_GL_STATES(GL10 gl) {
        gl.glDisable(GL10.GL_TEXTURE_2D);
        gl.glDisableClientState(GL10.GL_COLOR_ARRAY);
        gl.glDisableClientState(GL10.GL_TEXTURE_COORD_ARRAY);
        gl.glDisableClientState(GL10.GL_VERTEX_ARRAY);
    } 
 
    /** @def CC_DIRECTOR_INIT 
      - Initializes an EAGLView with 0-bit depth format, and RGB565 render buffer. 
      - The EAGLView view will have multiple touches disabled. 
      - It will create a UIWindow and it will assign it the 'window' variable. 'window' must be declared before calling this marcro. 
      - It will parent the EAGLView to the created window 
      - If the firmware >= 3.1 it will create a Display Link Director. Else it will create an NSTimer director. 
      - It will try to run at 60 FPS. 
      - The FPS won't be displayed. 
      - The orientation will be portrait. 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: glClearColor, glClearDepthf, glDepthFunc, glEnable, glHint
	/** 
	 * The Surface is created/init() 
	 */ 
	public void onSurfaceCreated(GL10 gl, EGLConfig config) {
 
		gl.glShadeModel(GL10.GL_SMOOTH); // Enable Smooth Shading
		gl.glClearColor(0.0f, 0.0f, 0.0f, 0.5f); // Black Background
		gl.glClearDepthf(1.0f); // Depth Buffer Setup
		gl.glEnable(GL10.GL_DEPTH_TEST); // Enables Depth Testing
		gl.glDepthFunc(GL10.GL_LEQUAL); // The Type Of Depth Testing To Do
 
		// Really Nice Perspective Calculations 
		gl.glHint(GL10.GL_PERSPECTIVE_CORRECTION_HINT, GL10.GL_NICEST);
 
	} 
 
	/** 
	 * Here we do our drawing 
	 */ 
	public void onDrawFrame(GL10 gl) {
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: glDrawElements, glEnable, glFrontFace, glTexCoordPointer, glVertexPointer
This code example shows how to use the following methods: glClearColor, glDisable, glEnable, glHint, glShadeModel
        /* 
         * By default, OpenGL enables features that improve quality 
         * but reduce performance. One might want to tweak that 
         * especially on software renderer. 
         */ 
        gl.glDisable(GL10.GL_DITHER);
 
        /* 
         * Some one-time OpenGL initialization can be made here 
         * probably based on features of this particular context 
         */ 
         gl.glHint(GL10.GL_PERSPECTIVE_CORRECTION_HINT,
                 GL10.GL_FASTEST);
 
         if (mTranslucentBackground) {
             gl.glClearColor(0,0,0,0);
         } else { 
             gl.glClearColor(1,1,1,1);
         } 
         gl.glEnable(GL10.GL_CULL_FACE);

8
CodeRank
This code example shows how to use the following methods: glColorPointer, glDrawElements, glEnable, glFrontFace, glShadeModel
Related Java 8 GL10 Questions & Answers: