SuperimposeMesh
All Classes Files Functions Variables Typedefs Enumerations Enumerator Pages
SICAD.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2016-2019 Istituto Italiano di Tecnologia (IIT)
3  *
4  * This software may be modified and distributed under the terms of the
5  * BSD 3-Clause license. See the accompanying LICENSE file for details.
6  */
7 
8 #ifndef SUPERIMPOSECAD_H
9 #define SUPERIMPOSECAD_H
10 
12 
13 #include "Model.h"
14 #include "Shader.h"
15 
16 #include <memory>
17 #include <string>
18 #include <thread>
19 #include <utility>
20 #include <vector>
21 
22 #include <GL/glew.h>
23 #include <GLFW/glfw3.h>
24 #include <glm/glm.hpp>
25 
26 
27 /**
28  * A Superimpose derived class to superimpose mesh models on images.
29  */
30 class SICAD : public Superimpose
31 {
32 public:
33  typedef typename std::unordered_map<std::string, std::string> ModelPathContainer;
34 
35  typedef typename std::pair<std::string, std::string> ModelPathElement;
36 
37  typedef typename std::unordered_map<std::string, Model*> ModelContainer;
38 
39  typedef typename std::pair<std::string, Model*> ModelElement;
40 
41  enum class MIPMaps
42  {
43  nearest,
44  linear
45  };
46 
47  /**
48  * Create a SICAD object with a dedicated OpenGL context and default shaders.
49  *
50  * Only 1 image will be rendered in the OpenGL context.
51  *
52  * The reference frame of the OpenGL virtual camera is the standard right-handed system and can be
53  * changed by means of `ogl_to_cam` parameter.
54  *
55  * @param objfile_map A (tag, path) container to associate a 'tag' to the mesh file specified in 'path'.
56  * @param cam_width Camera or image width.
57  * @param cam_height Camera or image height.
58  * @param cam_fx focal Length along the x axis in pixels.
59  * @param cam_fy focal Length along the y axis in pixels.
60  */
61  SICAD(const ModelPathContainer& objfile_map, const GLsizei cam_width, const GLsizei cam_height, const GLfloat cam_fx, const GLfloat cam_fy, const GLfloat cam_cx, const GLfloat cam_cy);
62 
63  /**
64  * Create a SICAD object with a dedicated OpenGL context and default shaders.
65  *
66  * Up to `num_images` images will be rendered in the same OpenGL context and the result of
67  * the process will be tiled up in a regular grid. This implies that the total number
68  * of rendered images may be less than or equal to the required `num_images`. The total
69  * number of rendered images is chosen to optimize performance and accessibility and can be
70  * accessed through `SICAD::getTilesNumber()`.
71  *
72  * The reference frame of the OpenGL virtual camera is the standard right-handed system.
73  *
74  * @param objfile_map A (tag, path) container to associate a 'tag' to the mesh file specified in 'path'.
75  * @param cam_width Camera or image width.
76  * @param cam_height Camera or image height.
77  * @param cam_fx focal Length along the x axis in pixels.
78  * @param cam_fy focal Length along the y axis in pixels.
79  * @param num_images Number of images (i.e. viewports) rendered in the same GL context.
80  */
81  SICAD(const ModelPathContainer& objfile_map, const GLsizei cam_width, const GLsizei cam_height, const GLfloat cam_fx, const GLfloat cam_fy, const GLfloat cam_cx, const GLfloat cam_cy, const GLint num_images);
82 
83  /**
84  * Create a SICAD object with a dedicated OpenGL context and custom shaders.
85  * The folder where the shaders are stored can be specified in `shader_folder`.
86  *
87  * The following shaders with this exact names are needed:
88  *
89  * - `shader_model.vert` for the vertex shader for mesh models
90  * - `shader_model.frag` for the fragment shader for mesh models
91  * - `shader_model_texture.frag` for the fragment shader for textured mesh models
92  *
93  * - `shader_frame.vert` for the vertex shader for reference frames
94  * - `shader_frame.frag` for the fragment shader for reference frames
95  *
96  * - `shader_background.vert` for the vertex shader for background
97  * - `shader_background.frag` for the fragment shader for background
98  *
99  * Up to `num_images` images will be rendered in the same OpenGL context and the result of
100  * the process will be tiled up in a regular grid. This implies that the total number
101  * of rendered images may be less than or equal to the required `num_images`. The total
102  * number of rendered images is chosen to optimize performance and accessibility and can be
103  * accessed through `SICAD::getTilesNumber()`.
104  *
105  * The reference frame of the OpenGL virtual camera is the standard right-handed system.
106  *
107  * @param objfile_map A (tag, path) container to associate a 'tag' to the mesh file specified in 'path'.
108  * @param cam_width Camera or image width.
109  * @param cam_height Camera or image height.
110  * @param cam_fx focal Length along the x axis in pixels.
111  * @param cam_fy focal Length along the y axis in pixels.
112  * @param num_images Number of images (i.e. viewports) rendered in the same GL context.
113  * @param shader_folder Path to the folder containing the above-mentioned required shaders.
114  */
115  SICAD(const ModelPathContainer& objfile_map, const GLsizei cam_width, const GLsizei cam_height, const GLfloat cam_fx, const GLfloat cam_fy, const GLfloat cam_cx, const GLfloat cam_cy, const GLint num_images, const std::string& shader_folder);
116 
117  /**
118  * Create a SICAD object with a dedicated OpenGL context and custom shaders.
119  * The folder where the shaders are stored can be specified in `shader_folder`.
120  *
121  * The following shaders with this exact names are needed:
122  *
123  * - `shader_model.vert` for the vertex shader for mesh models
124  * - `shader_model.frag` for the fragment shader for mesh models
125  * - `shader_model_texture.frag` for the fragment shader for textured mesh models
126  *
127  * - `shader_frame.vert` for the vertex shader for reference frames
128  * - `shader_frame.frag` for the fragment shader for reference frames
129  *
130  * - `shader_background.vert` for the vertex shader for background
131  * - `shader_background.frag` for the fragment shader for background
132  *
133  * Up to `num_images` images will be rendered in the same OpenGL context and the result of
134  * the process will be tiled up in a regular grid. This implies that the total number
135  * of rendered images may be less than or equal to the required `num_images`. The total
136  * number of rendered images is chosen to optimize performance and accessibility and can be
137  * accessed through `SICAD::getTilesNumber()`.
138  *
139  * The reference frame of the OpenGL virtual camera is the standard right-handed system and can be
140  * changed by means of `ogl_to_cam`.
141  *
142  * @param objfile_map A (tag, path) container to associate a 'tag' to the mesh file specified in 'path'.
143  * @param cam_width Camera or image width.
144  * @param cam_height Camera or image height.
145  * @param cam_fx focal Length along the x axis in pixels.
146  * @param cam_fy focal Length along the y axis in pixels.
147  * @param num_images Number of images (i.e. viewports) rendered in the same GL context.
148  * @param shader_folder Path to the folder containing the above-mentioned required shaders.
149  * @param ogl_to_cam A 7-component pose vector, (x, y, z) position and a (ux, uy, uz, theta) axis-angle orientation, defining a camera rotation applied to the OpenGL camera.
150  */
151  SICAD(const ModelPathContainer& objfile_map, const GLsizei cam_width, const GLsizei cam_height, const GLfloat cam_fx, const GLfloat cam_fy, const GLfloat cam_cx, const GLfloat cam_cy, const GLint num_images, const std::string& shader_folder, const std::vector<float>& ogl_to_cam);
152 
153  virtual ~SICAD();
154 
156 
157  void setOglWindowShouldClose(bool should_close);
158 
159  /**
160  * Render the mesh models in the pose specified in `objpos_map` and move the virtual camera in `cam_x` position with orientation `cam_o`.
161  * The method then creates an image of the mesh models as they are seen by the virtual camera.
162  *
163  * @note If cv::Mat `img` is a background image it must be of size `cam_width * cam_height`, as specified during object construction,
164  * and the `SICAD::setBackgroundOpt(bool show_background)` must have been invoked with `true`.
165  *
166  * @param objpos_map A (tag, pose) container to associate a 7-component `pose`, (x, y, z) position and a (ux, uy, uz, theta) axis-angle orientation, to a mesh with tag 'tag'.
167  * @param cam_x (x, y, z) position.
168  * @param cam_o (ux, uy, uz, theta) axis-angle orientation.
169  * @param img An image representing the result of the superimposition. The variable is automatically resized if its size is not correct to store the entire result of the superimposition.
170  *
171  * @return true upon success, false otherswise.
172  **/
173  bool superimpose(const ModelPoseContainer& objpos_map, const double* cam_x, const double* cam_o, cv::Mat& img) override;
174 
175  /**
176  * Render the mesh models in the pose specified in each element of `objpos_multimap` and move the virtual camera in
177  * `cam_x` position with orientation `cam_o`. Each group of meshes specified by the elements of `objpos_multimap` are rendered in a
178  * different viewport. Each viewport reports the mesh models as they are seen by the virtual camera.
179  * The method then creates a single image tiling the viewports in a regular grid.
180  *
181  * @note The size of the grid representing the tiled viewports can be accessed through `getTilesRows()` and `getTilesCols()`.
182  *
183  * @note If cv::Mat `img` is a background image it must be of size `cam_width * cam_height`, as specified during object construction,
184  * and the `SICAD::setBackgroundOpt(bool show_background)` must have been invoked with `true`.
185  *
186  * @param objpos_map A (tag, pose) container to associate a 7-component `pose`, (x, y, z) position and a (ux, uy, uz, theta) axis-angle orientation, to a mesh with tag 'tag'.
187  * @param cam_x (x, y, z) position.
188  * @param cam_o (ux, uy, uz, theta) axis-angle orientation.
189  * @param img An image representing the result of the superimposition. The variable is automatically resized if its size is not correct to store the entire result of the superimposition.
190  *
191  * @return true upon success, false otherswise.
192  **/
193  virtual bool superimpose(const std::vector<ModelPoseContainer>& objpos_multimap, const double* cam_x, const double* cam_o, cv::Mat& img);
194 
195  virtual bool superimpose(const ModelPoseContainer& objpos_map, const double* cam_x, const double* cam_o, cv::Mat& img,
196  const GLsizei cam_width, const GLsizei cam_height, const GLfloat cam_fx, const GLfloat cam_fy, const GLfloat cam_cx, const GLfloat cam_cy);
197 
198  virtual bool superimpose(const std::vector<ModelPoseContainer>& objpos_multimap, const double* cam_x, const double* cam_o, cv::Mat& img,
199  const GLsizei cam_width, const GLsizei cam_height, const GLfloat cam_fx, const GLfloat cam_fy, const GLfloat cam_cx, const GLfloat cam_cy);
200 
201  /**
202  * Render the mesh models in the pose specified in `objpos_map` and move the virtual camera in `cam_x` position with orientation `cam_o`.
203  * The method then stores the pixels of the mesh models as they are seen by the virtual camera in the `pbo_index`-th Pixel Buffer Object (PBO).
204  *
205  * @note By invoking this command rendered pixels are stored in the `pbo_index`-th PBO and, in order to use it, the OpenGL context must remain current.
206  * As a consequence, once you are done working with the `pbo_index`-th PBO (can be accessed by means of `SICAD::getPBO(pbo_index)`) and before invoking again
207  * any other `SICAD::superimpose()` function, you must invoke `SICAD::releaseContext()`.
208  *
209  * @param objpos_map A (tag, pose) container to associate a 7-component `pose`, (x, y, z) position and a (ux, uy, uz, theta) axis-angle orientation, to a mesh with tag 'tag'.
210  * @param cam_x (x, y, z) position.
211  * @param cam_o (ux, uy, uz, theta) axis-angle orientation.
212  * @param pbo_index The index of the PBO where the pixel are stored.
213  *
214  * @return (true, PBO) upon success, (false, 0) otherswise.
215  **/
216  virtual bool superimpose(const ModelPoseContainer& objpos_map, const double* cam_x, const double* cam_o, const size_t pbo_index);
217 
218  /**
219  * Render the mesh models in the pose specified in `objpos_map` and move the virtual camera in `cam_x` position with orientation `cam_o`.
220  * The method then stores the pixels of the mesh models as they are seen by the virtual camera in the `pbo_index`-th Pixel Buffer Object (PBO).
221  *
222  * @note `img` must be of size `cam_width * cam_height`, as specified during object construction, and the
223  * `SICAD::setBackgroundOpt(bool show_background)` must have been invoked with `true`.
224  *
225  * @param objpos_map A (tag, pose) container to associate a 7-component `pose`, (x, y, z) position and a (ux, uy, uz, theta) axis-angle orientation, to a mesh with tag 'tag'.
226  * @param cam_x (x, y, z) position.
227  * @param cam_o (ux, uy, uz, theta) axis-angle orientation.
228  * @param pbo_index The index of the PBO where the pixel are stored.
229  * @param img A background image.
230  *
231  * @return (true, PBO) upon success, (false, 0) otherswise.
232  **/
233  virtual bool superimpose(const ModelPoseContainer& objpos_map, const double* cam_x, const double* cam_o, const size_t pbo_index, const cv::Mat& img);
234 
235  /**
236  * Render the mesh models in the pose specified in each element of `objpos_multimap` and move the virtual camera in
237  * `cam_x` position with orientation `cam_o`. Each group of meshes specified by the elements of `objpos_multimap` are rendered in a
238  * different viewport. Each viewport reports the mesh models as they are seen by the virtual camera.
239  * The method then stores the pixels of the viewports in the `pbo_index`-th Pixel Buffer Object (PBO) by tiling them in a regular grid.
240  *
241  * @note By invoking this command rendered pixels are stored in the `pbo_index`-th PBO and, in order to use it, the OpenGL context must remain current.
242  * As a consequence, once you are done working with the `pbo_index`-th PBO (can be accessed by means of `SICAD::getPBO(pbo_index)`) and before invoking again
243  * any other `SICAD::superimpose()` function, you must invoke `SICAD::releaseContext()`.
244  *
245  * @note The size of the grid representing the tiled viewports can be accessed through `getTilesRows()` and `getTilesCols()`.
246  *
247  * @param objpos_map A (tag, pose) container to associate a 7-component `pose`, (x, y, z) position and a (ux, uy, uz, theta) axis-angle orientation, to a mesh with tag 'tag'.
248  * @param cam_x (x, y, z) position.
249  * @param cam_o (ux, uy, uz, theta) axis-angle orientation.
250  * @param pbo_index The index of the PBO where the pixel are stored.
251  *
252  * @return (true, PBO) upon success, (false, 0) otherswise.
253  **/
254  virtual bool superimpose(const std::vector<ModelPoseContainer>& objpos_multimap, const double* cam_x, const double* cam_o, const size_t pbo_index);
255 
256  /**
257  * Render the mesh models in the pose specified in each element of `objpos_multimap` and move the virtual camera in
258  * `cam_x` position with orientation `cam_o`. Each group of meshes specified by the elements of `objpos_multimap` are rendered in a
259  * different viewport. Each viewport reports the mesh models as they are seen by the virtual camera.
260  * The method then stores the pixels of the viewports in the `pbo_index`-th Pixel Buffer Object (PBO) by tiling them in a regular grid.
261  *
262  * @note The size of the grid representing the tiled viewports can be accessed through `getTilesRows()` and `getTilesCols()`.
263  *
264  * @note `img` must be of size `cam_width * cam_height`, as specified during object construction, and the
265  * `SICAD::setBackgroundOpt(bool show_background)` must have been invoked with `true`.
266  *
267  * @param objpos_map A (tag, pose) container to associate a 7-component `pose`, (x, y, z) position and a (ux, uy, uz, theta) axis-angle orientation, to a mesh with tag 'tag'.
268  * @param cam_x (x, y, z) position.
269  * @param cam_o (ux, uy, uz, theta) axis-angle orientation.
270  * @param pbo_index The index of the PBO where the pixel are stored.
271  * @param img A background image.
272  *
273  * @return (true, PBO) upon success, (false, 0) otherswise.
274  **/
275  virtual bool superimpose(const std::vector<ModelPoseContainer>& objpos_multimap, const double* cam_x, const double* cam_o, const size_t pbo_index, const cv::Mat& img);
276 
277  /**
278  * Make the current thread OpenGL context not current.
279  *
280  * @note This method must be called only when invoking `SICAD::superimpose()` working on Pixel Buffer Objects (PBO),
281  * before invoking again any `SICAD::superimpose()` methods (either the ones using PBOs or not), but after
282  * having used the PBO that otherwise cannot be accessed as they are bound to the current thread context.
283  */
284  virtual void releaseContext() const;
285 
286  /**
287  * Returns the Pixel Buffer Object (PBO) vector and its size.
288  *
289  * @note Rendered pixels are stored in the `pbo_index`-th PBO and, in order to use it, the OpenGL context must remain current.
290  * As a consequence, once you are done working with the `pbo_index`-th PBO and before invoking again
291  * any other `SICAD::superimpose()` function, you must invoke `SICAD::releaseContext()`.
292  *
293  * @return (PBO base array address, number of PBOs)
294  */
295  std::pair<const GLuint*, size_t> getPBOs() const;
296 
297  /**
298  * Returns `pbo_index`-th Pixel Buffer Object (PBO) value.
299  *
300  * @note Rendered pixels are stored in the `pbo_index`-th PBO and, in order to use it, the OpenGL context must remain current.
301  * As a consequence, once you are done working with the `pbo_index`-th PBO and before invoking again
302  * any other `SICAD::superimpose()` function, you must invoke `SICAD::releaseContext()`.
303  *
304  * @return (true, PBO) if `pbo_index` exists, (false, 0) otherwise.
305  */
306  std::pair<bool, GLuint> getPBO(const size_t pbo_index) const;
307 
308  bool setProjectionMatrix(const GLsizei cam_width, const GLsizei cam_height, const GLfloat cam_fx, const GLfloat cam_fy, const GLfloat cam_cx, const GLfloat cam_cy);
309 
310  bool getBackgroundOpt() const;
311 
312  void setBackgroundOpt(bool show_background);
313 
314  GLenum getWireframeOpt() const;
315 
316  void setWireframeOpt(bool show_mesh_wires);
317 
318  void setMipmapsOpt(const MIPMaps& mipmaps);
319 
320  MIPMaps getMipmapsOpt() const;
321 
322  int getTilesNumber() const;
323 
324  int getTilesRows() const;
325 
326  int getTilesCols() const;
327 
328 /* FIXME
329  * Change pointer with smartpointers.
330  */
331 private:
332  static int class_counter_;
333 
334  static GLsizei renderbuffer_size_;
335 
336  const std::string log_ID_ = "[SI::SICAD]";
337 
338  GLFWwindow* window_ = nullptr;
339 
340  GLint tiles_num_ = 0;
341 
342  GLsizei tiles_cols_ = 0;
343 
344  GLsizei tiles_rows_ = 0;
345 
346  GLsizei image_width_ = 0;
347 
348  GLsizei image_height_ = 0;
349 
350  glm::mat3 ogl_to_cam_ = glm::mat3(1.0f);
351 
352  GLsizei framebuffer_width_ = 0;
353 
354  GLsizei framebuffer_height_ = 0;
355 
356  GLsizei tile_img_width_ = 0;
357 
358  GLsizei tile_img_height_ = 0;
359 
360  const GLfloat near_ = 0.001f;
361 
362  const GLfloat far_ = 1000.0f;
363 
364  std::thread::id main_thread_id_;
365 
366  bool show_background_ = false;
367 
368  GLenum show_mesh_mode_ = GL_FILL;
369 
371 
373 
374  Shader* shader_cad_ = nullptr;
375 
376  std::unique_ptr<Shader> shader_mesh_texture_;
377 
378  Shader* shader_frame_ = nullptr;
379 
381 
382  GLuint fbo_;
383 
385 
387 
389 
391 
393 
395 
396  GLuint vao_frame_;
397 
398  GLuint vbo_frame_;
399 
400  size_t pbo_number_ = 2;
401 
402  GLuint pbo_[2];
403 
404  glm::mat4 back_proj_;
405 
406  glm::mat4 projection_;
407 
408  glm::mat4 getViewTransformationMatrix(const double* cam_x, const double* cam_o);
409 
410  void pollOrPostEvent();
411 
412  void renderBackground(const cv::Mat& img) const;
413 
414  void setWireframe(GLenum mode);
415 
416  void factorize_int(const GLsizei area, const GLsizei width_limit, const GLsizei height_limit, GLsizei& width, GLsizei& height);
417 };
418 
419 #endif /* SUPERIMPOSECAD_H */
std::unordered_map< std::string, std::string > ModelPathContainer
Definition: SICAD.h:33
GLuint texture_background_
Definition: SICAD.h:388
GLsizei tile_img_height_
Definition: SICAD.h:358
const GLfloat near_
Definition: SICAD.h:360
ModelContainer model_obj_
Definition: SICAD.h:380
void renderBackground(const cv::Mat &img) const
Definition: SICAD.cpp:1370
std::pair< std::string, std::string > ModelPathElement
Definition: SICAD.h:35
Shader * shader_background_
Definition: SICAD.h:372
static int class_counter_
Definition: SICAD.h:332
bool show_background_
Definition: SICAD.h:366
void setBackgroundOpt(bool show_background)
Definition: SICAD.cpp:1291
int getTilesCols() const
Definition: SICAD.cpp:1340
std::thread::id main_thread_id_
Definition: SICAD.h:364
int getTilesNumber() const
Definition: SICAD.cpp:1328
MIPMaps mesh_mmaps_
Definition: SICAD.h:370
bool getBackgroundOpt() const
Definition: SICAD.cpp:1297
Definition: Shader.h:17
std::pair< bool, GLuint > getPBO(const size_t pbo_index) const
Returns pbo_index-th Pixel Buffer Object (PBO) value.
Definition: SICAD.cpp:1220
GLint tiles_num_
Definition: SICAD.h:340
virtual ~SICAD()
Definition: SICAD.cpp:399
static GLsizei renderbuffer_size_
Definition: SICAD.h:334
GLsizei tile_img_width_
Definition: SICAD.h:356
GLuint fbo_
Definition: SICAD.h:382
MIPMaps
Definition: SICAD.h:41
std::pair< std::string, Model * > ModelElement
Definition: SICAD.h:39
SICAD(const ModelPathContainer &objfile_map, const GLsizei cam_width, const GLsizei cam_height, const GLfloat cam_fx, const GLfloat cam_fy, const GLfloat cam_cx, const GLfloat cam_cy)
Create a SICAD object with a dedicated OpenGL context and default shaders.
Definition: SICAD.cpp:29
bool setProjectionMatrix(const GLsizei cam_width, const GLsizei cam_height, const GLfloat cam_fx, const GLfloat cam_fy, const GLfloat cam_cx, const GLfloat cam_cy)
Definition: SICAD.cpp:1234
GLuint ebo_background_
Definition: SICAD.h:392
Shader * shader_frame_
Definition: SICAD.h:378
void setWireframeOpt(bool show_mesh_wires)
Definition: SICAD.cpp:1303
bool superimpose(const ModelPoseContainer &objpos_map, const double *cam_x, const double *cam_o, cv::Mat &img) override
Render the mesh models in the pose specified in objpos_map and move the virtual camera in cam_x posit...
Definition: SICAD.cpp:464
GLFWwindow * window_
Definition: SICAD.h:338
void pollOrPostEvent()
Definition: SICAD.cpp:1361
void setOglWindowShouldClose(bool should_close)
Definition: SICAD.cpp:455
glm::mat4 back_proj_
Definition: SICAD.h:404
GLsizei image_height_
Definition: SICAD.h:348
GLenum getWireframeOpt() const
Definition: SICAD.cpp:1316
size_t pbo_number_
Definition: SICAD.h:400
A Superimpose derived class to superimpose mesh models on images.
Definition: SICAD.h:30
bool getOglWindowShouldClose()
Definition: SICAD.cpp:449
int getTilesRows() const
Definition: SICAD.cpp:1334
std::multimap< std::string, ModelPose > ModelPoseContainer
Definition: Superimpose.h:25
GLenum show_mesh_mode_
Definition: SICAD.h:368
GLuint texture_depth_buffer_
Definition: SICAD.h:386
GLsizei image_width_
Definition: SICAD.h:346
Shader * shader_cad_
Definition: SICAD.h:374
void setWireframe(GLenum mode)
Definition: SICAD.cpp:1405
GLuint pbo_[2]
Definition: SICAD.h:402
glm::mat4 getViewTransformationMatrix(const double *cam_x, const double *cam_o)
Definition: SICAD.cpp:1346
GLuint vbo_background_
Definition: SICAD.h:394
GLsizei framebuffer_height_
Definition: SICAD.h:354
GLsizei framebuffer_width_
Definition: SICAD.h:352
virtual void releaseContext() const
Make the current thread OpenGL context not current.
Definition: SICAD.cpp:1206
GLuint vao_background_
Definition: SICAD.h:390
std::pair< const GLuint *, size_t > getPBOs() const
Returns the Pixel Buffer Object (PBO) vector and its size.
Definition: SICAD.cpp:1212
glm::mat3 ogl_to_cam_
Definition: SICAD.h:350
GLsizei tiles_cols_
Definition: SICAD.h:342
const GLfloat far_
Definition: SICAD.h:362
std::unordered_map< std::string, Model * > ModelContainer
Definition: SICAD.h:37
void setMipmapsOpt(const MIPMaps &mipmaps)
Definition: SICAD.cpp:1310
void factorize_int(const GLsizei area, const GLsizei width_limit, const GLsizei height_limit, GLsizei &width, GLsizei &height)
Definition: SICAD.cpp:1412
GLuint vao_frame_
Definition: SICAD.h:396
GLsizei tiles_rows_
Definition: SICAD.h:344
GLuint texture_color_buffer_
Definition: SICAD.h:384
MIPMaps getMipmapsOpt() const
Definition: SICAD.cpp:1322
const std::string log_ID_
Definition: SICAD.h:336
std::unique_ptr< Shader > shader_mesh_texture_
Definition: SICAD.h:376
GLuint vbo_frame_
Definition: SICAD.h:398
glm::mat4 projection_
Definition: SICAD.h:406