Examples of glBindTexture()


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

     * @param dc the current draw context.
     */
    protected void endDrawing(DrawContext dc)
    {
        GL2 gl = dc.getGL().getGL2(); // GL initialization checks for GL2 compatibility.
        gl.glBindTexture(GL.GL_TEXTURE_2D, 0);
        gl.glPopAttrib();
    }

    /**
     * Draws the path as an ordered renderable.
View Full Code Here

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

        // Reset the polygon mode
        gl.glPolygonMode(GL.GL_FRONT_AND_BACK, GL2.GL_FILL);

        gl.glDepthMask(false);
        gl.glPixelStorei(GL.GL_UNPACK_ALIGNMENT, 1);
        gl.glBindTexture(GL.GL_TEXTURE_2D, objectId);
        // set up texture parameter
        gl.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_MAG_FILTER, GL.GL_NEAREST);
        gl.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_MIN_FILTER, GL.GL_NEAREST);
        gl.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_WRAP_S, GL.GL_REPEAT);
        gl.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_WRAP_T, GL.GL_REPEAT);
View Full Code Here

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

    GL2 gl = context(ctx).getGL().getGL2();

        int glType = (gl.isExtensionAvailable("GL_EXT_abgr") ? GL2.GL_ABGR_EXT : GL.GL_RGBA);

        gl.glBindTexture(GL.GL_TEXTURE_2D, objectId);

        gl.glTexImage2D(GL2.GL_PROXY_TEXTURE_2D, 0, GL.GL_RGBA, texWidth,
                texHeight, 0, glType, GL.GL_UNSIGNED_BYTE, null);

        int[] width = new int[1];
View Full Code Here

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

          if (chosenCaps.getDoubleBuffered()) {
            // swap = resolve multisampling or flip back/front FBO
            fboDrawable.swapBuffers();
            // unbind texture render target, we read from FBO
            gl.glBindTexture(GL.GL_TEXTURE_2D, 0);
          }

          // bind FBO for reading pixel data
          // GL_FRONT = SamplingSinkFBO if double buffered and multisampled
          // GL_FRONT if double buffered ( = GL_BAck before swap was called)
View Full Code Here

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

            shaderState.bind(gl);
            vao.bind(gl);
            int spaceshipLoc = gl.glGetUniformLocation(shaderProgram.program(), "spaceshipTex");
            gl.glUniform1i(spaceshipLoc, 0);
            gl.glActiveTexture(GL.GL_TEXTURE0);
            gl.glBindTexture(GL.GL_TEXTURE_2D, spaceshipTex.getTextureObject(gl));

            int explosionLoc = gl.glGetUniformLocation(shaderProgram.program(), "explosionTex");
            gl.glUniform1i(explosionLoc, 1);
            gl.glActiveTexture(GL.GL_TEXTURE0 + 1);
            gl.glBindTexture(GL.GL_TEXTURE_2D, explosionTex.getTextureObject(gl));
View Full Code Here

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

            gl.glBindTexture(GL.GL_TEXTURE_2D, spaceshipTex.getTextureObject(gl));

            int explosionLoc = gl.glGetUniformLocation(shaderProgram.program(), "explosionTex");
            gl.glUniform1i(explosionLoc, 1);
            gl.glActiveTexture(GL.GL_TEXTURE0 + 1);
            gl.glBindTexture(GL.GL_TEXTURE_2D, explosionTex.getTextureObject(gl));

            vertices.clear();
            colors.clear();
            final FloatBuffer verticesb = (FloatBuffer) vertices.getBuffer();
            final FloatBuffer colorsb = (FloatBuffer) colors.getBuffer();
View Full Code Here

Examples of javax.microedition.khronos.opengles.GL11.glBindTexture()

        final Bitmap bitmap = Bitmap.getBitmapResource("BlackBerry.png");
        if (bitmap != null) {
            final int[] textureIds = new int[1];
            gl.glGenTextures(1, textureIds, 0);
            final int _texture = textureIds[0];
            gl.glBindTexture(GL10.GL_TEXTURE_2D, _texture);
            GLUtils.glTexImage2D(gl, 0, GL10.GL_RGB,
                    GL10.GL_UNSIGNED_SHORT_5_6_5, bitmap, null);
            gl.glTexParameterx(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MIN_FILTER,
                    GL10.GL_LINEAR);
            gl.glTexParameterx(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MAG_FILTER,
View Full Code Here

Examples of net.java.games.jogl.GL.glBindTexture()

       
       
        GL gl = drawable.getGL();
        GLU glu = drawable.getGLU();
        gl.glGenTextures(1, textures);
        gl.glBindTexture(GL.GL_TEXTURE_2D, textures[0]);
        gl.glDisable(GL.GL_DEPTH_TEST);
        gl.glDisable(GL.GL_LIGHTING);
        gl.glEnable(GL.GL_TEXTURE_2D);
        //gl.glTexEnvf(GL.GL_TEXTURE_ENV, GL.GL_TEXTURE_ENV_MODE, GL.GL_REPLACE);
View Full Code Here

Examples of net.java.games.jogl.GL.glBindTexture()

            //errorCg = CgGL.cgGetError();
            //System.out.println("cgSetParam: "+CgGL.cgGetErrorString(errorCg));
           
            CgGL.cgGLEnableTextureParameter(cgParameter);

            gl.glBindTexture(GL.GL_TEXTURE_2D, textures[0]);
            CgGL.cgGLEnableProfile(getBestProfile());
            //errorCg = CgGL.cgGetError();
            //System.out.println("cgEnableProfile: "+CgGL.cgGetErrorString(errorCg));
        }
        else
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.