ref: 12f44d91003179e27b12ce1cf57524dc45fd1f2d
parent: bbd168f542014bce6706515654e5a80bc4101566
author: Jacob Moody <moody@posixcafe.org>
date: Sat Jan 28 18:18:57 EST 2023
delete deal gl code
--- a/ogl_def.h
+++ /dev/null
@@ -1,199 +1,0 @@
-//**************************************************************************
-//**
-//** ogl_def.h
-//**
-//** $Revision: 499 $
-//** $Date: 2009-06-02 20:50:47 +0300 (Tue, 02 Jun 2009) $
-//**
-//**************************************************************************
-
-#ifndef __H2OPENGL__
-#define __H2OPENGL__
-
-#include "r_local.h"
-#include <GL/gl.h>
-
-/* whether to printf devel debug messages */
-#define OPENGL_DEBUGGING 0
-
-#if (OPENGL_DEBUGGING)
-#define OGL_DEBUG printf
-#else /* no debug msg : */
-#if defined (__GNUC__) && !(defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L)
-#define OGL_DEBUG(fmt, args...) do {} while (0)
-#else
-#define OGL_DEBUG(fmt, ...) do {} while (0)
-#endif
-#endif
-
-
-enum { VX, VY }; /* Vertex indices. */
-
-typedef struct /* For dynamic lighting. */
-{
- int use;
- mobj_t *thing;
- float top, height;
-} lumobj_t;
-
-/* ScreenBits is currently unused. */
-extern int screenWidth, screenHeight, screenBits;
-
-void I_InitGraphics(void);
-void I_ShutdownGraphics(void);
-
-void OGL_InitRenderer(void);
-void OGL_InitData(void);
-void OGL_ResetData(void);
-
-void OGL_SwitchTo3DState(void);
-void OGL_Restore2DState(int step); /* Step 1: matrices, 2: attributes. */
-void OGL_UseWhiteFog(int yes);
-
-float PointDist2D(float c[2]);
-
-void R_RenderSprite(vissprite_t *spr);
-
-/* 2D drawing routines. */
-void OGL_DrawPatch_CS(int x, int y, int lumpnum);
-void OGL_DrawPatch(int x, int y, int lumpnum);
-void OGL_DrawFuzzPatch(int x, int y, int lumpnum);
-void OGL_DrawAltFuzzPatch(int x, int y, int lumpnum);
-void OGL_DrawShadowedPatch(int x, int y, int lumpnum);
-void OGL_DrawRawScreen(int lump); /* Raw screens are 320 x 200. */
-void OGL_DrawRawScreenOfs(int lump, float offx, float offy);
-void OGL_DrawLine(float x1, float y1, float x2, float y2, float r, float g, float b, float a);
-void OGL_DrawRect(float x, float y, float w, float h, float r, float g, float b, float a);
-void OGL_DrawRectTiled(int x, int y, int w, int h, int tw, int th);
-void OGL_DrawCutRectTiled(int x, int y, int w, int h, int tw, int th, int cx, int cy, int cw, int ch);
-void OGL_SetColor(int palidx);
-void OGL_SetColorAndAlpha(float r, float g, float b, float a);
-void OGL_DrawPSprite(int x, int y, float scale, int flip, int lump);
-
-/* Filters. */
-void OGL_SetFilter(int filter);
-int OGL_DrawFilter(void);
-
-void OGL_ShadeRect(int x, int y, int w, int h, float darkening);
-
-/* ogl_tex.c */
-typedef struct
-{
- unsigned short w, h;
- short offx, offy;
- unsigned short w2; /* For split textures, width of the other part. */
-} texsize_t;
-
-extern texsize_t *lumptexsizes; /* Sizes for all the lumps. */
-extern unsigned short *spriteheights;
-
-extern float texw, texh;
-extern int texmask;
-extern unsigned int curtex;
-extern int pallump;
-
-int FindNextPower2(int num);
-float NextPower2Ratio(int num);
-void OGL_TexInit(void);
-void OGL_TexReset(void);
-void OGL_ResetLumpTexData(void);
-void OGL_SetPaletteLump(const char *palname);
-void PalToRGB(byte *palidx, byte *rgb);
-void PalIdxToRGB(byte *pal, int idx, byte *rgb);
-unsigned int OGL_BindTexFlat(int lump);
-void OGL_SetFlat(int idx);
-void OGL_BindTexture(GLuint texname);
-
-/* Returns the OpenGL texture name. */
-GLuint OGL_PrepareTexture(int idx);
-GLuint OGL_PrepareFlat(int idx); /* Returns the OpenGL name of the texture. */
-GLuint OGL_PrepareLightTexture(void); /* The dynamic light map. */
-
-void OGL_SetTexture(int idx);
-unsigned int OGL_PrepareSky(int idx, boolean zeroMask);
-
-void OGL_SetSprite(int pnum);
-unsigned int OGL_PrepareSprite(int pnum);
-void OGL_NewSplitTex(int lump, GLuint part2name);
-GLuint OGL_GetOtherPart(int lump);
-
-/* Part is either 1 or 2. Part 0 means only the left side is loaded.
- * No splittex is created in that case. Once a raw image is loaded
- * as part 0 it must be deleted before the other part is loaded at the
- * next loading.
- */
-void OGL_SetRawImage(int lump, int part);
-void OGL_SetPatch(int lump); /* No mipmaps are generated. */
-void OGL_SetNoTexture(void);
-
-int OGL_GetLumpTexWidth(int lump);
-int OGL_GetLumpTexHeight(int lump);
-int OGL_ValidTexHeight2(int width, int height);
-
-void OGL_UpdateTexParams(int mipmode);
-void OGL_UpdateRawScreenParams(int smoothing);
-
-
-/* ogl_scr.c */
-typedef struct _TargaHeader
-{
- unsigned char id_length, colormap_type, image_type;
- unsigned short colormap_index, colormap_length;
- unsigned char colormap_size;
- unsigned short x_origin, y_origin, width, height;
- unsigned char pixel_size, attributes;
-} TargaHeader;
-
-void OGL_GrabScreen(void);
-
-
-#include "m_bams.h"
-
-/* ogl_clip.c */
-typedef struct clipnode_s
-{
- int used; /* 1 if the node is in use. */
- struct clipnode_s *prev, *next; /* Previous and and nodes. */
- binangle start, end; /* The start and end angles (start < end). */
-} clipnode_t;
-
-extern clipnode_t *clipnodes; /* The list of clipnodes. */
-extern clipnode_t *cliphead; /* The head node. */
-
-void C_Init(void);
-void C_Ranger(void);
-void C_ClearRanges(void);
-void C_SafeAddRange(binangle startAngle, binangle endAngle);
-
-/* Add a segment relative to the current viewpoint. */
-void C_AddViewRelSeg(float x1, float y1, float x2, float y2);
-
-/* Check a segment relative to the current viewpoint. */
-int C_CheckViewRelSeg(float x1, float y1, float x2, float y2);
-
-/* Returns 1 if the specified angle is visible. */
-int C_IsAngleVisible(binangle bang);
-
-clipnode_t *C_AngleClippedBy(binangle bang);
-
-/* Returns 1 if the subsector might be visible. */
-int C_CheckSubsector(subsector_t *ssec);
-
-
-/* ogl_sky.c */
-
-/* Sky hemispheres. */
-#define SKYHEMI_UPPER 0x1
-#define SKYHEMI_LOWER 0x2
-#define SKYHEMI_JUST_CAP 0x4 /* Just draw the top or bottom cap. */
-
-typedef struct
-{
- float rgb[3]; /* The RGB values. */
- short set, use; /* Is this set? Should be used? */
-} fadeout_t;
-
-void R_RenderSkyHemispheres(int hemis);
-
-#endif /* __H2OPENGL__ */
-
--- a/ogl_rl.h
+++ /dev/null
@@ -1,63 +1,0 @@
-//**************************************************************************
-//**
-//** ogl_rl.h
-//**
-//** $Revision: 584 $
-//** $Date: 2012-02-17 12:01:51 +0200 (Fri, 17 Feb 2012) $
-//**
-//**************************************************************************
-
-#ifndef __OGL_REND_LIST_H__
-#define __OGL_REND_LIST_H__
-
-/* Rendquad flags. */
-#define RQF_FLAT 0x1 /* This is a flat triangle. */
-#define RQF_MASKED 0x2 /* Use the special list for masked textures. */
-#define RQF_MISSING_WALL 0x4 /* Originally this surface had no texture. */
-#define RQF_SKY_MASK 0x8 /* A sky mask triangle. */
-#define RQF_SKY_MASK_WALL 0x10 /* A sky mask wall (with skyfix). */
-#define RQF_LIGHT 0x20 /* A dynamic light. */
-#define RQF_FLOOR_FACING 0x40 /* Used for flats, the quad faces upwards. */
-
-typedef struct
-{
- float v1[2], v2[2]; /* Two vertices. */
- float top; /* Top height. */
- union _quadTri {
- struct _quad {
- float bottom; /* Bottom height. */
- float len; /* Length of the quad. */
- } q;
- float v3[2]; /* Third vertex for flats. */
- } u;
- float light; /* Light level, as in 0 = black, 1 = fullbright. */
- float texoffx; /* Texture coordinates for left/top (in real texcoords). */
- float texoffy;
- short flags; /* RQF_*. */
- GLuint masktex; /* Texture name for masked textures. */
- unsigned short texw, texh; /* Size of the texture. */
- float dist[3]; /* Distances to the vertices. */
-} rendquad_t; /* Or flat triangle. */
-
-typedef struct
-{
- GLuint tex; /* The name of the texture for this list. */
- int numquads; /* Number of quads in the list. */
- int listsize; /* Absolute size of the list. */
- rendquad_t *quads; /* The list of quads. */
-} rendlist_t;
-
-
-/* ogl_rl.c */
-
-void RL_Init(void);
-void RL_ClearLists(void);
-void RL_DeleteLists(void);
-void RL_AddQuad(rendquad_t *quad, GLuint quadtex);
-void RL_AddFlatQuads(rendquad_t *base, /* GLuint */ uintptr_t quadtex,
- int numvrts, fvertex_t *vrts, int dir);
-void RL_RenderAllLists(void);
-void SetVertexColor(float light, float dist, float alpha);
-
-#endif /* __OGL_REND_LIST_H__ */
-