Torque3D Documentation / _generateds / gfxGLCardProfiler.h

gfxGLCardProfiler.h

Engine/source/gfx/gl/gfxGLCardProfiler.h

More...

Classes:

class

A note on workarounds - The following settings are used exclusively to work around driver bugs: GL::Workaround::needsExplicitGenerateMipmap GL::Workaround::X1600DepthBufferCopy GL::Workaround::HD2600DepthBufferCopy If you find that you need to work around additional driver bugs, add a new setting of the form GL::Workaround:: and set it to false in GFXGLCardProfiler::setupCardCapabilities() Enclose your workaround code in if(GFX->getCardProfiler()->queryProfile("GL::Workaround::")) { } Remember to set the work around to true in the card profile script!

Detailed Description

 1
 2//-----------------------------------------------------------------------------
 3// Copyright (c) 2012 GarageGames, LLC
 4//
 5// Permission is hereby granted, free of charge, to any person obtaining a copy
 6// of this software and associated documentation files (the "Software"), to
 7// deal in the Software without restriction, including without limitation the
 8// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
 9// sell copies of the Software, and to permit persons to whom the Software is
10// furnished to do so, subject to the following conditions:
11//
12// The above copyright notice and this permission notice shall be included in
13// all copies or substantial portions of the Software.
14//
15// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
21// IN THE SOFTWARE.
22//-----------------------------------------------------------------------------
23
24#ifndef _GFXGLCARDPROFILE_H
25#define _GFXGLCARDPROFILE_H
26
27#include "gfx/gfxCardProfile.h"
28
29/// A note on workarounds - The following settings are used exclusively to work around driver bugs:
30/// GL::Workaround::needsExplicitGenerateMipmap
31/// GL::Workaround::X1600DepthBufferCopy
32/// GL::Workaround::HD2600DepthBufferCopy
33/// If you find that you need to work around additional driver bugs, add a new setting
34/// of the form GL::Workaround::<name> and set it to false in GFXGLCardProfiler::setupCardCapabilities()
35/// Enclose your workaround code in if(GFX->getCardProfiler()->queryProfile("GL::Workaround::<name>")) {
36/// <workaround> }
37/// Remember to set the work around to true in the card profile script!
38
39class GFXGLCardProfiler : public GFXCardProfiler
40{
41public:
42   void init();
43
44protected:
45   virtual const String& getRendererString() const { return mRendererString; }
46   virtual void setupCardCapabilities();
47   virtual bool _queryCardCap(const String& query, U32& foundResult);
48   virtual bool _queryFormat(const GFXFormat fmt, const GFXTextureProfile *profile, bool &inOutAutogenMips);
49
50private:
51   String mRendererString;
52   typedef GFXCardProfiler Parent;
53};
54
55#endif
56