]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - vid.h
fix a bunch of warnings if compiling darkplaces as C++ in MSVC2008
[xonotic/darkplaces.git] / vid.h
diff --git a/vid.h b/vid.h
index af70fa56d441712186c0b661f7a9ad9e64ed2a3e..540a0c429286cc1923ac1610937b8ed3822b3c0d 100644 (file)
--- a/vid.h
+++ b/vid.h
@@ -26,6 +26,49 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
 extern int cl_available;
 
+#define MAX_TEXTUREUNITS 16
+
+typedef enum renderpath_e
+{
+       RENDERPATH_GL11,
+       RENDERPATH_GL13,
+       RENDERPATH_GL20,
+       RENDERPATH_CGGL,
+}
+renderpath_t;
+
+typedef struct viddef_support_s
+{
+       qboolean amd_texture_texture4;
+       qboolean arb_depth_texture;
+       qboolean arb_draw_buffers;
+       qboolean arb_fragment_shader;
+       qboolean arb_multitexture;
+       qboolean arb_occlusion_query;
+       qboolean arb_shader_objects;
+       qboolean arb_shading_language_100;
+       qboolean arb_shadow;
+       qboolean arb_texture_compression;
+       qboolean arb_texture_cube_map;
+       qboolean arb_texture_env_combine;
+       qboolean arb_texture_gather;
+       qboolean arb_texture_non_power_of_two;
+       qboolean arb_texture_rectangle;
+       qboolean arb_vertex_buffer_object;
+       qboolean arb_vertex_shader;
+       qboolean ati_separate_stencil;
+       qboolean ext_blend_minmax;
+       qboolean ext_blend_subtract;
+       qboolean ext_draw_range_elements;
+       qboolean ext_framebuffer_object;
+       qboolean ext_stencil_two_side;
+       qboolean ext_texture_3d;
+       qboolean ext_texture_compression_s3tc;
+       qboolean ext_texture_edge_clamp;
+       qboolean ext_texture_filter_anisotropic;
+}
+viddef_support_t;
+
 typedef struct viddef_mode_s
 {
        int width;
@@ -53,6 +96,26 @@ typedef struct viddef_s
        qboolean stereobuffer;
        int samples;
        qboolean stencil;
+
+       void *cgcontext;
+
+       renderpath_t renderpath;
+       qboolean forcevbo; // some renderpaths can not operate without it
+
+       unsigned int texunits;
+       unsigned int teximageunits;
+       unsigned int texarrayunits;
+       unsigned int drawrangeelements_maxvertices;
+       unsigned int drawrangeelements_maxindices;
+
+       unsigned int maxtexturesize_2d;
+       unsigned int maxtexturesize_3d;
+       unsigned int maxtexturesize_cubemap;
+       unsigned int maxtexturesize_rectangle;
+       unsigned int max_anisotropy;
+       unsigned int maxdrawbuffers;
+
+       viddef_support_t support;
 } viddef_t;
 
 // global video state
@@ -81,7 +144,6 @@ extern cvar_t vid_resizable;
 extern cvar_t vid_minwidth;
 extern cvar_t vid_minheight;
 
-extern cvar_t gl_combine;
 extern cvar_t gl_finish;
 
 extern cvar_t v_gamma;
@@ -119,11 +181,8 @@ extern char gl_driver[256];
 extern qboolean isG200;
 extern qboolean isRagePro;
 
-// LordHavoc: GLX_SGI_swap_control and WGL_EXT_swap_control
-extern int gl_videosyncavailable;
-
 void *GL_GetProcAddress(const char *name);
-int GL_CheckExtension(const char *minglver_or_ext, const dllfunction_t *funcs, const char *disableparm, int silent);
+qboolean GL_CheckExtension(const char *minglver_or_ext, const dllfunction_t *funcs, const char *disableparm, int silent);
 
 void VID_Shared_Init(void);