Examples of gluBuild2DMipmaps()


Examples of javax.media.opengl.glu.GLU.gluBuild2DMipmaps()

                                    image.getWidth(), image.getHeight(), hasBorder ? 1 : 0,
                                    JoglTextureUtil.getGLPixelFormat(image.getDataFormat()),
                                    JoglTextureUtil.getGLPixelDataType(image.getDataType()), image.getData(0));
                        } else {
                            // send to card
                            glu.gluBuild2DMipmaps(GL.GL_TEXTURE_2D,
                                    JoglTextureUtil.getGLInternalFormat(texture.getTextureStoreFormat()),
                                    image.getWidth(), image.getHeight(),
                                    JoglTextureUtil.getGLPixelFormat(image.getDataFormat()),
                                    JoglTextureUtil.getGLPixelDataType(image.getDataType()), image.getData(0));
                        }
View Full Code Here

Examples of javax.media.opengl.glu.GLU.gluBuild2DMipmaps()

                            } else {
                                for (final TextureCubeMap.Face face : TextureCubeMap.Face.values()) {
                                    // ensure the buffer is ready for reading
                                    image.getData(face.ordinal()).rewind();
                                    // send to card
                                    glu.gluBuild2DMipmaps(getGLCubeMapFace(face),
                                            JoglTextureUtil.getGLInternalFormat(texture.getTextureStoreFormat()),
                                            image.getWidth(), image.getWidth(),
                                            JoglTextureUtil.getGLPixelFormat(image.getDataFormat()),
                                            JoglTextureUtil.getGLPixelDataType(image.getDataType()),
                                            image.getData(face.ordinal()));
View Full Code Here

Examples of javax.media.opengl.glu.GLU.gluBuild2DMipmaps()

        //deprectated in opengl 3.0 -will always create mipmaps automatically if lvl 0 changes
//        gl.glTexParameteri( textureTarget, GL.GL_GENERATE_MIPMAP, GL.GL_TRUE );
        if (this.forcedRectMipMaps){
          //Resizes NPOT textures to POT
          GLU glu = ((PGraphicsOpenGL)this.parent.g).glu;
          glu.gluBuild2DMipmaps(textureTarget, internalFormat, this.width, this.height, glFormat, type, buffer);
        }else{
          if (this.fboSupported){ //Naive check if glGenerateMipmapEXT command is supported
            gl.glTexSubImage2D(textureTarget, 0, 0, 0, this.width, this.height, glFormat, type, buffer);
            gl.glGenerateMipmapEXT(textureTarget)//newer OpenGL 3.x method of creating mip maps //TODO problems on ATI? use gl.glEnable(textureTarget) first?
          }else{
View Full Code Here

Examples of javax.media.opengl.glu.GLU.gluBuild2DMipmaps()

            gl.glTexSubImage2D(textureTarget, 0, 0, 0, this.width, this.height, glFormat, type, buffer);
            gl.glGenerateMipmapEXT(textureTarget)//newer OpenGL 3.x method of creating mip maps //TODO problems on ATI? use gl.glEnable(textureTarget) first?
          }else{
            //Old school software method, will resize a NPOT texture to a POT texture
            GLU glu = ((PGraphicsOpenGL)this.parent.g).glu;
            glu.gluBuild2DMipmaps(textureTarget, internalFormat, this.width, this.height, glFormat, type, buffer);
          }
        }
      }
      else{
        gl.glTexSubImage2D(textureTarget, 0, 0, 0, width, height, glFormat, type, buffer); //ORG
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.