Java Code Examples for com.jme3.texture.Image#isUpdateNeeded()
The following examples show how to use
com.jme3.texture.Image#isUpdateNeeded() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: GdxRenderer.java From MikuMikuStudio with BSD 2-Clause "Simplified" License | 6 votes |
public void updateRenderTexture(FrameBuffer fb, RenderBuffer rb) { Texture tex = rb.getTexture(); Image image = tex.getImage(); if (image.isUpdateNeeded()) { updateTexImageData(image, tex.getType(), false); // NOTE: For depth textures, sets nearest/no-mips mode // Required to fix "framebuffer unsupported" // for old NVIDIA drivers! setupTextureParams(tex); } Gdx.gl20.glFramebufferTexture2D(GL20.GL_FRAMEBUFFER, convertAttachmentSlot(rb.getSlot()), convertTextureType(tex.getType()), image.getId(), 0); // RendererUtil.checkGLError(); }
Example 2
Source File: OGLESShaderRenderer.java From MikuMikuStudio with BSD 2-Clause "Simplified" License | 6 votes |
public void updateRenderTexture(FrameBuffer fb, RenderBuffer rb) { Texture tex = rb.getTexture(); Image image = tex.getImage(); if (image.isUpdateNeeded()) { updateTexImageData(image, tex.getType(), false); // NOTE: For depth textures, sets nearest/no-mips mode // Required to fix "framebuffer unsupported" // for old NVIDIA drivers! setupTextureParams(tex); } GLES20.glFramebufferTexture2D(GLES20.GL_FRAMEBUFFER, convertAttachmentSlot(rb.getSlot()), convertTextureType(tex.getType()), image.getId(), 0); // RendererUtil.checkGLError(); }
Example 3
Source File: LwjglRenderer.java From MikuMikuStudio with BSD 2-Clause "Simplified" License | 6 votes |
public void updateRenderTexture(FrameBuffer fb, RenderBuffer rb) { Texture tex = rb.getTexture(); Image image = tex.getImage(); if (image.isUpdateNeeded()) { updateTexImageData(image, tex.getType(), tex.getMinFilter().usesMipMapLevels(), 0); // NOTE: For depth textures, sets nearest/no-mips mode // Required to fix "framebuffer unsupported" // for old NVIDIA drivers! setupTextureParams(tex); } glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, convertAttachmentSlot(rb.getSlot()), convertTextureType(tex.getType(), image.getMultiSamples()), image.getId(), 0); }
Example 4
Source File: GLRenderer.java From jmonkeyengine with BSD 3-Clause "New" or "Revised" License | 5 votes |
public void updateRenderTexture(FrameBuffer fb, RenderBuffer rb) { Texture tex = rb.getTexture(); Image image = tex.getImage(); if (image.isUpdateNeeded()) { // Check NPOT requirements checkNonPowerOfTwo(tex); updateTexImageData(image, tex.getType(), 0, false); // NOTE: For depth textures, sets nearest/no-mips mode // Required to fix "framebuffer unsupported" // for old NVIDIA drivers! setupTextureParams(0, tex); } if (rb.getLayer() < 0){ glfbo.glFramebufferTexture2DEXT(GLFbo.GL_FRAMEBUFFER_EXT, convertAttachmentSlot(rb.getSlot()), convertTextureType(tex.getType(), image.getMultiSamples(), rb.getFace()), image.getId(), 0); } else { glfbo.glFramebufferTextureLayerEXT(GLFbo.GL_FRAMEBUFFER_EXT, convertAttachmentSlot(rb.getSlot()), image.getId(), 0, rb.getLayer()); } }