<commit_before>#ifndef SRC_GRAPHICS_FRAME_BUFFER_OBJECT_H_

#define SRC_GRAPHICS_FRAME_BUFFER_OBJECT_H_

#include <memory>
#include <vector>

namespace Graphics
{

class Gl;

/**
 * \brief Encapsulates a frame buffer with textures for color and depth
 * attachments
 *
 * FrameBufferObject::initialize must be called once, and
 * FrameBufferObject::resize if the window is resized (mind that it must be
 * called from the rendering thread).
 *
 * To draw into the frame buffer call FrameBufferObject::bind. After drawing
 * call FrameBufferObject::unbind.
 *
 * Using FrameBufferObject::bindColorTexture or
 * FrameBufferObject::bindDepthTexture binds
 * the corresponding texture so that it can be used.
 */
class FrameBufferObject
{
 public:
  explicit FrameBufferObject(int layerCount);
  ~FrameBufferObject();

  void initialize(Gl *gl, int width, int height);

  void resize(int width, int height);

  void bind();
  void unbind();

  void bindColorTexture(int index, unsigned int textureUnit);

  void bindDepthTexture(unsigned int textureUnit);

  unsigned int getColorTextureId(int index);
  unsigned int getDepthTextureId(int index);
  unsigned int getDepthTextureId();

  int getLayerCount();

 private:
  int layerCount;
  unsigned int framebuffer = 0;
  std::vector<unsigned int> colorTextures;
  unsigned int depthTexture = 0;
  Gl *gl;

  void resizeAndSetColorAttachment(int texture, int attachment, int width,
                                   int height);
  void resizeAndSetDepthAttachment(int width, int height);
  void resizeTexture(int texture, int width, int height, unsigned int component,
                     unsigned int format, unsigned int type);
};

}  // namespace Graphics

#endif  // SRC_GRAPHICS_FRAME_BUFFER_OBJECT_H_
<commit_msg>Remove unused method in FBO header.<commit_after>#ifndef SRC_GRAPHICS_FRAME_BUFFER_OBJECT_H_

#define SRC_GRAPHICS_FRAME_BUFFER_OBJECT_H_

#include <memory>
#include <vector>

namespace Graphics
{

class Gl;

/**
 * \brief Encapsulates a frame buffer with textures for color and depth
 * attachments
 *
 * FrameBufferObject::initialize must be called once, and
 * FrameBufferObject::resize if the window is resized (mind that it must be
 * called from the rendering thread).
 *
 * To draw into the frame buffer call FrameBufferObject::bind. After drawing
 * call FrameBufferObject::unbind.
 *
 * Using FrameBufferObject::bindColorTexture or
 * FrameBufferObject::bindDepthTexture binds
 * the corresponding texture so that it can be used.
 */
class FrameBufferObject
{
 public:
  explicit FrameBufferObject(int layerCount);
  ~FrameBufferObject();

  void initialize(Gl *gl, int width, int height);

  void resize(int width, int height);

  void bind();
  void unbind();

  void bindColorTexture(int index, unsigned int textureUnit);

  void bindDepthTexture(unsigned int textureUnit);

  unsigned int getColorTextureId(int index);
  unsigned int getDepthTextureId();

  int getLayerCount();

 private:
  int layerCount;
  unsigned int framebuffer = 0;
  std::vector<unsigned int> colorTextures;
  unsigned int depthTexture = 0;
  Gl *gl;

  void resizeAndSetColorAttachment(int texture, int attachment, int width,
                                   int height);
  void resizeAndSetDepthAttachment(int width, int height);
  void resizeTexture(int texture, int width, int height, unsigned int component,
                     unsigned int format, unsigned int type);
};

}  // namespace Graphics

#endif  // SRC_GRAPHICS_FRAME_BUFFER_OBJECT_H_

{'fraction_non_alphanumeric': 0.07584830339321358, 'fraction_numerical': 0.0011405759908753922, 'mean_word_length': 4.275187969924812, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3204182', 'n_tokens_mistral': 995, 'n_tokens_neox': 950, 'n_words': 337}