Quake-III-Arena

Quake III Arena GPL Source Release
Log | Files | Refs

IShaders.h (3109B)


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