public GLRenderer(GL gl, GLExt glext, GLFbo glfbo) { this.gl = gl; this.gl2 = gl instanceof GL2 ? (GL2)gl : null; this.gl3 = gl instanceof GL3 ? (GL3)gl : null; this.gl4 = gl instanceof GL4 ? (GL4)gl : null; this.glfbo = glfbo; this.glext = glext; this.texUtil = new TextureUtil(gl, gl2, glext); }
public GLImageFormat getImageFormatWithError(Format fmt, boolean isSrgb) { //if the passed format is one kind of depth there isno point in getting the srgb format; isSrgb = isSrgb && !fmt.isDepthFormat(); GLImageFormat glFmt = getImageFormat(fmt, isSrgb); if (glFmt == null && isSrgb) { glFmt = getImageFormat(fmt, false); logger.log(Level.WARNING, "No sRGB format available for ''{0}''. Failling back to linear.", fmt); } if (glFmt == null) { throw new RendererException("Image format '" + fmt + "' is unsupported by the video hardware."); } return glFmt; }
GLImageFormat oglFormat = getImageFormatWithError(jmeFormat, getSrgbFormat); setupTextureSwizzle(target, jmeFormat); uploadTextureLevel(oglFormat, target, i, index, sliceCount, mipWidth, mipHeight, mipDepth, samples, data);
public void readFrameBufferWithFormat(FrameBuffer fb, ByteBuffer byteBuf, Image.Format format) { GLImageFormat glFormat = texUtil.getImageFormatWithError(format, false); readFrameBufferWithGLFormat(fb, byteBuf, glFormat.format, glFormat.dataType); }
public void modifyTexture(Texture tex, Image pixels, int x, int y) { setTexture(0, tex); int target = convertTextureType(tex.getType(), pixels.getMultiSamples(), -1); texUtil.uploadSubTexture(pixels, target, 0, x, y, linearizeSrgbImages); }
texUtil.uploadTexture(imageForUpload, GL.GL_TEXTURE_CUBE_MAP_POSITIVE_X + i, i, linearizeSrgbImages); texUtil.uploadTexture(imageForUpload, target, -1, linearizeSrgbImages); texUtil.uploadTexture(imageForUpload, target, i, linearizeSrgbImages); texUtil.uploadTexture(imageForUpload, target, 0, linearizeSrgbImages);
texUtil.initialize(caps);
GLImageFormat oglFormat = getImageFormatWithError(jmeFormat, getSrgbFormat);
public void modifyTexture(Texture tex, Image pixels, int x, int y) { setTexture(0, tex); int target = convertTextureType(tex.getType(), pixels.getMultiSamples(), -1); texUtil.uploadSubTexture(pixels, target, 0, x, y, linearizeSrgbImages); }
texUtil.uploadTexture(imageForUpload, GL.GL_TEXTURE_CUBE_MAP_POSITIVE_X + i, i, linearizeSrgbImages); texUtil.uploadTexture(imageForUpload, target, -1, linearizeSrgbImages); texUtil.uploadTexture(imageForUpload, target, i, linearizeSrgbImages); texUtil.uploadTexture(imageForUpload, target, 0, linearizeSrgbImages);
texUtil.initialize(caps);
GLImageFormat oglFormat = getImageFormatWithError(jmeFormat, getSrgbFormat); setupTextureSwizzle(target, jmeFormat); uploadTextureLevel(oglFormat, target, i, index, sliceCount, mipWidth, mipHeight, mipDepth, samples, data);
GLImageFormat glFmt = texUtil.getImageFormatWithError(rb.getFormat(), fb.isSrgb());
public GLRenderer(GL gl, GLExt glext, GLFbo glfbo) { this.gl = gl; this.gl2 = gl instanceof GL2 ? (GL2)gl : null; this.gl3 = gl instanceof GL3 ? (GL3)gl : null; this.gl4 = gl instanceof GL4 ? (GL4)gl : null; this.glfbo = glfbo; this.glext = glext; this.texUtil = new TextureUtil(gl, gl2, glext); }
public GLImageFormat getImageFormatWithError(Format fmt, boolean isSrgb) { //if the passed format is one kind of depth there isno point in getting the srgb format; isSrgb = isSrgb && !fmt.isDepthFormat(); GLImageFormat glFmt = getImageFormat(fmt, isSrgb); if (glFmt == null && isSrgb) { glFmt = getImageFormat(fmt, false); logger.log(Level.WARNING, "No sRGB format available for ''{0}''. Failling back to linear.", fmt); } if (glFmt == null) { throw new RendererException("Image format '" + fmt + "' is unsupported by the video hardware."); } return glFmt; }
public void readFrameBufferWithFormat(FrameBuffer fb, ByteBuffer byteBuf, Image.Format format) { GLImageFormat glFormat = texUtil.getImageFormatWithError(format, false); readFrameBufferWithGLFormat(fb, byteBuf, glFormat.format, glFormat.dataType); }
GLImageFormat oglFormat = getImageFormatWithError(jmeFormat, getSrgbFormat);
GLImageFormat glFmt = texUtil.getImageFormatWithError(rb.getFormat(), fb.isSrgb());