r_framebuffer.h
Go to the documentation of this file.00001
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef R_FRAMEBUFFER_H_
00025 #define R_FRAMEBUFFER_H_
00026
00027 typedef struct {
00028 int x;
00029 int y;
00030 int width;
00031 int height;
00032 } r_viewport_t;
00033
00034 typedef struct {
00035 int width;
00036 int height;
00037 vec4_t clearColor;
00038 r_viewport_t viewport;
00039 int pixelFormat;
00040 int byteFormat;
00041 unsigned int depth;
00042 unsigned int fbo;
00043 int nTextures;
00044 unsigned int *textures;
00045 } r_framebuffer_t;
00046
00047
00048 void R_InitFBObjects(void);
00049 void R_ShutdownFBObjects(void);
00050
00051 r_framebuffer_t* R_CreateFramebuffer(int width, int height, int ntextures, qboolean depth, qboolean halfFloat, unsigned int *filters);
00052 void R_DeleteFBObject(r_framebuffer_t *buf);
00053
00054 void R_SetupViewport(r_framebuffer_t *buf, int x, int y, int width, int height);
00055 void R_UseViewport(const r_framebuffer_t *buf);
00056
00057 void R_UseFramebuffer(const r_framebuffer_t *buf);
00058 void R_DrawBuffers(int n);
00059 void R_BindColorAttachments(int n, unsigned int *attachments);
00060 qboolean R_EnableRenderbuffer(qboolean enable);
00061 qboolean R_RenderbufferEnabled(void);
00062
00063 #endif
00064