winOGLVideo_ScriptBinding.h 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. //-----------------------------------------------------------------------------
  2. // Copyright (c) 2013 GarageGames, LLC
  3. //
  4. // Permission is hereby granted, free of charge, to any person obtaining a copy
  5. // of this software and associated documentation files (the "Software"), to
  6. // deal in the Software without restriction, including without limitation the
  7. // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
  8. // sell copies of the Software, and to permit persons to whom the Software is
  9. // furnished to do so, subject to the following conditions:
  10. //
  11. // The above copyright notice and this permission notice shall be included in
  12. // all copies or substantial portions of the Software.
  13. //
  14. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  15. // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  16. // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  17. // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  18. // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  19. // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
  20. // IN THE SOFTWARE.
  21. //-----------------------------------------------------------------------------
  22. /*! @addtogroup WindowsPlatform Windows Platform
  23. @ingroup TorqueScriptFunctions
  24. @{
  25. */
  26. /*! Register a card profile with the card profile manager.
  27. Most of the parameters are fairly self-explanatory and very internal
  28. to the rendering code; however there are a few of note:
  29. @param vendor The vendor string the card claims.
  30. @param renderer The renderer string the card claims.
  31. @param proFile Name of the file where further configuration information is kept.
  32. */
  33. ConsoleFunctionWithDocs( addCardProfile, ConsoleVoid, 16, 16,
  34. (string vendor, string renderer,
  35. bool safeMode, bool lockArray, bool subImage, bool fogTexture,
  36. bool noEnvColor, bool clipHigh, bool deleteContext, bool texCompress,
  37. bool interiorLock, bool skipFirstFog, bool only16,
  38. bool noArraysAlpha, string proFile))
  39. {
  40. CardProfile profile;
  41. profile.vendor = dStrdup(argv[1]);
  42. profile.renderer = dStrdup(argv[2]);
  43. profile.safeMode = dAtob(argv[3]);
  44. profile.lockArray = dAtob(argv[4]);
  45. profile.subImage = dAtob(argv[5]);
  46. profile.fogTexture = dAtob(argv[6]);
  47. profile.noEnvColor = dAtob(argv[7]);
  48. profile.clipHigh = dAtob(argv[8]);
  49. profile.deleteContext = dAtob(argv[9]);
  50. profile.texCompress = dAtob(argv[10]);
  51. profile.interiorLock = dAtob(argv[11]);
  52. profile.skipFirstFog = dAtob(argv[12]);
  53. profile.only16 = dAtob(argv[13]);
  54. profile.noArraysAlpha = dAtob(argv[14]);
  55. if (strcmp(argv[15],""))
  56. profile.proFile = dStrdup(argv[15]);
  57. else
  58. profile.proFile = NULL;
  59. sCardProfiles.push_back(profile);
  60. }
  61. /*! Register with the profile manager what rendering mode is preferred with the specified card.
  62. */
  63. ConsoleFunctionWithDocs( addOSCardProfile, ConsoleVoid, 6,6, (string vendor, string renderer, bool allowOpenGL, ...))
  64. {
  65. OSCardProfile profile;
  66. profile.vendor = dStrdup(argv[1]);
  67. profile.renderer = dStrdup(argv[2]);
  68. profile.allowOpenGL = dAtob(argv[3]);
  69. profile.preferOpenGL = dAtob(argv[5]);
  70. sOSCardProfiles.push_back(profile);
  71. }
  72. /*! @} */ // end group WindowsPlatform