title: Adreno220 framebuffer object
body: <p>I made a sample JNI android app.</p>
  
  <p>It works well on Galaxy Note(Mali 400MP) but don't work on SGS2LTE(Adreno 220).</p>
  
  <p>I think its problem in making FBO.</p>
  
  <p>cpp code is below</p>
  
  <pre><code>// Create Depth Buffer;
  GL_CMD(glGenFramebuffers(1, &amp;m_depthBuffer))
  GL_CMD(glBindRenderbuffer(GL_RENDERBUFFER, m_depthBuffer))
  GL_CMD(glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH_COMPONENT16, m_width, m_height))
  GL_CMD(glBindRenderbuffer(GL_RENDERBUFFER, 0))
  // Create Stencil Buffer;
  GL_CMD(glGenFramebuffers(1, &amp;m_stencilBuffer))
  GL_CMD(glBindRenderbuffer(GL_RENDERBUFFER, m_stencilBuffer))
  GL_CMD(glRenderbufferStorage(GL_RENDERBUFFER, GL_STENCIL_INDEX8, m_width, m_height))
  GL_CMD(glBindRenderbuffer(GL_RENDERBUFFER, 0))
  
  // Construct FBO
  GL_CMD(glGenFramebuffers(1, &amp;m_fbo))
  GL_CMD(glBindFramebuffer(GL_FRAMEBUFFER, m_fbo))
  GL_CMD(glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, textureId, 0))
  GL_CMD(glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, m_depthBuffer))
  GL_CMD(glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_STENCIL_ATTACHMENT, GL_RENDERBUFFER, m_stencilBuffer))
  
  GLenum status = glCheckFramebufferStatus(GL_FRAMEBUFFER);
  if (status != GL_FRAMEBUFFER_COMPLETE) {
      LOGE("Check Frame Buffer Status Failed : %x", status);
      return;
  }
  
  GL_CMD(glClear(GL_STENCIL_BUFFER_BIT | GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT))
  </code></pre>
  
  <p>status represents 0x8CDD(GL_FRAMEBUFFER_UNSUPPORTED_EXT).</p>
  
  <p>I attach Logcat.</p>
  
  <pre><code>01-03 03:59:32.829: D/libEGL(24851): loaded /system/lib/egl/libGLES_android.so
  01-03 03:59:32.829: D/libEGL(24851): loaded /system/lib/egl/libEGL_adreno200.so
  01-03 03:59:32.839: D/libEGL(24851): loaded /system/lib/egl/libGLESv1_CM_adreno200.so
  01-03 03:59:32.839: D/libEGL(24851): loaded /system/lib/egl/libGLESv2_adreno200.so
  01-03 03:59:32.849: W/EglHelper(24851): createContext com.google.android.gles_jni.EGLContextImpl@40529b80 tid=1
  01-03 03:59:32.869: D/Surface(24851): Surface is full screen
  01-03 03:59:32.899: D/Surface(24851): Surface is full screen
  01-03 03:59:32.899: W/EglHelper(24851): start() tid=1
  01-03 03:59:32.909: W/EglHelper(24851): createContext com.google.android.gles_jni.EGLContextImpl@4052afc0 tid=1
  01-03 03:59:32.909: W/EglHelper(24851): createSurface()  tid=1
  01-03 03:59:32.939: D/dalvikvm(24851): Note: class Landroid/opengl/GLWrapperBase; has 211 unimplemented (abstract) methods
  01-03 03:59:32.939: I/EGLUtils(24851): GL Version = OpenGL ES 2.0 1566933
  01-03 03:59:32.939: I/EGLUtils(24851): GL Vendor = Qualcomm
  01-03 03:59:32.949: I/EGLUtils(24851): GL Renderer = Adreno (TM) 220
  01-03 03:59:32.949: I/EGLUtils(24851): GL Extensions = GL_AMD_compressed_ATC_texture GL_AMD_performance_monitor GL_AMD_program_binary_Z400 GL_EXT_texture_filter_anisotropic GL_EXT_texture_format_BGRA8888 GL_EXT_texture_type_2_10_10_10_REV GL_NV_fence GL_OES_compressed_ETC1_RGB8_texture GL_OES_depth_texture GL_OES_depth24 GL_OES_EGL_image GL_OES_EGL_image_external GL_OES_element_index_uint GL_OES_fbo_render_mipmap GL_OES_fragment_precision_high GL_OES_get_program_binary GL_OES_packed_depth_stencil GL_OES_rgb8_rgba8 GL_OES_standard_derivatives GL_OES_texture_3D GL_OES_texture_float GL_OES_texture_half_float GL_OES_texture_half_float_linear GL_OES_texture_npot GL_OES_vertex_half_float GL_OES_vertex_type_10_10_10_2 GL_QCOM_alpha_test GL_QCOM_binning_control GL_QCOM_driver_control GL_QCOM_perfmon_global_mode GL_QCOM_extended_get GL_QCOM_extended_get2 GL_QCOM_tiled_rendering GL_QCOM_writeonly_rendering GL_QCOM_memory_monitor GL_AMD_compressed_3DC_texture 
  01-03 03:59:32.979: I/GLUtils(24851): EGL Extensions : EGL_KHR_image EGL_KHR_image_base EGL_KHR_image_pixmap EGL_ANDROID_image_native_buffer EGL_ANDROID_swap_rectangle EGL_ANDROID_get_render_buffer 
  01-03 03:59:32.989: I/GLUtils(24851): GL Extensions : GL_AMD_compressed_ATC_texture GL_AMD_performance_monitor GL_AMD_program_binary_Z400 GL_EXT_texture_filter_anisotropic GL_EXT_texture_format_BGRA8888 GL_EXT_texture_type_2_10_10_10_REV GL_NV_fence GL_OES_compressed_ETC1_RGB8_texture GL_OES_depth_texture GL_OES_depth24 GL_OES_EGL_image GL_OES_EGL_image_external GL_OES_element_index_uint GL_OES_fbo_render_mipmap GL_OES_fragment_precision_high GL_OES_get_program_binary GL_OES_packed_depth_stencil GL_OES_rgb8_rgba8 GL_OES_standard_derivatives GL_OES_texture_3D GL_OES_texture_float GL_OES_texture_half_float GL_OES_texture_half_float_linear GL_OES_texture_npot GL_OES_vertex_half_float GL_OES_vertex_type_10_10_10_2 GL_QCOM_alpha_test GL_QCOM_binning_control GL_QCOM_driver_control GL_QCOM_perfmon_global_mode GL_QCOM_extended_get GL_QCOM_extended_get2 GL_QCOM_tiled_rendering GL_QCOM_writeonly_rendering GL_QCOM_memory_monitor GL_AMD_compressed_3DC_texture 
  01-03 03:59:32.989: I/SharedTexture(24851): imageEGL: 0 syncKHR: 0
  01-03 03:59:33.009: D/CLIPBOARD(24851): Hide Clipboard dialog at Starting input: finished by someone else... !
  **01-03 03:59:33.039: E/AGRE(24851): Check Frame Buffer Status Failed : 8cdd**
  </code></pre>
  
  <p>How can it work on Adreno 220?</p>