|
UFO: Alien Invasion
|

Go to the source code of this file.
Data Structures | |
| struct | r_viewport_t |
| struct | r_framebuffer_t |
Functions | |
| void | R_InitFBObjects (void) |
| void | R_ShutdownFBObjects (void) |
| Delete all registered framebuffer and render buffer objects, clear memory. | |
| r_framebuffer_t * | R_CreateFramebuffer (int width, int height, int ntextures, bool depth, bool halfFloat, unsigned int *filters) |
| create a new framebuffer object | |
| void | R_DeleteFBObject (r_framebuffer_t *buf) |
| Delete framebuffer object along with attached render buffer. | |
| void | R_SetupViewport (r_framebuffer_t *buf, int x, int y, int width, int height) |
| Sets the framebuffer dimensions of the viewport. | |
| void | R_UseViewport (const r_framebuffer_t *buf) |
| Set the viewport to the dimensions of the given framebuffer. | |
| void | R_ResolveMSAA (const r_framebuffer_t *buf) |
| Forces multisample antialiasing resolve on given framebuffer, if needed. | |
| void | R_UseFramebuffer (const r_framebuffer_t *buf) |
| bind specified framebuffer object so we render to it | |
| void | R_DrawBuffers (unsigned int n) |
| Activate draw buffer(s). | |
| void | R_BindColorAttachments (unsigned int n, unsigned int *attachments) |
| Activate draw buffer(s). | |
| bool | R_EnableRenderbuffer (bool enable) |
| Enable the render to the framebuffer. | |
| bool | R_RenderbufferEnabled (void) |
Activate draw buffer(s).
| n | The number of buffers to activate |
| attachments | The buffers we are rendering into |
Definition at line 404 of file r_framebuffer.cpp.
References Com_DPrintf(), DEBUG_RENDERER, r_config, r_postprocess, r_programs, and r_state.
Referenced by R_DrawBuffers(), and R_UpdateGlowBufferBinding().
| r_framebuffer_t * R_CreateFramebuffer | ( | int | width, |
| int | height, | ||
| int | ntextures, | ||
| bool | depth, | ||
| bool | halfFloat, | ||
| unsigned int * | filters ) |
create a new framebuffer object
| [in] | width | The width of the framebuffer |
| [in] | height | The height of the framebuffer |
| [in] | ntextures | The amount of textures for this framebuffer. See also the filters array. |
| [in] | depth | Also generate a depth buffer |
| [in] | halfFloat | Use half float pixel format |
| [in] | filters | Filters for the textures. Must have ntextures entries |
Definition at line 175 of file r_framebuffer.cpp.
References colorAttachments, Com_Printf(), frameBufferObjectCount, frameBufferObjects, GL_CLAMP, GL_DEPTH_ATTACHMENT_EXT, GL_DEPTH_COMPONENT, GL_FRAMEBUFFER_EXT, GL_RENDERBUFFER_EXT, glBindTexture(), glTexImage2D(), i, lengthof, Mem_AllocTypeN, OBJZERO, R_CheckError, r_config, R_GetFreeFBOTexture(), r_multisample, R_SetupViewport(), r_state, and Vector4Clear.
Referenced by R_InitFBObjects().
| void R_DeleteFBObject | ( | r_framebuffer_t * | buf | ) |
Delete framebuffer object along with attached render buffer.
Definition at line 126 of file r_framebuffer.cpp.
References i, Mem_Free, and R_FreeFBOTexture().
Referenced by R_ShutdownFBObjects().
Activate draw buffer(s).
| [in] | drawBufferNum | The number of buffers to activate |
Definition at line 393 of file r_framebuffer.cpp.
References colorAttachments, and R_BindColorAttachments().
Referenced by R_Draw3DGlobe(), R_EnableRenderbuffer(), and R_UpdateGlowBufferBinding().
| bool R_EnableRenderbuffer | ( | bool | enable | ) |
Enable the render to the framebuffer.
| enable | If true we are enabling the rendering to fbo_render, if false we are rendering to fbo that represents the screen |
true if the fbo was bound, false if not supported or deactivated Definition at line 425 of file r_framebuffer.cpp.
References fbo_render, fbo_screen, r_config, R_DrawBuffers(), r_postprocess, r_programs, r_state, and R_UseFramebuffer().
Referenced by uiGeoscapeNode::draw(), R_DrawBloom(), R_Setup2D(), and R_Setup3D().
Definition at line 65 of file r_framebuffer.cpp.
References colorAttachments, DOWNSAMPLE_PASSES, DOWNSAMPLE_SCALE, fbo_bloom0, fbo_bloom1, frameBufferObjectCount, frameBufferObjects, frameBufferTextures, GL_COLOR_ATTACHMENT0_EXT, GL_FRAMEBUFFER_EXT, GLenum, i, int(), Mem_AllocTypeN, OBJZERO, R_CheckError, r_config, R_CreateFramebuffer(), r_programs, R_SetupViewport(), r_state, screenBuffer, Vector4Clear, and viddef.
Referenced by R_Init(), R_ReinitOpenglContext(), R_RestartPrograms_f(), and R_SetMode().
| bool R_RenderbufferEnabled | ( | void | ) |
| void R_ResolveMSAA | ( | const r_framebuffer_t * | buf | ) |
Forces multisample antialiasing resolve on given framebuffer, if needed.
| [in] | buf | the framebuffer to use |
Definition at line 296 of file r_framebuffer.cpp.
References GL_COLOR_ATTACHMENT0_EXT, GL_DRAW_FRAMEBUFFER_EXT, GL_FRAMEBUFFER_EXT, GL_READ_FRAMEBUFFER_EXT, i, R_CheckError, and screenBuffer.
Referenced by R_DrawBloom().
Sets the framebuffer dimensions of the viewport.
| [out] | buf | The framebuffer to initialize the viewport for. If nullptr the screen buffer will be taken. |
| [in] | x,y | The position |
| [in] | width,height | The dimensions |
Definition at line 362 of file r_framebuffer.cpp.
References screenBuffer.
Referenced by R_CreateFramebuffer(), and R_InitFBObjects().
Delete all registered framebuffer and render buffer objects, clear memory.
Definition at line 148 of file r_framebuffer.cpp.
References colorAttachments, frameBufferObjectCount, frameBufferObjects, i, Mem_Free, OBJZERO, R_DeleteFBObject(), r_state, R_UseFramebuffer(), and screenBuffer.
Referenced by R_ReinitOpenglContext(), R_SetMode(), and R_Shutdown().
| void R_UseFramebuffer | ( | const r_framebuffer_t * | buf | ) |
bind specified framebuffer object so we render to it
| [in] | buf | the framebuffer to use, if nullptr the screen buffer will be used. |
Definition at line 323 of file r_framebuffer.cpp.
References colorAttachments, Com_Printf(), GL_FRAMEBUFFER_EXT, R_CheckError, r_config, r_postprocess, r_programs, r_state, and screenBuffer.
Referenced by R_BlurStack(), R_DrawBloom(), R_EnableBlur(), R_EnableRenderbuffer(), and R_ShutdownFBObjects().
| void R_UseViewport | ( | const r_framebuffer_t * | buf | ) |
Set the viewport to the dimensions of the given framebuffer.
| [out] | buf | The framebuffer to set the viewport for. If nullptr the screen buffer will be taken. |
Definition at line 378 of file r_framebuffer.cpp.
References r_config, r_postprocess, r_programs, r_state, and screenBuffer.
Referenced by R_Blur(), R_BlurStack(), and R_DrawBloom().