IShaders.h 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. /*
  2. ===========================================================================
  3. Copyright (C) 1999-2005 Id Software, Inc.
  4. This file is part of Quake III Arena source code.
  5. Quake III Arena source code is free software; you can redistribute it
  6. and/or modify it under the terms of the GNU General Public License as
  7. published by the Free Software Foundation; either version 2 of the License,
  8. or (at your option) any later version.
  9. Quake III Arena source code is distributed in the hope that it will be
  10. useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU General Public License for more details.
  13. You should have received a copy of the GNU General Public License
  14. along with Foobar; if not, write to the Free Software
  15. Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  16. ===========================================================================
  17. */
  18. //-----------------------------------------------------------------------------
  19. //
  20. // $LogFile$
  21. // $Revision: 1.1.2.3 $
  22. // $Author: ttimo $
  23. // $Date: 2000/02/24 22:24:45 $
  24. // $Log: IShaders.h,v $
  25. // Revision 1.1.2.3 2000/02/24 22:24:45 ttimo
  26. // RC2
  27. //
  28. // Revision 1.1.2.2 2000/02/11 03:52:30 ttimo
  29. // working on the IShader interface
  30. //
  31. // Revision 1.1.2.1 2000/02/10 03:00:20 ttimo
  32. // adding IShaders.h
  33. //
  34. //
  35. // DESCRIPTION:
  36. // a set of functions to manipulate textures in Radiant
  37. //
  38. #ifndef __ISHADERS_H_
  39. #define __ISHADERS_H_
  40. // define a GUID for this interface so plugins can access and reference it
  41. // {D42F798A-DF57-11d3-A3EE-0004AC96D4C3}
  42. static const GUID QERShadersTable_GUID =
  43. { 0xd42f798a, 0xdf57, 0x11d3, { 0xa3, 0xee, 0x0, 0x4, 0xac, 0x96, 0xd4, 0xc3 } };
  44. //++timo NOTE: global strategy, when there's try before it means .. if the thing can't be found / loaded it will not
  45. // create a default one
  46. //++timo TODO: duplicate _QERFuncTable_1::m_pfnHasShader here?
  47. //++timo FIXME: change the names to fit the changes we wanna do in the Radiant shader / textures code
  48. //++timo NOTE: for Curry, this shader loading thingy is only provided so that we can update the Radiant texture window?
  49. // don't use yet .. will not implement yet
  50. // get a shader, load it if needed
  51. // returns NULL if shader doesn't exist
  52. //++timo will reload the shader if already loaded? .. no, don't do that yet ..
  53. //++timo I'm not happy with the name?
  54. typedef qtexture_t* (WINAPI* PFN_TRYSHADERFORNAME) (const char* name);
  55. // load a texture
  56. // will not try loading a shader, will look for the actual image file ..
  57. // returns NULL on file not found
  58. // NOTE: don't put the .tga or .jpg filetype extension
  59. // if returns NULL, it means the texture needs loading, use _QERSelectedFaceTable::m_pfnTextureForName
  60. //++timo NOTE: all of this is hacks and workarounds, the shader code rewrite is supposed to solve all issues
  61. typedef qtexture_t* (WINAPI* PFN_TRYTEXTUREFORNAME) (const char* filename);
  62. struct _QERShadersTable
  63. {
  64. int m_nSize;
  65. // currently disabled
  66. // PFN_TRYLOADSHADER m_pfnTryLoadShader;
  67. PFN_TRYTEXTUREFORNAME m_pfnTryTextureForName;
  68. };
  69. #endif