| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
#ifndef __TR_FBO_H__ |
| 25 |
#define __TR_FBO_H__ |
| 26 |
|
| 27 |
struct image_s; |
| 28 |
struct shaderProgram_s; |
| 29 |
|
| 30 |
typedef struct FBO_s |
| 31 |
{ |
| 32 |
char name[MAX_QPATH]; |
| 33 |
|
| 34 |
int index; |
| 35 |
|
| 36 |
uint32_t frameBuffer; |
| 37 |
|
| 38 |
uint32_t colorBuffers[16]; |
| 39 |
int colorFormat; |
| 40 |
struct image_s *colorImage[16]; |
| 41 |
|
| 42 |
uint32_t depthBuffer; |
| 43 |
int depthFormat; |
| 44 |
|
| 45 |
uint32_t stencilBuffer; |
| 46 |
int stencilFormat; |
| 47 |
|
| 48 |
uint32_t packedDepthStencilBuffer; |
| 49 |
int packedDepthStencilFormat; |
| 50 |
|
| 51 |
int width; |
| 52 |
int height; |
| 53 |
} FBO_t; |
| 54 |
|
| 55 |
void FBO_AttachImage(FBO_t *fbo, image_t *image, GLenum attachment, GLuint cubemapside); |
| 56 |
void FBO_Bind(FBO_t *fbo); |
| 57 |
void FBO_Init(void); |
| 58 |
void FBO_Shutdown(void); |
| 59 |
|
| 60 |
void FBO_BlitFromTexture(struct image_s *src, vec4_t inSrcTexCorners, vec2_t inSrcTexScale, FBO_t *dst, ivec4_t inDstBox, struct shaderProgram_s *shaderProgram, vec4_t inColor, int blend); |
| 61 |
void FBO_Blit(const FBO_t *src, ivec4_t srcBox, vec2_t srcTexScale, FBO_t *dst, ivec4_t dstBox, struct shaderProgram_s *shaderProgram, vec4_t color, int blend); |
| 62 |
void FBO_FastBlit(const FBO_t *src, ivec4_t srcBox, FBO_t *dst, ivec4_t dstBox, int buffers, int filter); |
| 63 |
|
| 64 |
|
| 65 |
#endif |