home *** CD-ROM | disk | FTP | other *** search
/ PC PowerPlay 58 / pcpp58a.iso / extras / quake 3 source / Q3A_ToolSource.exe / Main / IShaders.h < prev    next >
Encoding:
C/C++ Source or Header  |  2001-01-02  |  2.2 KB  |  58 lines

  1. //-----------------------------------------------------------------------------
  2. //
  3. // $LogFile$
  4. // $Revision: 1.1.2.3 $
  5. // $Author: ttimo $
  6. // $Date: 2000/02/24 22:24:45 $
  7. // $Log: IShaders.h,v $
  8. // Revision 1.1.2.3  2000/02/24 22:24:45  ttimo
  9. // RC2
  10. //
  11. // Revision 1.1.2.2  2000/02/11 03:52:30  ttimo
  12. // working on the IShader interface
  13. //
  14. // Revision 1.1.2.1  2000/02/10 03:00:20  ttimo
  15. // adding IShaders.h
  16. //
  17. //
  18. // DESCRIPTION:
  19. // a set of functions to manipulate textures in Radiant
  20. // 
  21.  
  22. #ifndef __ISHADERS_H_
  23. #define __ISHADERS_H_
  24.  
  25. // define a GUID for this interface so plugins can access and reference it
  26. // {D42F798A-DF57-11d3-A3EE-0004AC96D4C3}
  27. static const GUID QERShadersTable_GUID = 
  28. { 0xd42f798a, 0xdf57, 0x11d3, { 0xa3, 0xee, 0x0, 0x4, 0xac, 0x96, 0xd4, 0xc3 } };
  29.  
  30. //++timo NOTE: global strategy, when there's try before it means .. if the thing can't be found / loaded it will not
  31. // create a default one
  32.  
  33. //++timo TODO: duplicate _QERFuncTable_1::m_pfnHasShader here?
  34. //++timo FIXME: change the names to fit the changes we wanna do in the Radiant shader / textures code
  35. //++timo NOTE: for Curry, this shader loading thingy is only provided so that we can update the Radiant texture window?
  36. //             don't use yet .. will not implement yet
  37. // get a shader, load it if needed
  38. // returns NULL if shader doesn't exist
  39. //++timo will reload the shader if already loaded? .. no, don't do that yet ..
  40. //++timo I'm not happy with the name?
  41. typedef qtexture_t* (WINAPI* PFN_TRYSHADERFORNAME) (const char* name);
  42. // load a texture
  43. // will not try loading a shader, will look for the actual image file ..
  44. // returns NULL on file not found
  45. // NOTE: don't put the .tga or .jpg filetype extension
  46. // if returns NULL, it means the texture needs loading, use _QERSelectedFaceTable::m_pfnTextureForName
  47. //++timo NOTE: all of this is hacks and workarounds, the shader code rewrite is supposed to solve all issues
  48. typedef qtexture_t* (WINAPI* PFN_TRYTEXTUREFORNAME) (const char* filename);
  49.  
  50. struct _QERShadersTable
  51. {
  52.     int        m_nSize;
  53.     // currently disabled
  54. //    PFN_TRYLOADSHADER    m_pfnTryLoadShader;
  55.     PFN_TRYTEXTUREFORNAME    m_pfnTryTextureForName;
  56. };
  57.  
  58. #endif