00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #include "config_dxgsg8.h"
00016 #include "dxGraphicsStateGuardian8.h"
00017 #include "dxTextureContext8.h"
00018 #include "dxVertexBufferContext8.h"
00019 #include "dxIndexBufferContext8.h"
00020 #include "dxGeomMunger8.h"
00021 #include "graphicsPipeSelection.h"
00022 #include "wdxGraphicsWindow8.h"
00023 #include "wdxGraphicsPipe8.h"
00024 #include "pandaSystem.h"
00025
00026 #include "dconfig.h"
00027
00028 Configure(config_dxgsg8);
00029 NotifyCategoryDef(dxgsg8, ":display:gsg");
00030 NotifyCategoryDef(wdxdisplay8, "display");
00031
00032
00033
00034
00035 ConfigVariableBool dx_show_transforms
00036 ("dx-show-transforms", false);
00037
00038
00039 ConfigVariableInt dx_multisample_antialiasing_level
00040 ("dx-multisample-antialiasing-level", 0);
00041
00042
00043 ConfigVariableBool dx_no_vertex_fog
00044 ("dx-no-vertex-fog", false);
00045
00046
00047 ConfigVariableBool dx_show_cursor_watermark
00048 ("dx-show-cursor-watermark",
00049 #ifdef _DEBUG
00050 true
00051 #else
00052 false
00053 #endif
00054 );
00055
00056
00057 ConfigVariableBool dx_use_triangle_mipgen_filter
00058 ("dx-use-triangle-mipgen-filter", false);
00059
00060 ConfigVariableBool dx_broken_max_index
00061 ("dx-broken-max-index", false,
00062 PRC_DESC("Configure this true if you have a buggy graphics driver that "
00063 "doesn't correctly implement the third parameter, NumVertices, "
00064 "of DrawIndexedPrimitive(). In particular, the NVIDIA Quadro "
00065 "driver version 6.14.10.7184 seems to treat this as a maximum "
00066 "vertex index, rather than a delta between the maximum and "
00067 "minimum vertex index. Turn this on if you are seeing stray "
00068 "triangles, or you are not seeing all of your triangles. Enabling "
00069 "this should work around this bug, at the cost of some additional "
00070 "rendering overhead on the GPU."));
00071
00072 #ifndef NDEBUG
00073
00074
00075 ConfigVariableInt dx_force_backface_culling
00076 ("dx-force-backface-culling", 0);
00077 #endif
00078
00079 ConfigVariableBool dx_mipmap_everything
00080 ("dx-mipmap-everything", false);
00081 ConfigVariableBool dx_ignore_mipmaps
00082 ("dx-ignore-mipmaps", false);
00083
00084
00085 ConfigVariableBool dx_use_rangebased_fog
00086 ("dx-use-rangebased-fog", false);
00087 ConfigVariableBool dx_no_dithering
00088 ("dx-no-dithering", false);
00089 ConfigVariableBool dx_force_16bpp_zbuffer
00090 ("dx-force-16bpp-zbuffer", false);
00091 ConfigVariableBool dx_do_vidmemsize_check
00092 ("do-vidmemsize-check", true);
00093
00094
00095
00096
00097
00098
00099 ConfigVariableBool dx_preserve_fpu_state
00100 ("dx-preserve-fpu-state", true);
00101
00102 ConfigVariableInt dx_preferred_device_id
00103 ("dx-preferred-device-id", -1);
00104
00105 #ifdef _DEBUG
00106 ConfigVariableDouble dx_global_miplevel_bias
00107 ("dx-global-miplevel-bias", 0.0);
00108 ConfigVariableBool dx_debug_view_mipmaps
00109 ("dx-debug-view-mipmaps", false);
00110 #endif
00111
00112 ConfigVariableBool dx_force_anisotropic_filtering
00113 ("dx-force-anisotropic-filtering", false);
00114
00115
00116
00117 ConfigVariableBool link_tristrips
00118 ("link-tristrips", false);
00119
00120 ConfigureFn(config_dxgsg8) {
00121 init_libdxgsg8();
00122 }
00123
00124
00125
00126
00127
00128
00129
00130
00131
00132 void
00133 init_libdxgsg8() {
00134 static bool initialized = false;
00135 if (initialized) {
00136 return;
00137 }
00138 initialized = true;
00139
00140 DXGraphicsStateGuardian8::init_type();
00141 DXTextureContext8::init_type();
00142 DXVertexBufferContext8::init_type();
00143 DXIndexBufferContext8::init_type();
00144 DXGeomMunger8::init_type();
00145
00146 wdxGraphicsPipe8::init_type();
00147 wdxGraphicsWindow8::init_type();
00148
00149 GraphicsPipeSelection *selection = GraphicsPipeSelection::get_global_ptr();
00150 selection->add_pipe_type(wdxGraphicsPipe8::get_class_type(),
00151 wdxGraphicsPipe8::pipe_constructor);
00152
00153 PandaSystem *ps = PandaSystem::get_global_ptr();
00154 ps->add_system("DirectX8");
00155 }