2 * Copyright © 2010-2013 Team XBMC
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
23 struct IDirect3DTexture9;
28 static void RegisterScriptInterface( class asIScriptEngine* );
34 virtual ~EffectBase() {};
43 if ( --m_iRefCount == 0 )
47 virtual IDirect3DTexture9* GetTexture() { return 0; }
48 virtual IDirect3DTexture9* GetRenderTarget() { return 0; }
54 template<class A, class B>
57 // If the handle already is a null handle, then just return the null handle
60 // Now try to dynamically cast the pointer to the wanted type
61 B* b = dynamic_cast<B*>(a);
64 // Since the cast was made, we need to increase the ref counter for the returned handle