diff options
| -rw-r--r-- | CC | 229 | ||||
| -rw-r--r-- | COPYING | 301 | ||||
| -rw-r--r-- | GPL | 281 | ||||
| -rw-r--r-- | src/client/snd_main.c | 2 | ||||
| -rw-r--r-- | src/renderer/tr_init.c | 101 | ||||
| -rw-r--r-- | src/renderer/tr_local.h | 1 | ||||
| -rw-r--r-- | src/unix/linux_glimp.c | 60 | ||||
| -rw-r--r-- | src/unix/sdl_glimp.c | 62 | ||||
| -rw-r--r-- | src/win32/win_glimp.c | 75 | 
9 files changed, 638 insertions, 474 deletions
@@ -0,0 +1,229 @@ +                               Creative_Commons +                          Creative Commons Legal Code +                          Attribution-ShareAlike 2.5 +CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL +SERVICES. DISTRIBUTION OF THIS LICENSE DOES NOT CREATE AN ATTORNEY-CLIENT +RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS INFORMATION ON AN "AS-IS" BASIS. +CREATIVE COMMONS MAKES NO WARRANTIES REGARDING THE INFORMATION PROVIDED, AND +DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM ITS USE. +License +THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE +COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY +COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS +AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED. +BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO BE +BOUND BY THE TERMS OF THIS LICENSE. THE LICENSOR GRANTS YOU THE RIGHTS +CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND +CONDITIONS. +1. Definitions + +  a. "Collective Work" means a work, such as a periodical issue, anthology or +     encyclopedia, in which the Work in its entirety in unmodified form, along +     with a number of other contributions, constituting separate and +     independent works in themselves, are assembled into a collective whole. A +     work that constitutes a Collective Work will not be considered a +     Derivative Work (as defined below) for the purposes of this License. +  b. "Derivative Work" means a work based upon the Work or upon the Work and +     other pre-existing works, such as a translation, musical arrangement, +     dramatization, fictionalization, motion picture version, sound recording, +     art reproduction, abridgment, condensation, or any other form in which the +     Work may be recast, transformed, or adapted, except that a work that +     constitutes a Collective Work will not be considered a Derivative Work for +     the purpose of this License. For the avoidance of doubt, where the Work is +     a musical composition or sound recording, the synchronization of the Work +     in timed-relation with a moving image ("synching") will be considered a +     Derivative Work for the purpose of this License. +  c. "Licensor" means the individual or entity that offers the Work under the +     terms of this License. +  d. "Original Author" means the individual or entity who created the Work. +  e. "Work" means the copyrightable work of authorship offered under the terms +     of this License. +  f. "You" means an individual or entity exercising rights under this License +     who has not previously violated the terms of this License with respect to +     the Work, or who has received express permission from the Licensor to +     exercise rights under this License despite a previous violation. +  g. "License Elements" means the following high-level license attributes as +     selected by Licensor and indicated in the title of this License: +     Attribution, ShareAlike. + +2. Fair Use Rights. Nothing in this license is intended to reduce, limit, or +restrict any rights arising from fair use, first sale or other limitations on +the exclusive rights of the copyright owner under copyright law or other +applicable laws. +3. License Grant. Subject to the terms and conditions of this License, Licensor +hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for the +duration of the applicable copyright) license to exercise the rights in the +Work as stated below: + +  a. to reproduce the Work, to incorporate the Work into one or more Collective +     Works, and to reproduce the Work as incorporated in the Collective Works; +  b. to create and reproduce Derivative Works; +  c. to distribute copies or phonorecords of, display publicly, perform +     publicly, and perform publicly by means of a digital audio transmission +     the Work including as incorporated in Collective Works; +  d. to distribute copies or phonorecords of, display publicly, perform +     publicly, and perform publicly by means of a digital audio transmission +     Derivative Works. +  e. For the avoidance of doubt, where the work is a musical composition: + +       i. Performance Royalties Under Blanket Licenses. Licensor waives the +          exclusive right to collect, whether individually or via a performance +          rights society (e.g. ASCAP, BMI, SESAC), royalties for the public +          performance or public digital performance (e.g. webcast) of the Work. +      ii. Mechanical Rights and Statutory Royalties. Licensor waives the +          exclusive right to collect, whether individually or via a music +          rights society or designated agent (e.g. Harry Fox Agency), royalties +          for any phonorecord You create from the Work ("cover version") and +          distribute, subject to the compulsory license created by 17 USC +          Section 115 of the US Copyright Act (or the equivalent in other +          jurisdictions). + +  f. Webcasting Rights and Statutory Royalties. For the avoidance of doubt, +     where the Work is a sound recording, Licensor waives the exclusive right +     to collect, whether individually or via a performance-rights society (e.g. +     SoundExchange), royalties for the public digital performance (e.g. +     webcast) of the Work, subject to the compulsory license created by 17 USC +     Section 114 of the US Copyright Act (or the equivalent in other +     jurisdictions). + +The above rights may be exercised in all media and formats whether now known or +hereafter devised. The above rights include the right to make such +modifications as are technically necessary to exercise the rights in other +media and formats. All rights not expressly granted by Licensor are hereby +reserved. +4. Restrictions.The license granted in Section 3 above is expressly made +subject to and limited by the following restrictions: + +  a. You may distribute, publicly display, publicly perform, or publicly +     digitally perform the Work only under the terms of this License, and You +     must include a copy of, or the Uniform Resource Identifier for, this +     License with every copy or phonorecord of the Work You distribute, +     publicly display, publicly perform, or publicly digitally perform. You may +     not offer or impose any terms on the Work that alter or restrict the terms +     of this License or the recipients' exercise of the rights granted +     hereunder. You may not sublicense the Work. You must keep intact all +     notices that refer to this License and to the disclaimer of warranties. +     You may not distribute, publicly display, publicly perform, or publicly +     digitally perform the Work with any technological measures that control +     access or use of the Work in a manner inconsistent with the terms of this +     License Agreement. The above applies to the Work as incorporated in a +     Collective Work, but this does not require the Collective Work apart from +     the Work itself to be made subject to the terms of this License. If You +     create a Collective Work, upon notice from any Licensor You must, to the +     extent practicable, remove from the Collective Work any credit as required +     by clause 4(c), as requested. If You create a Derivative Work, upon notice +     from any Licensor You must, to the extent practicable, remove from the +     Derivative Work any credit as required by clause 4(c), as requested. +  b. You may distribute, publicly display, publicly perform, or publicly +     digitally perform a Derivative Work only under the terms of this License, +     a later version of this License with the same License Elements as this +     License, or a Creative Commons iCommons license that contains the same +     License Elements as this License (e.g. Attribution-ShareAlike 2.5 Japan). +     You must include a copy of, or the Uniform Resource Identifier for, this +     License or other license specified in the previous sentence with every +     copy or phonorecord of each Derivative Work You distribute, publicly +     display, publicly perform, or publicly digitally perform. You may not +     offer or impose any terms on the Derivative Works that alter or restrict +     the terms of this License or the recipients' exercise of the rights +     granted hereunder, and You must keep intact all notices that refer to this +     License and to the disclaimer of warranties. You may not distribute, +     publicly display, publicly perform, or publicly digitally perform the +     Derivative Work with any technological measures that control access or use +     of the Work in a manner inconsistent with the terms of this License +     Agreement. The above applies to the Derivative Work as incorporated in a +     Collective Work, but this does not require the Collective Work apart from +     the Derivative Work itself to be made subject to the terms of this +     License. +  c. If you distribute, publicly display, publicly perform, or publicly +     digitally perform the Work or any Derivative Works or Collective Works, +     You must keep intact all copyright notices for the Work and provide, +     reasonable to the medium or means You are utilizing: (i) the name of the +     Original Author (or pseudonym, if applicable) if supplied, and/or (ii) if +     the Original Author and/or Licensor designate another party or parties +     (e.g. a sponsor institute, publishing entity, journal) for attribution in +     Licensor's copyright notice, terms of service or by other reasonable +     means, the name of such party or parties; the title of the Work if +     supplied; to the extent reasonably practicable, the Uniform Resource +     Identifier, if any, that Licensor specifies to be associated with the +     Work, unless such URI does not refer to the copyright notice or licensing +     information for the Work; and in the case of a Derivative Work, a credit +     identifying the use of the Work in the Derivative Work (e.g., "French +     translation of the Work by Original Author," or "Screenplay based on +     original Work by Original Author"). Such credit may be implemented in any +     reasonable manner; provided, however, that in the case of a Derivative +     Work or Collective Work, at a minimum such credit will appear where any +     other comparable authorship credit appears and in a manner at least as +     prominent as such other comparable authorship credit. + +5. Representations, Warranties and Disclaimer +UNLESS OTHERWISE AGREED TO BY THE PARTIES IN WRITING, LICENSOR OFFERS THE WORK +AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE +MATERIALS, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT +LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY, FITNESS FOR A PARTICULAR +PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, +OR THE PRESENCE OF ABSENCE OF ERRORS, WHETHER OR NOT DISCOVERABLE. SOME +JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO SUCH +EXCLUSION MAY NOT APPLY TO YOU. +6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, IN +NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, +INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS +LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. +7. Termination + +  a. This License and the rights granted hereunder will terminate automatically +     upon any breach by You of the terms of this License. Individuals or +     entities who have received Derivative Works or Collective Works from You +     under this License, however, will not have their licenses terminated +     provided such individuals or entities remain in full compliance with those +     licenses. Sections 1, 2, 5, 6, 7, and 8 will survive any termination of +     this License. +  b. Subject to the above terms and conditions, the license granted here is +     perpetual (for the duration of the applicable copyright in the Work). +     Notwithstanding the above, Licensor reserves the right to release the Work +     under different license terms or to stop distributing the Work at any +     time; provided, however that any such election will not serve to withdraw +     this License (or any other license that has been, or is required to be, +     granted under the terms of this License), and this License will continue +     in full force and effect unless terminated as stated above. + +8. Miscellaneous + +  a. Each time You distribute or publicly digitally perform the Work or a +     Collective Work, the Licensor offers to the recipient a license to the +     Work on the same terms and conditions as the license granted to You under +     this License. +  b. Each time You distribute or publicly digitally perform a Derivative Work, +     Licensor offers to the recipient a license to the original Work on the +     same terms and conditions as the license granted to You under this +     License. +  c. If any provision of this License is invalid or unenforceable under +     applicable law, it shall not affect the validity or enforceability of the +     remainder of the terms of this License, and without further action by the +     parties to this agreement, such provision shall be reformed to the minimum +     extent necessary to make such provision valid and enforceable. +  d. No term or provision of this License shall be deemed waived and no breach +     consented to unless such waiver or consent shall be in writing and signed +     by the party to be charged with such waiver or consent. +  e. This License constitutes the entire agreement between the parties with +     respect to the Work licensed here. There are no understandings, agreements +     or representations with respect to the Work not specified here. Licensor +     shall not be bound by any additional provisions that may appear in any +     communication from You. This License may not be modified without the +     mutual written agreement of the Licensor and You. + +Creative Commons is not a party to this License, and makes no warranty +whatsoever in connection with the Work. Creative Commons will not be liable to +You or any party on any legal theory for any damages whatsoever, including +without limitation any general, special, incidental or consequential damages +arising in connection to this license. Notwithstanding the foregoing two (2) +sentences, if Creative Commons has expressly identified itself as the Licensor +hereunder, it shall have all rights and obligations of Licensor. +Except for the limited purpose of indicating to the public that the Work is +licensed under the CCPL, neither party will use the trademark "Creative +Commons" or any related trademark or logo of Creative Commons without the prior +written consent of Creative Commons. Any permitted use will be in compliance +with Creative Commons' then-current trademark usage guidelines, as may be +published on its website or otherwise made available upon request from time to +time. +Creative Commons may be contacted at http://creativecommons.org/. @@ -1,281 +1,44 @@ -    GNU GENERAL PUBLIC LICENSE -       Version 2, June 1991 +---------------------------------------------------------- Tremulous License --- - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. +Tremulous is licensed in two broadly separate sections: the code and the media.  -    Preamble +The code is licensed under the GNU GENERAL PUBLIC LICENSE. This license is +contained in full in the file named GPL. Please be aware of the exceptions to +this license as listed below. -  The licenses for most software are designed to take away your -freedom to share and change it.  By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users.  This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it.  (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.)  You can apply it to -your programs, too. +The media is licensed under the CREATIVE COMMONS ATTRIBUTION-SHAREALIKE 2.5 +LICENSE. Please read http://creativecommons.org/licenses/by-sa/2.5/ to learn +more about this license. The full license text is contained in the file named +CC. Please be aware of the exceptions to this license as listed below. -  When we speak of free software, we are referring to freedom, not -price.  Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. -  To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. +---------------------------------------------------- Code License Exceptions --- -  For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have.  You must make sure that they, too, receive or can get the -source code.  And you must show them these terms so they know their -rights. +The following files contain sections of code that are not licensed under the +GPL, but are nevertheless GPL compatible. The license text for these licenses +is contained within the files as listed. -  We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. +    src/qcommon/unzip.c                                         zlib license +    src/game/bg_lib.c                                            BSD license +    src/client/snd_adpcm.c            Stichting Mathematisch Centrum license +    src/jpeg-6/*                                                JPEG license -  Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software.  If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. -  Finally, any free program is threatened constantly by software -patents.  We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary.  To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. +--------------------------------------------------- Media License Exceptions --- -  The precise terms and conditions for copying, distribution and -modification follow. +All textures created by Yves 'evillair' Allaire (from sets e2, e3, e4, e6 and +e8) are covered by the CREATIVE COMMONS ATTRIBUTION-NONCOMMERCIAL-NODERIVS 2.5 +LICENSE. Please read http://creativecommons.org/licenses/by-nc-nd/2.5/ to learn +more about this license. -   GNU GENERAL PUBLIC LICENSE -   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION +All shaderlab (http://www.shaderlab.com/) textures (by Randy 'ydnar' Reddig) +are subject to the following license: -  0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License.  The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language.  (Hereinafter, translation is included without limitation in -the term "modification".)  Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope.  The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - -  1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - -  2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - -    a) You must cause the modified files to carry prominent notices -    stating that you changed the files and the date of any change. - -    b) You must cause any work that you distribute or publish, that in -    whole or in part contains or is derived from the Program or any -    part thereof, to be licensed as a whole at no charge to all third -    parties under the terms of this License. - -    c) If the modified program normally reads commands interactively -    when run, you must cause it, when started running for such -    interactive use in the most ordinary way, to print or display an -    announcement including an appropriate copyright notice and a -    notice that there is no warranty (or else, saying that you provide -    a warranty) and that users may redistribute the program under -    these conditions, and telling the user how to view a copy of this -    License.  (Exception: if the Program itself is interactive but -    does not normally print such an announcement, your work based on -    the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole.  If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works.  But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - -  3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - -    a) Accompany it with the complete corresponding machine-readable -    source code, which must be distributed under the terms of Sections -    1 and 2 above on a medium customarily used for software interchange; or, - -    b) Accompany it with a written offer, valid for at least three -    years, to give any third party, for a charge no more than your -    cost of physically performing source distribution, a complete -    machine-readable copy of the corresponding source code, to be -    distributed under the terms of Sections 1 and 2 above on a medium -    customarily used for software interchange; or, - -    c) Accompany it with the information you received as to the offer -    to distribute corresponding source code.  (This alternative is -    allowed only for noncommercial distribution and only if you -    received the program in object code or executable form with such -    an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it.  For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable.  However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - -  4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License.  Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - -  5. You are not required to accept this License, since you have not -signed it.  However, nothing else grants you permission to modify or -distribute the Program or its derivative works.  These actions are -prohibited by law if you do not accept this License.  Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - -  6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions.  You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - -  7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License.  If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all.  For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices.  Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - -  8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded.  In such case, this License incorporates -the limitation as if written in the body of this License. - -  9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time.  Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number.  If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation.  If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - -  10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission.  For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this.  Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - -			    NO WARRANTY - -  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - -  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - -		     END OF TERMS AND CONDITIONS - +  Usage and redistribution policy: Textures may be freely downloaded, modified, +  and used in free maps, mods or total conversions provided this copyright +  notice is left intact and a link to Shaderlab is provided in the credits or +  read-me file. Other non-commercial applications are considered on a +  case-by-case basis via e-mail. All other usage requires written permission. +  Bulk redistribution or archival of the textures in any medium, digital or +  otherwise (except mapping packages for mods) is prohibited. +                         @@ -0,0 +1,281 @@ +    GNU GENERAL PUBLIC LICENSE +       Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +    Preamble + +  The licenses for most software are designed to take away your +freedom to share and change it.  By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users.  This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it.  (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.)  You can apply it to +your programs, too. + +  When we speak of free software, we are referring to freedom, not +price.  Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + +  To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + +  For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have.  You must make sure that they, too, receive or can get the +source code.  And you must show them these terms so they know their +rights. + +  We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + +  Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software.  If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + +  Finally, any free program is threatened constantly by software +patents.  We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary.  To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + +  The precise terms and conditions for copying, distribution and +modification follow. + +   GNU GENERAL PUBLIC LICENSE +   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + +  0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License.  The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language.  (Hereinafter, translation is included without limitation in +the term "modification".)  Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope.  The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + +  1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + +  2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + +    a) You must cause the modified files to carry prominent notices +    stating that you changed the files and the date of any change. + +    b) You must cause any work that you distribute or publish, that in +    whole or in part contains or is derived from the Program or any +    part thereof, to be licensed as a whole at no charge to all third +    parties under the terms of this License. + +    c) If the modified program normally reads commands interactively +    when run, you must cause it, when started running for such +    interactive use in the most ordinary way, to print or display an +    announcement including an appropriate copyright notice and a +    notice that there is no warranty (or else, saying that you provide +    a warranty) and that users may redistribute the program under +    these conditions, and telling the user how to view a copy of this +    License.  (Exception: if the Program itself is interactive but +    does not normally print such an announcement, your work based on +    the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole.  If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works.  But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + +  3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + +    a) Accompany it with the complete corresponding machine-readable +    source code, which must be distributed under the terms of Sections +    1 and 2 above on a medium customarily used for software interchange; or, + +    b) Accompany it with a written offer, valid for at least three +    years, to give any third party, for a charge no more than your +    cost of physically performing source distribution, a complete +    machine-readable copy of the corresponding source code, to be +    distributed under the terms of Sections 1 and 2 above on a medium +    customarily used for software interchange; or, + +    c) Accompany it with the information you received as to the offer +    to distribute corresponding source code.  (This alternative is +    allowed only for noncommercial distribution and only if you +    received the program in object code or executable form with such +    an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it.  For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable.  However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + +  4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License.  Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + +  5. You are not required to accept this License, since you have not +signed it.  However, nothing else grants you permission to modify or +distribute the Program or its derivative works.  These actions are +prohibited by law if you do not accept this License.  Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + +  6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions.  You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + +  7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License.  If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all.  For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices.  Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + +  8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded.  In such case, this License incorporates +the limitation as if written in the body of this License. + +  9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time.  Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number.  If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation.  If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + +  10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission.  For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this.  Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + +			    NO WARRANTY + +  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + +  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + +		     END OF TERMS AND CONDITIONS + diff --git a/src/client/snd_main.c b/src/client/snd_main.c index 1ecdc237..8f09570e 100644 --- a/src/client/snd_main.c +++ b/src/client/snd_main.c @@ -387,7 +387,7 @@ void S_Init( void )  		Cmd_AddCommand( "s_stop", S_StopAllSounds );  		Cmd_AddCommand( "s_info", S_SoundInfo ); -		cv = Cvar_Get( "s_useOpenAL", "1", CVAR_ARCHIVE ); +		cv = Cvar_Get( "s_useOpenAL", "0", CVAR_ARCHIVE );  		if( cv->integer ) {  			//OpenAL  			started = S_AL_Init( &si ); diff --git a/src/renderer/tr_init.c b/src/renderer/tr_init.c index 4d47f46c..475a37c6 100644 --- a/src/renderer/tr_init.c +++ b/src/renderer/tr_init.c @@ -175,6 +175,93 @@ static void AssertCvarRange( cvar_t *cv, float minVal, float maxVal, qboolean sh  } +#define GENERIC_HW_R_PICMIP_DEFAULT				"0" +#define GENERIC_HW_R_TEXTUREMODE_DEFAULT	"GL_LINEAR_MIPMAP_LINEAR" + +/* +================== +GL_ResolveHardwareType + +Chipset specific configuration +================== +*/ +void GL_ResolveHardwareType( void ) +{ +	char		buf[ 1024 ]; +	cvar_t	*lastValidRenderer = ri.Cvar_Get( +			"r_lastValidRenderer", "(uninitialized)", CVAR_ARCHIVE ); + +	Q_strncpyz( buf, glConfig.renderer_string, sizeof( buf ) ); +	Q_strlwr( buf ); + +	// NOTE: if changing cvars, do it within this block.  This allows them +	// to be overridden when testing driver fixes, etc. but only sets +	// them to their default state when the hardware is first installed/run. +	if( Q_stricmp( lastValidRenderer->string, glConfig.renderer_string ) ) +	{ +		glConfig.hardwareType = GLHW_GENERIC; + +		ri.Cvar_Set( "r_textureMode", GENERIC_HW_R_TEXTUREMODE_DEFAULT ); + +		// VOODOO GRAPHICS w/ 2MB +		if ( strstr( buf, "voodoo graphics/1 tmu/2 mb" ) ) +		{ +			ri.Cvar_Set( "r_picmip", "2" ); +			ri.Cvar_Get( "r_picmip", "1", CVAR_ARCHIVE | CVAR_LATCH ); +		} +		else +		{ +			ri.Cvar_Set( "r_picmip", GENERIC_HW_R_PICMIP_DEFAULT ); + +			if ( strstr( buf, "rage 128" ) || strstr( buf, "rage128" ) ) +			{ +				ri.Cvar_Set( "r_finish", "0" ); +			} +			// Savage3D and Savage4 should always have trilinear enabled +			else if ( strstr( buf, "savage3d" ) || strstr( buf, "s3 savage4" ) ) +			{ +				ri.Cvar_Set( "r_texturemode", "GL_LINEAR_MIPMAP_LINEAR" ); +			} +		} +	} +	 +	// +	// this is where hardware specific workarounds that should be +	// detected/initialized every startup should go. +	// +	if ( strstr( buf, "banshee" ) || strstr( buf, "voodoo3" ) ) +	{ +		glConfig.hardwareType = GLHW_3DFX_2D3D; +	} +	// VOODOO GRAPHICS w/ 2MB +	else if ( strstr( buf, "voodoo graphics/1 tmu/2 mb" ) ) +	{ +	} +	else if ( strstr( buf, "glzicd" ) ) +	{ +	} +	else if ( strstr( buf, "rage pro" ) || +			strstr( buf, "Rage Pro" ) || +			strstr( buf, "ragepro" ) ) +	{ +		glConfig.hardwareType = GLHW_RAGEPRO; +	} +	else if ( strstr( buf, "rage 128" ) ) +	{ +	} +	else if ( strstr( buf, "permedia2" ) ) +	{ +		glConfig.hardwareType = GLHW_PERMEDIA2; +	} +	else if ( strstr( buf, "riva 128" ) ) +	{ +		glConfig.hardwareType = GLHW_RIVA128; +	} +	else if ( strstr( buf, "riva tnt " ) ) +	{ +	} +} +  /*  ** InitOpenGL  ** @@ -904,13 +991,10 @@ void R_Register( void )  	r_ext_gamma_control = ri.Cvar_Get( "r_ext_gamma_control", "1", CVAR_ARCHIVE | CVAR_LATCH );  	r_ext_multitexture = ri.Cvar_Get( "r_ext_multitexture", "1", CVAR_ARCHIVE | CVAR_LATCH );  	r_ext_compiled_vertex_array = ri.Cvar_Get( "r_ext_compiled_vertex_array", "1", CVAR_ARCHIVE | CVAR_LATCH); -#ifdef __linux__ // broken on linux  	r_ext_texture_env_add = ri.Cvar_Get( "r_ext_texture_env_add", "0", CVAR_ARCHIVE | CVAR_LATCH); -#else -	r_ext_texture_env_add = ri.Cvar_Get( "r_ext_texture_env_add", "1", CVAR_ARCHIVE | CVAR_LATCH); -#endif -	r_picmip = ri.Cvar_Get ("r_picmip", "0", CVAR_ARCHIVE | CVAR_LATCH ); +	r_picmip = ri.Cvar_Get ("r_picmip", GENERIC_HW_R_PICMIP_DEFAULT, +			CVAR_ARCHIVE | CVAR_LATCH );  	r_roundImagesDown = ri.Cvar_Get ("r_roundImagesDown", "1", CVAR_ARCHIVE | CVAR_LATCH );  	r_colorMipLevels = ri.Cvar_Get ("r_colorMipLevels", "0", CVAR_LATCH );  	AssertCvarRange( r_picmip, 0, 16, qtrue ); @@ -918,11 +1002,7 @@ void R_Register( void )  	r_texturebits = ri.Cvar_Get( "r_texturebits", "0", CVAR_ARCHIVE | CVAR_LATCH );  	r_colorbits = ri.Cvar_Get( "r_colorbits", "0", CVAR_ARCHIVE | CVAR_LATCH );  	r_stereo = ri.Cvar_Get( "r_stereo", "0", CVAR_ARCHIVE | CVAR_LATCH ); -#ifdef __linux__ -	r_stencilbits = ri.Cvar_Get( "r_stencilbits", "0", CVAR_ARCHIVE | CVAR_LATCH ); -#else  	r_stencilbits = ri.Cvar_Get( "r_stencilbits", "8", CVAR_ARCHIVE | CVAR_LATCH ); -#endif  	r_depthbits = ri.Cvar_Get( "r_depthbits", "0", CVAR_ARCHIVE | CVAR_LATCH );  	r_overBrightBits = ri.Cvar_Get ("r_overBrightBits", "1", CVAR_ARCHIVE | CVAR_LATCH );  	r_ignorehwgamma = ri.Cvar_Get( "r_ignorehwgamma", "0", CVAR_ARCHIVE | CVAR_LATCH); @@ -967,7 +1047,8 @@ void R_Register( void )  	r_dynamiclight = ri.Cvar_Get( "r_dynamiclight", "1", CVAR_ARCHIVE );  	r_dlightBacks = ri.Cvar_Get( "r_dlightBacks", "1", CVAR_ARCHIVE );  	r_finish = ri.Cvar_Get ("r_finish", "0", CVAR_ARCHIVE); -	r_textureMode = ri.Cvar_Get( "r_textureMode", "GL_LINEAR_MIPMAP_LINEAR", CVAR_ARCHIVE ); +	r_textureMode = ri.Cvar_Get( "r_textureMode", +			GENERIC_HW_R_TEXTUREMODE_DEFAULT, CVAR_ARCHIVE );  	r_swapInterval = ri.Cvar_Get( "r_swapInterval", "0", CVAR_ARCHIVE );  	r_gamma = ri.Cvar_Get( "r_gamma", "1", CVAR_ARCHIVE );  	r_facePlaneCull = ri.Cvar_Get ("r_facePlaneCull", "1", CVAR_ARCHIVE ); diff --git a/src/renderer/tr_local.h b/src/renderer/tr_local.h index 7efed35d..a80590ca 100644 --- a/src/renderer/tr_local.h +++ b/src/renderer/tr_local.h @@ -1259,6 +1259,7 @@ void		GLimp_SetGamma( unsigned char red[256],  						    unsigned char green[256],  							unsigned char blue[256] ); +void		GL_ResolveHardwareType( void );  /*  ==================================================================== diff --git a/src/unix/linux_glimp.c b/src/unix/linux_glimp.c index e481c15d..f2899981 100644 --- a/src/unix/linux_glimp.c +++ b/src/unix/linux_glimp.c @@ -1415,8 +1415,6 @@ void GLimp_Init( void )    qboolean attemptedlibGL = qfalse;    qboolean attempted3Dfx = qfalse;    qboolean success = qfalse; -  char  buf[1024]; -  cvar_t *lastValidRenderer = ri.Cvar_Get( "r_lastValidRenderer", "(uninitialized)", CVAR_ARCHIVE );    // guarded, as this is only relevant to SMP renderer thread  #ifdef SMP @@ -1507,63 +1505,7 @@ void GLimp_Init( void )    Q_strncpyz( glConfig.version_string, (char *)qglGetString (GL_VERSION), sizeof( glConfig.version_string ) );    Q_strncpyz( glConfig.extensions_string, (char *)qglGetString (GL_EXTENSIONS), sizeof( glConfig.extensions_string ) ); -  // -  // chipset specific configuration -  // -  strcpy( buf, glConfig.renderer_string ); -  strlwr( buf ); - -  // -  // NOTE: if changing cvars, do it within this block.  This allows them -  // to be overridden when testing driver fixes, etc. but only sets -  // them to their default state when the hardware is first installed/run. -  // -  if ( Q_stricmp( lastValidRenderer->string, glConfig.renderer_string ) ) -  { -    glConfig.hardwareType = GLHW_GENERIC; - -    ri.Cvar_Set( "r_textureMode", "GL_LINEAR_MIPMAP_NEAREST" ); - -    // VOODOO GRAPHICS w/ 2MB -    if ( Q_stristr( buf, "voodoo graphics/1 tmu/2 mb" ) ) -    { -      ri.Cvar_Set( "r_picmip", "2" ); -      ri.Cvar_Get( "r_picmip", "1", CVAR_ARCHIVE | CVAR_LATCH ); -    } else -    { -      ri.Cvar_Set( "r_picmip", "1" ); - -      if ( Q_stristr( buf, "rage 128" ) || Q_stristr( buf, "rage128" ) ) -      { -        ri.Cvar_Set( "r_finish", "0" ); -      } -      // Savage3D and Savage4 should always have trilinear enabled -      else if ( Q_stristr( buf, "savage3d" ) || Q_stristr( buf, "s3 savage4" ) ) -      { -        ri.Cvar_Set( "r_texturemode", "GL_LINEAR_MIPMAP_LINEAR" ); -      } -    } -  } - -  // -  // this is where hardware specific workarounds that should be -  // detected/initialized every startup should go. -  // -  if ( Q_stristr( buf, "banshee" ) || Q_stristr( buf, "Voodoo_Graphics" ) ) -  { -    glConfig.hardwareType = GLHW_3DFX_2D3D; -  } else if ( Q_stristr( buf, "rage pro" ) || Q_stristr( buf, "RagePro" ) ) -  { -    glConfig.hardwareType = GLHW_RAGEPRO; -  } else if ( Q_stristr( buf, "permedia2" ) ) -  { -    glConfig.hardwareType = GLHW_PERMEDIA2; -  } else if ( Q_stristr( buf, "riva 128" ) ) -  { -    glConfig.hardwareType = GLHW_RIVA128; -  } else if ( Q_stristr( buf, "riva tnt " ) ) -  { -  } +  GL_ResolveHardwareType( );    ri.Cvar_Set( "r_lastValidRenderer", glConfig.renderer_string ); diff --git a/src/unix/sdl_glimp.c b/src/unix/sdl_glimp.c index a42fbe8e..c286bf72 100644 --- a/src/unix/sdl_glimp.c +++ b/src/unix/sdl_glimp.c @@ -869,8 +869,6 @@ void GLimp_Init( void )    qboolean attemptedlibGL = qfalse;    qboolean attempted3Dfx = qfalse;    qboolean success = qfalse; -  char  buf[1024]; -  cvar_t *lastValidRenderer = ri.Cvar_Get( "r_lastValidRenderer", "(uninitialized)", CVAR_ARCHIVE );    r_allowSoftwareGL = ri.Cvar_Get( "r_allowSoftwareGL", "0", CVAR_LATCH ); @@ -949,63 +947,7 @@ void GLimp_Init( void )    Q_strncpyz( glConfig.version_string, (char *) qglGetString (GL_VERSION), sizeof( glConfig.version_string ) );    Q_strncpyz( glConfig.extensions_string, (char *) qglGetString (GL_EXTENSIONS), sizeof( glConfig.extensions_string ) ); -  // -  // chipset specific configuration -  // -  strcpy( buf, glConfig.renderer_string ); -  strlwr( buf ); - -  // -  // NOTE: if changing cvars, do it within this block.  This allows them -  // to be overridden when testing driver fixes, etc. but only sets -  // them to their default state when the hardware is first installed/run. -  // -  if ( Q_stricmp( lastValidRenderer->string, glConfig.renderer_string ) ) -  { -    glConfig.hardwareType = GLHW_GENERIC; - -    ri.Cvar_Set( "r_textureMode", "GL_LINEAR_MIPMAP_NEAREST" ); - -    // VOODOO GRAPHICS w/ 2MB -    if ( Q_stristr( buf, "voodoo graphics/1 tmu/2 mb" ) ) -    { -      ri.Cvar_Set( "r_picmip", "2" ); -      ri.Cvar_Get( "r_picmip", "1", CVAR_ARCHIVE | CVAR_LATCH ); -    } else -    { -      ri.Cvar_Set( "r_picmip", "1" ); - -      if ( Q_stristr( buf, "rage 128" ) || Q_stristr( buf, "rage128" ) ) -      { -        ri.Cvar_Set( "r_finish", "0" ); -      } -      // Savage3D and Savage4 should always have trilinear enabled -      else if ( Q_stristr( buf, "savage3d" ) || Q_stristr( buf, "s3 savage4" ) ) -      { -        ri.Cvar_Set( "r_texturemode", "GL_LINEAR_MIPMAP_LINEAR" ); -      } -    } -  } - -  // -  // this is where hardware specific workarounds that should be -  // detected/initialized every startup should go. -  // -  if ( Q_stristr( buf, "banshee" ) || Q_stristr( buf, "Voodoo_Graphics" ) ) -  { -    glConfig.hardwareType = GLHW_3DFX_2D3D; -  } else if ( Q_stristr( buf, "rage pro" ) || Q_stristr( buf, "RagePro" ) ) -  { -    glConfig.hardwareType = GLHW_RAGEPRO; -  } else if ( Q_stristr( buf, "permedia2" ) ) -  { -    glConfig.hardwareType = GLHW_PERMEDIA2; -  } else if ( Q_stristr( buf, "riva 128" ) ) -  { -    glConfig.hardwareType = GLHW_RIVA128; -  } else if ( Q_stristr( buf, "riva tnt " ) ) -  { -  } +  GL_ResolveHardwareType( );    ri.Cvar_Set( "r_lastValidRenderer", glConfig.renderer_string ); @@ -1014,8 +956,6 @@ void GLimp_Init( void )    GLW_InitGamma();    InitSig(); // not clear why this is at begin & end of function - -  return;  } diff --git a/src/win32/win_glimp.c b/src/win32/win_glimp.c index da37d234..ce23123e 100644 --- a/src/win32/win_glimp.c +++ b/src/win32/win_glimp.c @@ -1350,8 +1350,6 @@ static void GLW_StartOpenGL( void )  */  void GLimp_Init( void )  { -	char	buf[1024]; -	cvar_t *lastValidRenderer = ri.Cvar_Get( "r_lastValidRenderer", "(uninitialized)", CVAR_ARCHIVE );  	cvar_t	*cv;  	ri.Printf( PRINT_ALL, "Initializing OpenGL subsystem\n" ); @@ -1383,78 +1381,7 @@ void GLimp_Init( void )  	Q_strncpyz( glConfig.version_string, qglGetString (GL_VERSION), sizeof( glConfig.version_string ) );  	Q_strncpyz( glConfig.extensions_string, qglGetString (GL_EXTENSIONS), sizeof( glConfig.extensions_string ) ); -	// -	// chipset specific configuration -	// -	Q_strncpyz( buf, glConfig.renderer_string, sizeof(buf) ); -	Q_strlwr( buf ); - -	// -	// NOTE: if changing cvars, do it within this block.  This allows them -	// to be overridden when testing driver fixes, etc. but only sets -	// them to their default state when the hardware is first installed/run. -	// -	if ( Q_stricmp( lastValidRenderer->string, glConfig.renderer_string ) ) -	{ -		glConfig.hardwareType = GLHW_GENERIC; - -		ri.Cvar_Set( "r_textureMode", "GL_LINEAR_MIPMAP_NEAREST" ); - -		// VOODOO GRAPHICS w/ 2MB -		if ( strstr( buf, "voodoo graphics/1 tmu/2 mb" ) ) -		{ -			ri.Cvar_Set( "r_picmip", "2" ); -			ri.Cvar_Get( "r_picmip", "1", CVAR_ARCHIVE | CVAR_LATCH ); -		} -		else -		{ -			ri.Cvar_Set( "r_picmip", "1" ); - -			if ( strstr( buf, "rage 128" ) || strstr( buf, "rage128" ) ) -			{ -				ri.Cvar_Set( "r_finish", "0" ); -			} -			// Savage3D and Savage4 should always have trilinear enabled -			else if ( strstr( buf, "savage3d" ) || strstr( buf, "s3 savage4" ) ) -			{ -				ri.Cvar_Set( "r_texturemode", "GL_LINEAR_MIPMAP_LINEAR" ); -			} -		} -	} -	 -	// -	// this is where hardware specific workarounds that should be -	// detected/initialized every startup should go. -	// -	if ( strstr( buf, "banshee" ) || strstr( buf, "voodoo3" ) ) -	{ -		glConfig.hardwareType = GLHW_3DFX_2D3D; -	} -	// VOODOO GRAPHICS w/ 2MB -	else if ( strstr( buf, "voodoo graphics/1 tmu/2 mb" ) ) -	{ -	} -	else if ( strstr( buf, "glzicd" ) ) -	{ -	} -	else if ( strstr( buf, "rage pro" ) || strstr( buf, "Rage Pro" ) || strstr( buf, "ragepro" ) ) -	{ -		glConfig.hardwareType = GLHW_RAGEPRO; -	} -	else if ( strstr( buf, "rage 128" ) ) -	{ -	} -	else if ( strstr( buf, "permedia2" ) ) -	{ -		glConfig.hardwareType = GLHW_PERMEDIA2; -	} -	else if ( strstr( buf, "riva 128" ) ) -	{ -		glConfig.hardwareType = GLHW_RIVA128; -	} -	else if ( strstr( buf, "riva tnt " ) ) -	{ -	} +  GL_ResolveHardwareType( );  	ri.Cvar_Set( "r_lastValidRenderer", glConfig.renderer_string );  | 
