aboutsummaryrefslogtreecommitdiff
path: root/src/parsec/include/ro_supp.h
diff options
context:
space:
mode:
authorFelix Morgner <felix.morgner@gmail.com>2026-08-24 11:16:07 +0200
committerFelix Morgner <felix.morgner@gmail.com>2026-08-24 11:16:07 +0200
commitc068f22329d5cc722622a2183bbb22eef2093df7 (patch)
tree12d56c1aede67988a55e241364606bfbb4dba933 /src/parsec/include/ro_supp.h
downloadopenparsec-main.tar.xz
openparsec-main.zip
initial importHEADmain
Diffstat (limited to 'src/parsec/include/ro_supp.h')
-rw-r--r--src/parsec/include/ro_supp.h62
1 files changed, 62 insertions, 0 deletions
diff --git a/src/parsec/include/ro_supp.h b/src/parsec/include/ro_supp.h
new file mode 100644
index 0000000..351640b
--- /dev/null
+++ b/src/parsec/include/ro_supp.h
@@ -0,0 +1,62 @@
+/*
+ * PARSEC HEADER: ro_supp.h
+ */
+
+#ifndef _RO_SUPP_H_
+#define _RO_SUPP_H_
+
+
+// ro_supp.c implements the following functions
+// -------------------------------------------
+// int R_PrecacheTextures( GenObject *objectp );
+
+
+// conversion factor from source (internal) depth to destination (opengl) depth
+
+#ifdef FRACTIONAL_DEPTH_VALUES
+ #define OPENGL_DEPTH_RANGE 1.0f // [ 0, 1 ] -> [ 0, 1 ]
+#else
+ #define OPENGL_DEPTH_RANGE (1/65535.0f) // [ 0, 65535 ] -> [ 0, 1 ]
+#endif
+
+
+// need opengl headers
+#include "r_gl.h"
+
+
+// structures
+
+struct GLTexInfo {
+
+ TextureMap* texmap;
+ void* data;
+ int width;
+ int height;
+ dword format;
+ float coscale;
+ float aratio;
+ word lodsmall;
+ word lodlarge;
+};
+
+
+// external functions
+
+void RO_EnableDepthBuffer( bool checking, bool writing );
+void RO_DisableDepthBuffer( bool checking, bool writing );
+void RO_RestoreDepthState( int zcmpstate, int zwritestate );
+void RO_InvalidateTextureMem();
+void RO_InvalidateCachedTexture( TextureMap *tmap );
+void RO_SelectTexelSource( GLTexInfo *texinfo );
+void RO_SelectTexelSource2( GLTexInfo *p2info );
+void RO_IterVertex2GLVertex( GLVertex3 *glvtxs, IterVertex2 *itervtxs, int num, GLTexInfo *texinfo );
+void RO_IterVertex3GLVertex( GLVertex3 *glvtxs, IterVertex3 *itervtxs, int num, GLTexInfo *texinfo );
+void RO_IterVertex2GLVertexRef( GLVertex3 *glvtxs, IterVertex2 **itervtxs, int num, GLTexInfo *texinfo );
+void RO_IterVertex3GLVertexRef( GLVertex3 *glvtxs, IterVertex3 **itervtxs, int num, GLTexInfo *texinfo );
+void RO_TextureMap2GLTexInfo( GLTexInfo *texinfo, TextureMap *texmap );
+void RO_Render2DRectangle( sgrid_t putx, sgrid_t puty, float srcw, float srch, dword dstw, dword dsth, dword zvalue, colrgba_s *color );
+
+
+#endif // _RO_SUPP_H_
+
+