summaryrefslogtreecommitdiff
path: root/src/rend2/tr_fbo.h
diff options
context:
space:
mode:
authorJames Canete <use.less01@gmail.com>2012-10-26 01:23:06 +0000
committerTim Angus <tim@ngus.net>2013-01-12 21:20:52 +0000
commit9487654b9dd89200a7d28912effe717651387fa3 (patch)
tree916c69ce92a6836b638de22c614b703e49192169 /src/rend2/tr_fbo.h
parent9f48a26a280b631489573794e23058734ec73c30 (diff)
Added Rend2, an alternate renderer. (Bug #4358)
Diffstat (limited to 'src/rend2/tr_fbo.h')
-rw-r--r--src/rend2/tr_fbo.h64
1 files changed, 64 insertions, 0 deletions
diff --git a/src/rend2/tr_fbo.h b/src/rend2/tr_fbo.h
new file mode 100644
index 00000000..f0366251
--- /dev/null
+++ b/src/rend2/tr_fbo.h
@@ -0,0 +1,64 @@
+/*
+===========================================================================
+Copyright (C) 2010 James Canete (use.less01@gmail.com)
+
+This file is part of Quake III Arena source code.
+
+Quake III Arena source code is free software; you can redistribute it
+and/or modify it under the terms of the GNU General Public License as
+published by the Free Software Foundation; either version 2 of the License,
+or (at your option) any later version.
+
+Quake III Arena source code is distributed in the hope that it will be
+useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Quake III Arena source code; if not, write to the Free Software
+Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+===========================================================================
+*/
+// tr_fbo.h
+
+#ifndef __TR_FBO_H__
+#define __TR_FBO_H__
+
+struct image_s;
+struct shaderProgram_s;
+
+typedef struct FBO_s
+{
+ char name[MAX_QPATH];
+
+ int index;
+
+ uint32_t frameBuffer;
+
+ uint32_t colorBuffers[16];
+ int colorFormat;
+ struct image_s *colorImage[16];
+
+ uint32_t depthBuffer;
+ int depthFormat;
+
+ uint32_t stencilBuffer;
+ int stencilFormat;
+
+ uint32_t packedDepthStencilBuffer;
+ int packedDepthStencilFormat;
+
+ int width;
+ int height;
+} FBO_t;
+
+void FBO_Bind(FBO_t *fbo);
+void FBO_Init(void);
+void FBO_Shutdown(void);
+
+void FBO_BlitFromTexture(struct image_s *src, vec4i_t srcBox, vec2_t srcTexScale, FBO_t *dst, vec4i_t dstBox, struct shaderProgram_s *shaderProgram, vec4_t color, int blend);
+void FBO_Blit(FBO_t *src, vec4i_t srcBox, vec2_t srcTexScale, FBO_t *dst, vec4i_t dstBox, struct shaderProgram_s *shaderProgram, vec4_t color, int blend);
+void FBO_FastBlit(FBO_t *src, vec4i_t srcBox, FBO_t *dst, vec4i_t dstBox, int buffers, int filter);
+
+
+#endif