R1GL OpenGL Renderer for Quake II v0.1.5.41 =========================================== http://www.r1ch.net/stuff/r1gl Overview -------- R1GL is an enhanced opengl renderer for Quake II. It is designed to be more of an "update" to id Software's existing Ref_GL.dll than an entirely new client with all fancy gizmos and flashy technology. To this end, R1GL has a small feature set: * Support for 24/32 bit PNG, JPG and TGA textures and images up to 1024x1024. * Anisotropic filtering support. * Multisampling (Full Scene Anti Aliasing) support. * Compatibility with any standard 3.2x client. * Custom screen resolutions. * Nicer dynamic lighting falloff, overbrights and other visual enhancements. * Texture name caching and other minor speed improvements. Note that by default, most new features are disabled to preserve 3.2x compatibility. You will likely find R1GL looks no different than regular GL. Please use the R1GL config generator (http://r-1.ch/q2config.php?type=r1gl) to create an R1GL config and check out other Quake 2 related websites for high resolution textures and model packs. Required Files -------------- Win 9x/NT/2K/XP/2K3: http://www.r1ch.net/stuff/r1gl/r1gl-0.1.5.zip - This zip file contains the latest version of R1GL 0.1.5. Extract to your Quake 2 directory, then use set vid_ref R1GL in either your config or the console to load it. Please note, unless you are using R1Q2, going to the Video Options menu will reset the renderer to Ref_GL. Alternatively, simply rename the file "Ref_GL R1GL v0.1.5.41.dll" to the filename "Ref_R1GL.dll" in your Quake 2 directory (overwriting the original file). Mac OS X: http://www.r1ch.net/stuff/r1gl/r1gl-0.1.2_OS_X.sit - Compiled by Dalamar. Untested and unsupported. Source code: The source code for R1GL is included in the R1Q2 (http://www.r1ch.net/stuff/r1q2) source distribution. The "R1GL.cfg" Configuration File --------------------------------- Note: If you wish for any of these settings to be used every time you start R1GL, place them in the file "R1GL.cfg", and copy the file to your "Quake2\Baseq2" directory on your hard drive). This is the recommended method for using these settings, as the "R1GL.cfg" configuration file is loaded by R1GL immediately upon startup, ensuring that the settings are applied before R1GL tries to use them. Variable: gl_ext_texture_filter_anisotropic Values: 0 (Disabled), 1 (Enabled) Default: 0 Enable anisotropic filtering. This makes textures that are viewed at a distance much clearer. Hardware support required. Variable: gl_ext_max_anisotropy Values: 2-16 Default: 2 The level of anisotropic filtering applied if enabled. Must be a power of 2 (i.e. 2, 4, 8, 16). Maximum value on most cards is 16, the higher the amount of filtering, the slower rendering will be. Variable: gl_ext_multisample Values: 0 (Disabled), 1 (Enabled) Default: 0 Enable multisampling (FSAA). This makes jagged edges of models appear much smoother but makes quite a performance hit on some older video cards. Hardware support required. Variable: gl_ext_samples Values: 1-16 Default: 2 Number of samples per pixel to take for multisampling. Higher values give more smoothing at the expense of performance. Maximum value on most cards is 16. Variable: gl_ext_nv_multisample_filter_hint Values: nicest, fastest Default: fastest Select which multisampling kernel to use on NVIDIA cards. Nicest gives the best looking anti-aliasing at the expense of performance. Variable: gl_ext_texture_non_power_of_two Values: 0 (Disabled), 1 (Enabled) Default: 0 Enable uploading of textures that are not a power of two. This is supported by most new cards, however it is disabled by default since some ATi drivers behave poorly with it enabled. Enabling this may speed up loading times. Variable: gl_ext_occlusion_query Values: 0 (Disabled), 1 (Enabled no wait), 2 (Enabled wait) Default: 0 Enable support for occlusion queries to avoid rendering entities that are not visible. At this time, most cards that support this do not provide a significant performance boost to make it worthwhile. The 'no wait' setting ignores the occlusion query if it isn't ready by the time entities are ready to be drawn, 'wait' waits for the query to complete so hidden entities are never drawn. Hardware support required. Variable: gl_zfar Values: #### Default: 8192 Control how far you are able to see in the world. Default Quake II GL renderer uses 4096 units, which results in some parts of maps not being visible at long distances. 8192 should be fine for almost all maps. Variable: gl_hudscale Values: #.# Default: 1 Multiply the size of the HUD elements (including chat text) by this value. Useful if you run at a high resolution and the HUD elements are too small. You may also want to enable "gl_noscrap" if using this. Variable: gl_noscrap Values: 0 (Disabled), 1 (Enabled) Default: 0 Avoid using the scrap, a texture built up of smaller textures. If you see textures 'leaking' into other textures, especially if using HUD scaling, enable this. Variable: gl_doublelight_entities Values: 0 (Disabled), 1 (Enabled) Default: 1 Apply modulate twice to entities. This follows the standard Quake II renderer behaviour, but causes models to be unrealistically shaded in places. Variable: gl_overbrights Values: 0 (Disabled), 1 (Enabled) Default: 0 Enable overbright rendering. Overbrights causes textures to be drawn multiplied by themselves which gives a much more vivid appearance. Due to the brightness of some Quake II textures however, overbrights may look a little weird in places. Note that enabling overbrights will disable Quake II's native gamma correction setting ("vid_gamma"). Variable: gl_coloredlightmaps Values: 0.0-1.0 Default: 1 Amount of coloring from the lightmap that is used. Setting this to 0 disables all colors and lighting is greyscale. May be set anywhere between 0 and 1. Variable: gl_texture_formats Values: png, jpg, tga Default: png jpg tga A list of image formats that are attempted for map textures before reverting to the original ".wal". Variable: gl_pic_formats Values: png, jpg, tga Default: png jpg tga A list of image formats that are attempted for images (console, HUD, etc) before reverting to the original ".pcx". Variable: gl_dlight_falloff Values: 0 (Disabled), 1 (Enabled) Default: 0 Enable smooth dynamic light falloff. This makes the edges of dynamic lights smoother but may make them appear less intense. Variable: gl_defertext Values: 0 (Disabled), 1 (Enabled) Default: 0 Defer drawing of text until the end of the frame. This avoids extra texture swapping and can give a noticeable FPS improvement. Unfortunately this is not compatible with mods that require specific ordering of text and images such as OSP tourney. Note that enabling defered text drawing will disable the skin preview window in Quake II's player setup menu. Variable: vid_topmost Values: 0 (Disabled), 1 (Enabled) Default: 0 Force the OpenGL window to always be on top of all other windows. Usually this will happen anyway by default. Variable: vid_forcedrefresh Values: ### Default: 0 Force a specific refresh rate to be used in fullscreen mode. Zero disables forced refresh rates. WARNING: Be sure your hardware supports the selected refresh rate in the resolution you run at before using this! Variable: vid_optimalrefresh Values: 0 (Disabled), 1 (Enabled) Default: 0 Use the highest available refresh rate when running in fullscreen mode. Variable: vid_flip_on_switch Values: 0 (Disabled), 1 (Enabled) Default: 0 Restore original desktop display settings when task switching out of Quake II. Variable: vid_nowgl Values: 0 (Disabled), 1 (Enabled) Default: 0 Avoid using the Windows GL functions. This may be required with some very old or non-compliant OpenGL drivers. Disabling WGL prevents multisampling and some other features from working. Technical Support ----------------- If you have any problems with the latest release of R1GL, please post any bug reports in the "Other Projects" section (http://www.r1ch.net/forum/index.php?board=7.0) of the forums (http://www.r1ch.net/forum/index.php). Version History --------------- Version 0.1.5.42 (Unreleased), Released 02/14/2009 - Fix crashes caused by truncated .wal files. - Only apply gl_saturation to world textures. Version 0.1.5.41, Released 10/10/2008 - Slightly faster particle rendering by avoiding float to int conversions. - gl_noscrap defaults to 1, fixes the side effect of the scrap not having gamma applied so vid_gamma_pics works as expected. - gl_dynamic 0 no longer applies dynamic lighting to entities. - gl_ext_pointparameters is ignored on ATI cards unless set to 2 (forced). - Fixed a crash when invalid (negative) skinnums were set on entities by buggy mods or delta errors. - New texture lighting code from JDolan / Quake2World. Disabled by default, control with gl_texture_lighting_mode 1 to enable. New cvars, gl_contrast and gl_saturation to control amount of contrast and saturation. gl_modulate does not apply to textures in this mode, use vid_gamma to control texture brightness. Should result in higher quality textures at higher brightness levels without washing out the colors, at the expense of slightly longer load times. - gl_modulate defaults to 2. Version 0.1.5.40, Released 09/14/2007 - Fixed floating point issues (see R1Q2 changelog for more information). - Faster TGA loading, no longer support colormap TGA files. Only 32, 24 and 8 bit with/without RLE are supported. - Slightly faster culling with some optimizations taken from Q3. - Improved hunk allocation code, should give faster loading times for maps/models. - No longer apply anisotropic filtering to hud icons. - gl_linear_mipmaps cvar, attempt to generate higher quality mipmaps by using linear filtering. However, I think they look worse. - Improve behaviour of changing gl_ext_texture_filter_anisotropic on and off mid-game. Version 0.1.5.39r (Win32), Released 05/04/2007 - Rebuild as relocatable DLL. Version 0.1.5.39, Released 04/16/2007 - Toggle for the hud icon scaling with pcx / hi res replacements, gl_pic_scale. - Don't try to initialize gl_ext_texture_filter_anisotropic twice. Version 0.1.5.38, Released 04/10/2007 - Hi-res replacements of .pcx files (e.g. hud icons) are scaled to properly fit the original size that the pcx would take. - Check chunk sizes of brush models to prevent corrupt models causing crashes. - Better handling of OpenGL startup failures (Vista compatibility). Version 0.1.5.37, Released 02/09/2007 - Reverted forced disabling of gl_ext_pointparameters on ATI hardware, now simply defaults to 0 instead. Version 0.1.5.36, Released 02/09/2007 - Fixed detection of ATI video cards and disable gl_ext_pointparameters if found due to driver bugs. - vid_optimalrefresh, if set, will use highest available refresh rate when in fullscreen. If R1GL detects you are using default refresh rates, it will print a warning to the console. - If running Q2 at same resolution and color depth as desktop, forcibly inherit desktop refresh rate to avoid mode switching. Version 0.1.4, Released 07/02/2004 - Finally fixed transparency that had been broken for the past few releases. The problem was with the gl_vertex_arrays code from id Software's Ref_GL that did not take into account 4 byte color values so nothing was rendered with any transparency. Version 0.1.3, Released 01/22/2004 - Totally removed paletted texture support. R1GL will no longer run on 3DFX cards most likely, as gl_ext_palettedtexture was just causing too many problems with all the new 32 bit stuff. - Added opengl version string. - Defaulted to GL_LINEAR_MIPMAP_LINEAR texture minification. - Removed some cvars that didn't actually do anything. - Compiled against zlib 1.2.1 which gives up to a 30% speed increase on inflating data (i.e. faster PNG loading). Version 0.1.2, Released 05/25/2003 - Massive change to the way R1GL chooses which pixel format to use. This release MIGHT NOT WORK on all cards. Please report any problems to me. However, this change makes a lot of nice stuff possible: - New Cvars: gl_colorbits gl_depthbits gl_alphabits gl_stencilbits - New Cvars for GL extensions: gl_ext_multisample gl_ext_samples - New Cvars for NVIDIA only GL extensions: gl_ext_nv_multisample_filter_hint See the "CVAR List" in the readme for a full description of what each one does. You shouldn't really need to change any of the gl_*bits setting as they are automatically detected based on your desktop color depth. Note that if your card doesn't support the new format, R1GL *should* revert to the old method of using the generic pixelformats, but this is not 100% tested. To force R1GL to use the old method, set the cvar vid_nowgl to 1 *BEFORE* loading R1GL. If you still get problems even after forcing old method, please contact me and I'll try to figure out what's going on. - PNG scaling to match .wal files. Say you have a 128x128 .wal and a 512x512 PNG, R1GL will now properly scale the PNG so it fits into the same space as the .wal without clipping or resizing (no quality loss). - gl_zfar support, control how far you can see. Default in Quake2 was 4096, R1GL defaults to 8192. Hardly impacts performance. Only really useful on huge maps (such as mountain_2 if you play gloom). Does not require a vid_restart to take effect. - Smoother dynamic light falloff (less blocky edges). No performance hit so you can't turn it off :) - Improved detection and appropriate settings for 16 bit color depth. - All gl uploads are now done in 32 bit since the 24 bit code caused a lot of problems and probably didn't benefit anything anyway. - Cvar settings are NO LONGER archived to Config.cfg, if you want to keep anything permanent be sure to put it in your own config. - Errors occuring during OpenGL startup are now highlighted in the console with the alternate Q2 font color. - Gamma is no longer applied by default to pics (console, hud icons, etc). If you wish to enable this behaviour to mimic 0.1.1 and the earlier versions, set vid_gamma_pics 1. - Optional force a video width/height with cvars vid_forcewidth and vid_forceheight. Useful for getting 1280x1024 for example if you have a 5:4 aspect ratio screen (typical on some LCD panels). - Entity brightness is reduced, previously a bug or somewhat silly feature in Q2 GL resulted in modulate being applied twice to entities. Fixing this makes them look much more realistically shaded. Version 0.1.1, Released 01/04/2003 - The Ref_R1GL.dll is now statically linked, meaning you do not need anything else to be able to use it. No more MSVCR70.dll, ZLib.dll and LibPNG12.dll are required. - No more Pentium 4 version of the DLL, performance increase was neglibile and was confusing to users as which to use. - Compiled against libpng 1.2.5. Version 0.1.0, Released 11/11/2002 - 3DFX compatibility mode (auto detected) allows old 16 bit 3DFX cards to use 24/32 bit PNG textures. Unsupported as I don't have a 3DFX card to test this on. Version 0.0.9, Released 10/26/2002 - Anisotropic filtering support. gl_ext_texture_filter_anisotropic and gl_ext_max_anisotropy control it. Requires fairly new hardware to work. - Fix for GL_SGIS_generate_mipmap and GL_EXT_paletted_texture incompatibilities. Unless you are running on very old hardware, I highly recommend you set gl_ext_palettedtexture to 0 for best quality and compatibility with other extensions. Version 0.0.8, Released 10/25/2002 - Hardware/driver based mipmap generation (SGIS_generate_mipmap). If it breaks horribly, set gl_ext_generate_mipmap to 0. Results in oh-so slightly higher quality mipmaps on my GF4 if set to 1. - PNG textures in maps are properly mipmapped. - Removed redundant memory allocation and copying whilst loading images. - Pentium 4 SSE2 version of R1GL is supplied in the zip, if you have a P4 then rename Ref_R1GL-P4.dll to Ref_R1GL.dll for a small speed boost or something. - No longer including libpng and msvcr70 DLL files in the R1GL zip. If you get missing DLL errors, goto http://r1gl.r1.cx/ and grab the appropriate zip files there for the DLLs you are missing. - Removed the 'Falling out after 50k polys' warning. Still looking into what causes this to happen in the first place. Version 0.0.7, Released 07/21/2002 - Fixed an issue with some 24 bit PNG files showing up with a red/green/blue alpha channel. Version 0.0.6, Released 05/02/2002 - Fixed 24 bit PNG files on skins being rendered with 8 bit mipmap (i.e. looking totally broken). Version 0.0.5, Released 04/29/2002 - Well since no one downloaded R1GL until today I didn't spot a small bug: R1GL only runs with the R1Q2 renderer API since I didn't notice it including an old Ref.h file I had lying around. Should no longer crash on startup any more. Note, if you like R1GL you should try renaming it to Ref_GL.dll, as this allows Quake 2 to better detect some gl functions. Version 0.0.4, Released 04/28/2002 - Recompiled with VC7, libpng 1.2.2 and zlib 1.1.4. Version 0.0.3, Released 04/22/2002 - R1GL will look for image.png before trying to load image.pcx (i.e. PNG skins or hud icons etc). - Added texture hashing (might run a little faster). Version 0.0.2, Released 04/??/2002 - Fix for some old code from client that caused incompatible API version error. Version 0.0.1, Released 04/??/2002 - Initial Release. Source code to R1GL is available on request. Find me on irc.edgeirc.net as I'm too lazy to keep a zip file on my site up to date :)