#include <fstream>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <glm/gtx/transform.hpp>
#include <assimp.hpp>
#include <aiScene.h>
#include <aiPostProcess.h>
#include "common.hpp"
Go to the source code of this file.
|
bool | initFbo (GLuint &fboId, GLuint &imgId, int width, int height) |
| Initializes the FBO, which is used as PickBuffer (render objectIds for object picking). More...
|
|
int * | readPixels (unsigned int xFrom, unsigned int yFrom, unsigned int width, unsigned int height, GLuint fboId, GLuint imgId) |
| Reads pixels from the GPU in a rectangular form. More...
|
|
bool initFbo |
( |
GLuint & |
fboId, |
|
|
GLuint & |
imgId, |
|
|
int |
width, |
|
|
int |
height |
|
) |
| |
Initializes the FBO, which is used as PickBuffer (render objectIds for object picking).
- Parameters
-
fboId | is used to store the handle the FBO has got |
imgId | is used to store the texture handle |
width | determines the width of the FBO |
height | determines the height of the FBO |
- Returns
- if the FBO could be created successful
int* readPixels |
( |
unsigned int |
xFrom, |
|
|
unsigned int |
yFrom, |
|
|
unsigned int |
width, |
|
|
unsigned int |
height, |
|
|
GLuint |
fboId, |
|
|
GLuint |
imgId |
|
) |
| |
Reads pixels from the GPU in a rectangular form.
- Parameters
-
xFrom | Left start value of the rectangle |
yFrom | Bottom start value of the rectangle |
width | Width of the rectangle |
height | Height of the rectangle |
fboId | is used to identify the FBO |
imgId | is used to identify the texture |
- Returns
- the read values as integer array