Tabnine Logo
FrameBuffer$RenderBuffer
Code IndexAdd Tabnine to your IDE (free)

How to use
FrameBuffer$RenderBuffer
in
com.jme3.texture

Best Java code snippets using com.jme3.texture.FrameBuffer$RenderBuffer (Showing top 20 results out of 315)

origin: jMonkeyEngine/jmonkeyengine

private void updateRenderBuffer(FrameBuffer fb, RenderBuffer rb) {
  int id = rb.getId();
  if (id == -1) {
    glfbo.glGenRenderbuffersEXT(intBuf1);
    id = intBuf1.get(0);
    rb.setId(id);
  GLImageFormat glFmt = texUtil.getImageFormatWithError(rb.getFormat(), fb.isSrgb());
origin: jMonkeyEngine/jmonkeyengine

RenderBuffer rb = fb.getColorBuffer(fb.getTargetIndex());
if (context.boundDrawBuf != rb.getSlot()) {
  gl2.glDrawBuffer(GLFbo.GL_COLOR_ATTACHMENT0_EXT + rb.getSlot());
  context.boundDrawBuf = rb.getSlot();
origin: jMonkeyEngine/jmonkeyengine

leftEyeTexture = (Texture2D) getLeftViewPort().getOutputFrameBuffer().getColorBuffer().getTexture();
rightEyeTexture = (Texture2D) getRightViewPort().getOutputFrameBuffer().getColorBuffer().getTexture();
leftEyeDepth = (Texture2D) getLeftViewPort().getOutputFrameBuffer().getDepthBuffer().getTexture();
rightEyeDepth = (Texture2D) getRightViewPort().getOutputFrameBuffer().getDepthBuffer().getTexture();
origin: us.ihmc.thirdparty.jme/jme3-lwjgl

for (int i = 0; i < context.boundFB.getNumColorBuffers(); i++) {
  RenderBuffer rb = context.boundFB.getColorBuffer(i);
  Texture tex = rb.getTexture();
  if (tex != null
      && tex.getMinFilter().usesMipMapLevels()) {
    setTexture(0, rb.getTexture());
    int textureType = convertTextureType(tex.getType(), tex.getImage().getMultiSamples(), rb.getFace());
    glEnable(textureType);
    glGenerateMipmapEXT(textureType);
    RenderBuffer rb = fb.getColorBuffer(fb.getTargetIndex());
    if (context.boundDrawBuf != rb.getSlot()) {
      glDrawBuffer(GL_COLOR_ATTACHMENT0_EXT + rb.getSlot());
      context.boundDrawBuf = rb.getSlot();
origin: us.ihmc/ihmc-jmonkey-engine-toolkit

glReadBuffer(GL_COLOR_ATTACHMENT0_EXT + rb.getSlot());
origin: org.jmonkeyengine/jme3-core

RenderBuffer rb = fb.getColorBuffer(fb.getTargetIndex());
if (context.boundDrawBuf != rb.getSlot()) {
  gl2.glDrawBuffer(GLFbo.GL_COLOR_ATTACHMENT0_EXT + rb.getSlot());
  context.boundDrawBuf = rb.getSlot();
origin: us.ihmc/IHMCJMonkeyEngineToolkit

glReadBuffer(GL_COLOR_ATTACHMENT0_EXT + rb.getSlot());
origin: info.projectkyoto/mms-engine

Format depthFmt = depthBuf.getFormat();
if (!depthFmt.isDepthFormat()){
  return false;
Format colorFmt = colorBuf.getFormat();
if (colorFmt.isDepthFormat())
  return false;
origin: org.jmonkeyengine/jme3-core

for (int i = 0; i < context.boundFB.getNumColorBuffers(); i++) {
  RenderBuffer rb = context.boundFB.getColorBuffer(i);
  Texture tex = rb.getTexture();
  if (tex != null
      && tex.getMinFilter().usesMipMapLevels()) {
    setTexture(0, rb.getTexture());
    int textureType = convertTextureType(tex.getType(), tex.getImage().getMultiSamples(), rb.getFace());
    glfbo.glGenerateMipmapEXT(textureType);
origin: org.jmonkeyengine/jme3-core

private void updateRenderBuffer(FrameBuffer fb, RenderBuffer rb) {
  int id = rb.getId();
  if (id == -1) {
    glfbo.glGenRenderbuffersEXT(intBuf1);
    id = intBuf1.get(0);
    rb.setId(id);
  GLImageFormat glFmt = texUtil.getImageFormatWithError(rb.getFormat(), fb.isSrgb());
origin: org.jmonkeyengine/jme3-core

Format depthFmt = depthBuf.getFormat();
if (!depthFmt.isDepthFormat()){
  return false;
origin: us.ihmc.thirdparty.jme/jme3-lwjgl

private void updateRenderBuffer(FrameBuffer fb, RenderBuffer rb) {
  int id = rb.getId();
  if (id == -1) {
    glGenRenderbuffersEXT(intBuf1);
    id = intBuf1.get(0);
    rb.setId(id);
  TextureUtil.GLImageFormat glFmt = TextureUtil.getImageFormatWithError(caps, rb.getFormat(), fb.isSrgb());
origin: org.jmonkeyengine/jme3-core

/**
 * Creates a shared image object from a jME3 render buffer.
 * The returned image shares the same memory with the jME3 render buffer, changes
 * in one view are visible in the other view.
 * <br>
 * This can be used as an alternative to post processing effects
 * (e.g. reduce sum operations, needed e.g. for tone mapping).
 * <br>
 * <b>Note:</b> The renderbuffer must already been uploaded to the GPU,
 * i.e. it must be used at least once for drawing.
 * <p>
 * Before the returned image can be used, it must be acquried explicitly
 * by {@link Image#acquireImageForSharingAsync(com.jme3.opencl.CommandQueue) }
 * and after modifying it, released by {@link Image#releaseImageForSharingAsync(com.jme3.opencl.CommandQueue) }
 * This is needed so that OpenGL and OpenCL operations do not interfer with each other.
 * 
 * @param buffer
 * @param access
 * @return 
 */
public Image bindRenderBuffer(FrameBuffer.RenderBuffer buffer, MemoryAccess access) {
  if (buffer.getTexture() == null) {
    return bindPureRenderBuffer(buffer, access);
  } else {
    return bindImage(buffer.getTexture(), access);
  }
}
protected abstract Image bindPureRenderBuffer(FrameBuffer.RenderBuffer buffer, MemoryAccess access);
origin: us.ihmc.thirdparty.jme/jme3-lwjgl

private void printRealRenderBufferInfo(FrameBuffer fb, RenderBuffer rb, String name) {
  System.out.println("== Renderbuffer " + name + " ==");
  System.out.println("RB ID: " + rb.getId());
  System.out.println("Is proper? " + glIsRenderbufferEXT(rb.getId()));
  int attachment = convertAttachmentSlot(rb.getSlot());
  int type = glGetFramebufferAttachmentParameteriEXT(GL_DRAW_FRAMEBUFFER_EXT,
      attachment,
      GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT);
  int rbName = glGetFramebufferAttachmentParameteriEXT(GL_DRAW_FRAMEBUFFER_EXT,
      attachment,
      GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT);
  switch (type) {
    case GL_NONE:
      System.out.println("Type: None");
      break;
    case GL_TEXTURE:
      System.out.println("Type: Texture");
      break;
    case GL_RENDERBUFFER_EXT:
      System.out.println("Type: Buffer");
      System.out.println("RB ID: " + rbName);
      break;
  }
}
origin: org.jmonkeyengine/jme3-core

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());
  }
}
origin: org.jmonkeyengine/jme3-core

 /**
 * Add a color texture to use for this framebuffer.
 * If MRT is enabled, then each subsequently added texture can be
 * rendered to through a shader that writes to the array <code>gl_FragData</code>.
 * If MRT is not enabled, then the index set with {@link FrameBuffer#setTargetIndex(int) }
 * is rendered to by the shader.
 *
 * @param tex The cube-map texture to add.
 * @param face The face of the cube-map to render to.
 */
public void addColorTexture(TextureCubeMap tex, TextureCubeMap.Face face) {
  if (id != -1)
    throw new UnsupportedOperationException("FrameBuffer already initialized.");
  Image img = tex.getImage();
  checkSetTexture(tex, false);
  RenderBuffer colorBuf = new RenderBuffer();
  colorBuf.slot = colorBufs.size();
  colorBuf.tex = tex;
  colorBuf.format = img.getFormat();
  colorBuf.face = face.ordinal();
  colorBufs.add(colorBuf);
}
origin: org.jmonkeyengine/jme3-core

/**
 * Add a color texture to use for this framebuffer.
 * If MRT is enabled, then each subsequently added texture can be
 * rendered to through a shader that writes to the array <code>gl_FragData</code>.
 * If MRT is not enabled, then the index set with {@link FrameBuffer#setTargetIndex(int) }
 * is rendered to by the shader.
 * 
 * @param tex The texture to add.
 * @see #addColorBuffer(com.jme3.texture.Image.Format) 
 */
public void addColorTexture(Texture2D tex) {
  if (id != -1)
    throw new UnsupportedOperationException("FrameBuffer already initialized.");
  Image img = tex.getImage();
  checkSetTexture(tex, false);
  RenderBuffer colorBuf = new RenderBuffer();
  colorBuf.slot = colorBufs.size();
  colorBuf.tex = tex;
  colorBuf.format = img.getFormat();
  colorBufs.add(colorBuf);
}

origin: org.jmonkeyengine/jme3-core

/**
 * Add a color texture array to use for this framebuffer.
 * If MRT is enabled, then each subsequently added texture can be
 * rendered to through a shader that writes to the array <code>gl_FragData</code>.
 * If MRT is not enabled, then the index set with {@link FrameBuffer#setTargetIndex(int) }
 * is rendered to by the shader.
 * 
 * @param tex The texture array to add.
 */
public void addColorTexture(TextureArray tex, int layer) {
  if (id != -1)
    throw new UnsupportedOperationException("FrameBuffer already initialized.");
  Image img = tex.getImage();
  checkSetTexture(tex, false);
  RenderBuffer colorBuf = new RenderBuffer();
  colorBuf.slot = colorBufs.size();
  colorBuf.tex = tex;
  colorBuf.format = img.getFormat();
  colorBuf.layer = layer;
  colorBufs.add(colorBuf);
}

origin: org.jmonkeyengine/jme3-core

/**
 * Add a color buffer without a texture bound to it.
 * If MRT is enabled, then each subsequently added texture or buffer can be
 * rendered to through a shader that writes to the array <code>gl_FragData</code>.
 * If MRT is not enabled, then the index set with {@link FrameBuffer#setTargetIndex(int) }
 * is rendered to by the shader.
 * 
 * @param format the format of the color buffer
 * @see #addColorTexture(com.jme3.texture.Texture2D) 
 */
public void addColorBuffer(Image.Format format){
  if (id != -1)
    throw new UnsupportedOperationException("FrameBuffer already initialized.");
  if (format.isDepthFormat())
    throw new IllegalArgumentException("Color buffer format must be color/luminance.");
  
  RenderBuffer colorBuf = new RenderBuffer();
  colorBuf.slot = colorBufs.size();
  colorBuf.format = format;
  
  colorBufs.add(colorBuf);
}

origin: info.projectkyoto/mms-engine

/**
 * Add a color texture to use for this framebuffer.
 * If MRT is enabled, then each subsequently added texture can be
 * rendered to through a shader that writes to the array <code>gl_FragData</code>.
 * If MRT is not enabled, then the index set with {@link FrameBuffer#setTargetIndex(int) }
 * is rendered to by the shader.
 * 
 * @param tex The texture to add.
 */
public void addColorTexture(Texture2D tex) {
  if (id != -1)
    throw new UnsupportedOperationException("FrameBuffer already initialized.");
  Image img = tex.getImage();
  checkSetTexture(tex, false);
  RenderBuffer colorBuf = new RenderBuffer();
  colorBuf.slot = colorBufs.size();
  colorBuf.tex = tex;
  colorBuf.format = img.getFormat();
  colorBufs.add(colorBuf);
}
com.jme3.textureFrameBuffer$RenderBuffer

Javadoc

RenderBuffer represents either a texture or a buffer that will be rendered to. RenderBuffers are attached to an attachment slot on a FrameBuffer.

Most used methods

  • getId
    Do not use.
  • getSlot
    Do not use.
  • getFormat
  • getTexture
  • <init>
  • getFace
  • resetObject
  • setId
    Do not use.
  • getLayer

Popular in Java

  • Reactive rest calls using spring rest template
  • getContentResolver (Context)
  • setContentView (Activity)
  • requestLocationUpdates (LocationManager)
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • Color (java.awt)
    The Color class is used to encapsulate colors in the default sRGB color space or colors in arbitrary
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • FileInputStream (java.io)
    An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now