Examples of glBindTexture()


Examples of com.badlogic.gdx.graphics.GL20.glBindTexture()

      handle.clear();
      gl.glGenRenderbuffers(1, handle);
      depthbufferHandle = handle.get(0);
    }

    gl.glBindTexture(GL20.GL_TEXTURE_2D, colorTexture.getTextureObjectHandle());

    if (hasDepth) {
      gl.glBindRenderbuffer(GL20.GL_RENDERBUFFER, depthbufferHandle);
      gl.glRenderbufferStorage(GL20.GL_RENDERBUFFER, GL20.GL_DEPTH_COMPONENT16, colorTexture.getWidth(),
        colorTexture.getHeight());
View Full Code Here

Examples of com.badlogic.gdx.graphics.GL20.glBindTexture()

      gl.glFramebufferRenderbuffer(GL20.GL_FRAMEBUFFER, GL20.GL_DEPTH_ATTACHMENT, GL20.GL_RENDERBUFFER, depthbufferHandle);
    }
    int result = gl.glCheckFramebufferStatus(GL20.GL_FRAMEBUFFER);

    gl.glBindRenderbuffer(GL20.GL_RENDERBUFFER, 0);
    gl.glBindTexture(GL20.GL_TEXTURE_2D, 0);
    gl.glBindFramebuffer(GL20.GL_FRAMEBUFFER, defaultFramebufferHandle);

    if (result != GL20.GL_FRAMEBUFFER_COMPLETE) {
      colorTexture.dispose();
      if (hasDepth) {
View Full Code Here

Examples of javax.media.opengl.GL.glBindTexture()

        gl.glDisable(GL2.GL_TEXTURE_3D);

        if (!enable) {
            gl.glDisable(GL.GL_TEXTURE_2D);
        } else {
            gl.glBindTexture(GL.GL_TEXTURE_2D, objectId);
            gl.glEnable(GL.GL_TEXTURE_2D);
        }
    }

    @Override
View Full Code Here

Examples of javax.media.opengl.GL.glBindTexture()

        gl.glDisable(GL.GL_TEXTURE_CUBE_MAP);

        if (!enable) {
            gl.glDisable(GL2.GL_TEXTURE_3D);
        } else {
            gl.glBindTexture(GL2.GL_TEXTURE_3D, objectId);
            gl.glEnable(GL2.GL_TEXTURE_3D);
        }
    }

    @Override
View Full Code Here

Examples of javax.media.opengl.GL.glBindTexture()

        // TextureCubeMap will take precedure over 3D Texture so
        // there is no need to disable 3D Texture here.
        if (!enable) {
            gl.glDisable(GL.GL_TEXTURE_CUBE_MAP);
        } else {
            gl.glBindTexture(GL.GL_TEXTURE_CUBE_MAP, objectId);
            gl.glEnable(GL.GL_TEXTURE_CUBE_MAP);
        }
    }

    @Override
View Full Code Here

Examples of javax.media.opengl.GL.glBindTexture()

            context.setCurrentState(StateType.Texture, null);
        }
        checkAndSetUnit(unit, record, caps);

        final int id = texture.getTextureIdForContext(context.getGlContextRep());
        gl.glBindTexture(getGLType(texture.getType()), id);
        if (Constants.stats) {
            StatCollector.addStat(StatType.STAT_TEXTURE_BINDS, 1);
        }
        if (record != null) {
            record.units[unit].boundTexture = id;
View Full Code Here

Examples of javax.media.opengl.GL.glBindTexture()

                    // forces the rebinding when the drawable uses a frame buffer object
                    final boolean fbo = drawable.getChosenGLCapabilities().isFBO();
                    // texture already exists in OpenGL, just bind it if needed
                    if (!unitRecord.isValid() || unitRecord.boundTexture != textureId || fbo) {
                        checkAndSetUnit(i, record, caps);
                        gl.glBindTexture(getGLType(type), textureId);
                        if (Constants.stats) {
                            StatCollector.addStat(StatType.STAT_TEXTURE_BINDS, 1);
                        }
                        unitRecord.boundTexture = textureId;
                    }
View Full Code Here

Examples of javax.media.opengl.GL.glBindTexture()

     
      //tells opengl which texture to reference in following calls from now on!
      //the first parameter is eigher GL.GL_TEXTURE_2D or ..1D
      gl.glEnable(textureTarget);
      usedTextureID = tex.getTextureID();
      gl.glBindTexture(textureTarget, tex.getTextureID());
     
      gl.glEnableClientState(GL.GL_TEXTURE_COORD_ARRAY);
      gl.glTexCoordPointer(2, GL.GL_FLOAT, 0, tbuff);
      textureDrawn = true;
    }
View Full Code Here

Examples of javax.media.opengl.GL.glBindTexture()

   
    // START recording display list and DRAW////////////////////
    gl.glNewList(listIDFill, GL.GL_COMPILE);
      if (textureDrawn){
        gl.glEnable(textureTarget); //muss texture in der liste gebinded werden? anscheinend JA!
        gl.glBindTexture(textureTarget, usedTextureID);
      }
     
      //DRAW with drawElements if geometry is indexed, else draw with drawArrays!
      if (geometryInfo.isIndexed()){
        gl.glDrawElements(fillDrawMode, indexBuff.capacity(), GL.GL_UNSIGNED_INT, indexBuff); //limit() oder capacity()??
View Full Code Here

Examples of javax.media.opengl.GL.glBindTexture()

      }else{
        gl.glDrawArrays(fillDrawMode, 0, vertBuff.capacity()/3);
      }
     
      if (textureDrawn){
        gl.glBindTexture(textureTarget, 0);
        gl.glDisable(textureTarget);
      }
    gl.glEndList();
    //// STOP recording display list and DRAW////////////////////
   
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.