UFO: Alien Invasion
Toggle main menu visibility
Loading...
Searching...
No Matches
r_framebuffer.h
Go to the documentation of this file.
1
4
5
/*
6
Copyright (C) 2008 Victor Luchits
7
8
This program is free software; you can redistribute it and/or
9
modify it under the terms of the GNU General Public License
10
as published by the Free Software Foundation; either version 2
11
of the License, or (at your option) any later version.
12
13
This program is distributed in the hope that it will be useful,
14
but WITHOUT ANY WARRANTY; without even the implied warranty of
15
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
16
17
See the GNU General Public License for more details.
18
19
You should have received a copy of the GNU General Public License
20
along with this program; if not, write to the Free Software
21
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22
*/
23
24
#pragma once
25
26
typedef
struct
{
27
int
x
;
28
int
y
;
29
int
width
;
30
int
height
;
31
}
r_viewport_t
;
32
33
typedef
struct
{
34
int
width
;
35
int
height
;
36
int
samples
;
37
vec4_t
clearColor
;
38
r_viewport_t
viewport
;
39
int
pixelFormat
;
40
int
byteFormat
;
41
unsigned
int
depth
;
42
unsigned
int
fbo
;
43
int
nTextures
;
44
unsigned
int
*
textures
;
45
unsigned
int
proxyFBO
;
46
}
r_framebuffer_t
;
47
48
49
void
R_InitFBObjects
(
void
);
50
void
R_ShutdownFBObjects
(
void
);
51
52
r_framebuffer_t
*
R_CreateFramebuffer
(
int
width,
int
height,
int
ntextures,
bool
depth,
bool
halfFloat,
unsigned
int
* filters);
53
void
R_DeleteFBObject
(
r_framebuffer_t
*
buf
);
54
55
void
R_SetupViewport
(
r_framebuffer_t
*
buf
,
int
x,
int
y,
int
width,
int
height);
56
void
R_UseViewport
(
const
r_framebuffer_t
*
buf
);
57
58
void
R_ResolveMSAA
(
const
r_framebuffer_t
*
buf
);
59
void
R_UseFramebuffer
(
const
r_framebuffer_t
*
buf
);
60
void
R_DrawBuffers
(
unsigned
int
n);
61
void
R_BindColorAttachments
(
unsigned
int
n,
unsigned
int
* attachments);
62
bool
R_EnableRenderbuffer
(
bool
enable);
63
bool
R_RenderbufferEnabled
(
void
);
buf
voidpf void * buf
Definition
ioapi.h:42
R_BindColorAttachments
void R_BindColorAttachments(unsigned int n, unsigned int *attachments)
Activate draw buffer(s).
Definition
r_framebuffer.cpp:404
R_DrawBuffers
void R_DrawBuffers(unsigned int n)
Activate draw buffer(s).
Definition
r_framebuffer.cpp:393
R_InitFBObjects
void R_InitFBObjects(void)
Definition
r_framebuffer.cpp:65
R_UseFramebuffer
void R_UseFramebuffer(const r_framebuffer_t *buf)
bind specified framebuffer object so we render to it
Definition
r_framebuffer.cpp:323
R_EnableRenderbuffer
bool R_EnableRenderbuffer(bool enable)
Enable the render to the framebuffer.
Definition
r_framebuffer.cpp:425
R_UseViewport
void R_UseViewport(const r_framebuffer_t *buf)
Set the viewport to the dimensions of the given framebuffer.
Definition
r_framebuffer.cpp:378
R_ResolveMSAA
void R_ResolveMSAA(const r_framebuffer_t *buf)
Forces multisample antialiasing resolve on given framebuffer, if needed.
Definition
r_framebuffer.cpp:296
R_SetupViewport
void R_SetupViewport(r_framebuffer_t *buf, int x, int y, int width, int height)
Sets the framebuffer dimensions of the viewport.
Definition
r_framebuffer.cpp:362
R_ShutdownFBObjects
void R_ShutdownFBObjects(void)
Delete all registered framebuffer and render buffer objects, clear memory.
Definition
r_framebuffer.cpp:148
R_DeleteFBObject
void R_DeleteFBObject(r_framebuffer_t *buf)
Delete framebuffer object along with attached render buffer.
Definition
r_framebuffer.cpp:126
R_CreateFramebuffer
r_framebuffer_t * R_CreateFramebuffer(int width, int height, int ntextures, bool depth, bool halfFloat, unsigned int *filters)
create a new framebuffer object
Definition
r_framebuffer.cpp:175
R_RenderbufferEnabled
bool R_RenderbufferEnabled(void)
Definition
r_framebuffer.cpp:443
r_framebuffer_t
Definition
r_framebuffer.h:33
r_framebuffer_t::byteFormat
int byteFormat
Definition
r_framebuffer.h:40
r_framebuffer_t::clearColor
vec4_t clearColor
Definition
r_framebuffer.h:37
r_framebuffer_t::width
int width
Definition
r_framebuffer.h:34
r_framebuffer_t::textures
unsigned int * textures
Definition
r_framebuffer.h:44
r_framebuffer_t::nTextures
int nTextures
Definition
r_framebuffer.h:43
r_framebuffer_t::proxyFBO
unsigned int proxyFBO
Definition
r_framebuffer.h:45
r_framebuffer_t::depth
unsigned int depth
Definition
r_framebuffer.h:41
r_framebuffer_t::fbo
unsigned int fbo
Definition
r_framebuffer.h:42
r_framebuffer_t::samples
int samples
Definition
r_framebuffer.h:36
r_framebuffer_t::viewport
r_viewport_t viewport
Definition
r_framebuffer.h:38
r_framebuffer_t::height
int height
Definition
r_framebuffer.h:35
r_framebuffer_t::pixelFormat
int pixelFormat
Definition
r_framebuffer.h:39
r_viewport_t
Definition
r_framebuffer.h:26
r_viewport_t::width
int width
Definition
r_framebuffer.h:29
r_viewport_t::y
int y
Definition
r_framebuffer.h:28
r_viewport_t::height
int height
Definition
r_framebuffer.h:30
r_viewport_t::x
int x
Definition
r_framebuffer.h:27
vec4_t
vec_t vec4_t[4]
Definition
ufotypes.h:40
src
client
renderer
r_framebuffer.h
Generated on __DATE__ __TIME__ for UFO: Alien Invasion by
1.17.0