ceepeepeefy hw_main, abuse templates for portal stuff
no idea if this is faster at all lmao
This commit is contained in:
1 parent
8bad9bc4c9
commit
eab2511a2d
12 files changed
+423
-281
No files matched your search
@@ -1,6 +1,6 @@
|
||||
hw_bsp.c
|
||||
hw_draw.c
|
||||
hw_main.c
|
||||
hw_main.cpp
|
||||
hw_clip.c
|
||||
hw_md2.c
|
||||
hw_cache.c
|
||||
|
||||
@@ -13,6 +13,10 @@
|
||||
#ifndef __HWR_BATCHING_H__
|
||||
#define __HWR_BATCHING_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "hw_defs.h"
|
||||
#include "hw_data.h"
|
||||
#include "hw_gl.h"
|
||||
@@ -34,4 +38,8 @@ void HWR_SetCurrentTexture(GLMipmap_t *texture);
|
||||
void HWR_ProcessPolygon(FSurfaceInfo *pSurf, FOutVector *pOutVerts, FUINT iNumPts, FBITFIELD PolyFlags, int shader, boolean horizonSpecial);
|
||||
void HWR_RenderBatches(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -7,6 +7,10 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
// OpenGL BSP clipping
|
||||
#include "../doomdef.h"
|
||||
#include "../tables.h"
|
||||
@@ -22,3 +26,7 @@ angle_t gld_FrustumAngle(angle_t tiltangle);
|
||||
void gld_FrustumSetup(void);
|
||||
boolean gld_SphereInFrustum(float x, float y, float z, float radius);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
@@ -13,6 +13,10 @@
|
||||
#ifndef __HWR_GL_H__
|
||||
#define __HWR_GL_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "../screen.h"
|
||||
|
||||
#include "hw_data.h"
|
||||
@@ -76,4 +80,8 @@ UINT32 GL_CreateLightTable(RGBA_t *hw_lighttable);
|
||||
void GL_ClearLightTables(void);
|
||||
void GL_SetScreenPalette(RGBA_t *palette);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#endif // __HWR_GL_H__
|
||||
@@ -14,6 +14,10 @@
|
||||
#ifndef _HWR_GLOB_H_
|
||||
#define _HWR_GLOB_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "hw_defs.h"
|
||||
#include "../m_misc.h"
|
||||
#include "../r_defs.h"
|
||||
@@ -109,4 +113,8 @@ const char *HWR_GetShaderName(INT32 shader);
|
||||
|
||||
extern customshaderxlat_t shaderxlat[];
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#endif //_HW_GLOB_
|
||||
File diff suppressed because it is too large.
Load diff
@@ -20,6 +20,10 @@
|
||||
#ifndef __HWR_MAIN_H__
|
||||
#define __HWR_MAIN_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "hw_gl.h"
|
||||
#include "hw_glob.h"
|
||||
#include "hw_data.h"
|
||||
@@ -34,10 +38,6 @@
|
||||
|
||||
#define GLENCORE
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
// Startup & Shutdown the hardware mode renderer
|
||||
void HWR_Startup(void);
|
||||
void HWR_Shutdown(void);
|
||||
@@ -115,6 +115,7 @@ void HWR_AddCommands(void);
|
||||
|
||||
void HWR_RenderPlayerView(void);
|
||||
void HWR_RenderViewpoint(gl_portal_t *rootportal, const float fpov, player_t *player, int stencil_level, boolean allow_portals);
|
||||
void HWR_RenderPortalViewpoint(gl_portal_t *rootportal, const float fpov, player_t *player, int stencil_level, boolean allow_portals);
|
||||
|
||||
void HWR_ClearSkyDome(void);
|
||||
void HWR_BuildSkyDome(void);
|
||||
|
||||
@@ -169,7 +169,7 @@ void HWR_RenderPortal(gl_portal_t* portal, gl_portal_t* rootportal, const float
|
||||
// go to portal frame lmao
|
||||
HWR_PortalFrame(portal);
|
||||
// call HWR_RenderViewpoint
|
||||
HWR_RenderViewpoint(portal, fpov, player, stencil_level + 1, true);
|
||||
HWR_RenderPortalViewpoint(portal, fpov, player, stencil_level + 1, true);
|
||||
// return to current frame
|
||||
if (rootportal)
|
||||
HWR_PortalFrame(rootportal);
|
||||
|
||||
@@ -14,6 +14,10 @@
|
||||
#ifndef __HW_PORTAL__
|
||||
#define __HW_PORTAL__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef HWRENDER
|
||||
|
||||
#include "../doomstat.h"
|
||||
@@ -77,5 +81,9 @@ void HWR_FreePortalList(gl_portallist_t portallist);
|
||||
boolean HWR_PortalCheckPointSide(fixed_t x, fixed_t y);
|
||||
boolean HWR_PortalCheckBBox(const fixed_t *bspcoord);
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}// extern "C"
|
||||
#endif
|
||||
#endif
|
||||
@@ -20,6 +20,10 @@
|
||||
#ifndef _R_OPENGL_H_
|
||||
#define _R_OPENGL_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SDL
|
||||
#define _MATH_DEFINES_DEFINED
|
||||
|
||||
@@ -144,4 +148,8 @@ typedef enum
|
||||
GLF_NOTEXENV = 0x02,
|
||||
} oglflags_t;
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -15,6 +15,10 @@
|
||||
#ifndef __M_FIXED__
|
||||
#define __M_FIXED__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "doomtype.h"
|
||||
#ifdef __GNUC__
|
||||
#include <stdlib.h>
|
||||
@@ -370,4 +374,8 @@ void FM_MultMatrix(matrix_t *dest, const matrix_t *multme);
|
||||
void FM_Translate(matrix_t *dest, fixed_t x, fixed_t y, fixed_t z);
|
||||
void FM_Scale(matrix_t *dest, fixed_t x, fixed_t y, fixed_t z);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#endif //m_fixed.h
|
||||
@@ -14,6 +14,10 @@
|
||||
#ifndef __STSTUFF_H__
|
||||
#define __STSTUFF_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "doomtype.h"
|
||||
#include "d_event.h"
|
||||
#include "d_player.h"
|
||||
@@ -142,4 +146,8 @@ extern UINT16 objectsdrawn;
|
||||
extern consvar_t cv_lessflicker;
|
||||
extern consvar_t cv_stagetitle;
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#endif
|
||||
Reference in new issue
Block a user