28 #ifndef __RenderSystemCapabilities__
29 #define __RenderSystemCapabilities__
48 #define CAPS_CATEGORY_SIZE 4
49 #define OGRE_CAPS_BITSHIFT (32 - CAPS_CATEGORY_SIZE)
50 #define CAPS_CATEGORY_MASK (((1 << CAPS_CATEGORY_SIZE) - 1) << OGRE_CAPS_BITSHIFT)
51 #define OGRE_CAPS_VALUE(cat, val) ((cat << OGRE_CAPS_BITSHIFT) | (1 << val))
226 major = minor = release = build = 0;
232 str << major <<
"." << minor <<
"." << release <<
"." << build;
242 if (tokens.size() > 1)
244 if (tokens.size() > 2)
246 if (tokens.size() > 3)
296 static void initVendorStrings();
383 mDriverVersion = version;
390 setDriverVersion(version);
396 return mDriverVersion;
412 setVendor(vendorFromString(vendorString));
422 if (mDriverVersion.major < v.
major)
424 else if (mDriverVersion.major == v.
major &&
425 mDriverVersion.minor < v.
minor)
427 else if (mDriverVersion.major == v.
major &&
428 mDriverVersion.minor == v.
minor &&
429 mDriverVersion.release < v.
release)
431 else if (mDriverVersion.major == v.
major &&
432 mDriverVersion.minor == v.
minor &&
433 mDriverVersion.release == v.
release &&
434 mDriverVersion.build < v.
build)
441 mNumWorldMatrices = num;
446 mNumTextureUnits = num;
451 mStencilBufferBitDepth = num;
456 mNumVertexBlendMatrices = num;
462 mNumMultiRenderTargets = num;
467 return mNumWorldMatrices;
484 return mNumTextureUnits;
495 return mStencilBufferBitDepth;
502 return mNumVertexBlendMatrices;
508 return mNumMultiRenderTargets;
559 mSupportedShaderProfiles.insert(profile);
567 mSupportedShaderProfiles.erase(profile);
574 return (mSupportedShaderProfiles.end() != mSupportedShaderProfiles.find(profile));
582 return mSupportedShaderProfiles;
589 return mVertexProgramConstantFloatCount;
594 return mVertexProgramConstantIntCount;
599 return mVertexProgramConstantBoolCount;
604 return mGeometryProgramConstantFloatCount;
609 return mGeometryProgramConstantIntCount;
614 return mGeometryProgramConstantBoolCount;
619 return mFragmentProgramConstantFloatCount;
624 return mFragmentProgramConstantIntCount;
629 return mFragmentProgramConstantBoolCount;
647 mVertexProgramConstantFloatCount = c;
652 mVertexProgramConstantIntCount = c;
657 mVertexProgramConstantBoolCount = c;
662 mGeometryProgramConstantFloatCount = c;
667 mGeometryProgramConstantIntCount = c;
672 mGeometryProgramConstantBoolCount = c;
677 mFragmentProgramConstantFloatCount = c;
682 mFragmentProgramConstantIntCount = c;
687 mFragmentProgramConstantBoolCount = c;
697 return mMaxPointSize;
702 mNonPOW2TexturesLimited = l;
714 return mNonPOW2TexturesLimited;
719 mMaxSupportedAnisotropy = s;
724 return mMaxSupportedAnisotropy;
730 mNumVertexTextureUnits = n;
735 return mNumVertexTextureUnits;
740 mVertexTextureUnitsShared = shared;
745 return mVertexTextureUnitsShared;
751 mGeometryProgramNumOutputVertices = numOutputVertices;
756 return mGeometryProgramNumOutputVertices;
762 return mRenderSystemName;
767 mRenderSystemName = rs;
773 mCategoryRelevant[cat] = relevant;
779 return mCategoryRelevant[cat];
791 mTesselationHullProgramConstantFloatCount = c;
796 mTesselationHullProgramConstantIntCount = c;
801 mTesselationHullProgramConstantBoolCount = c;
806 return mTesselationHullProgramConstantFloatCount;
811 return mTesselationHullProgramConstantIntCount;
816 return mTesselationHullProgramConstantBoolCount;
822 mTesselationDomainProgramConstantFloatCount = c;
827 mTesselationDomainProgramConstantIntCount = c;
832 mTesselationDomainProgramConstantBoolCount = c;
837 return mTesselationDomainProgramConstantFloatCount;
842 return mTesselationDomainProgramConstantIntCount;
847 return mTesselationDomainProgramConstantBoolCount;
853 mComputeProgramConstantFloatCount = c;
858 mComputeProgramConstantIntCount = c;
863 mComputeProgramConstantBoolCount = c;
868 return mComputeProgramConstantFloatCount;
873 return mComputeProgramConstantIntCount;
878 return mComputeProgramConstantBoolCount;
890 #endif // __RenderSystemCapabilities__
ushort mGeometryProgramConstantBoolCount
The number of boolean constants vertex geometry support.
Supports compressed textures in the VTC format.
void addShaderProfile(const String &profile)
Adds the profile to the list of supported profiles.
DriverVersion mDriverVersion
This is used to build a database of RSC's if a RSC with same name, but newer version is introduced...
static int parseInt(const String &val, int defaultValue=0)
Converts a String to a whole number.
ushort mTesselationHullProgramConstantIntCount
The number of integer constants tesselation Hull programs support.
#define OGRE_CAPS_VALUE(cat, val)
Supports hardware tesselation hull programs.
Support for Separate Shader Objects.
ushort getTesselationDomainProgramConstantFloatCount(void) const
The number of floating-point constants fragment programs support.
float Real
Software floating point type.
void setNumVertexBlendMatrices(ushort num)
ushort getTesselationHullProgramConstantFloatCount(void) const
The number of floating-point constants fragment programs support.
void setGeometryProgramConstantBoolCount(ushort c)
The number of boolean constants geometry programs support.
Support for Frame Buffer Objects ARB implementation (regular FBO is higher precedence) ...
void setNumMultiRenderTargets(ushort num)
The number of simultaneous render targets supported.
ushort mVertexProgramConstantFloatCount
The number of floating-point constants vertex programs support.
void setVertexProgramConstantIntCount(ushort c)
The number of integer constants vertex programs support.
Supports compressed textures.
ushort getFragmentProgramConstantBoolCount(void) const
The number of boolean constants fragment programs support.
ushort getNumTextureUnits(void) const
Returns the number of texture units the current output hardware supports.
ushort getVertexProgramConstantFloatCount(void) const
The number of floating-point constants vertex programs support.
String getDeviceName() const
gets the device name for render system
ushort getTesselationHullProgramConstantIntCount(void) const
The number of integer constants fragment programs support.
void setVertexProgramConstantBoolCount(ushort c)
The number of boolean constants vertex programs support.
bool isDriverOlderThanVersion(DriverVersion v) const
Supports user clipping planes.
ushort mVertexProgramConstantBoolCount
The number of boolean constants vertex programs support.
Supports using the MAIN depth buffer for RTTs.
Supports performing a scissor test to exclude areas of the screen.
Real getMaxPointSize(void) const
Maximum point screen size in pixels.
ushort getStencilBufferBitDepth(void) const
Determines the bit depth of the hardware accelerated stencil buffer, if supported.
ushort getComputeProgramConstantFloatCount(void) const
The number of floating-point constants fragment programs support.
Support for Vertex Array Objects (VAOs)
void setVertexProgramConstantFloatCount(ushort c)
The number of floating-point constants vertex programs support.
Real mMaxSupportedAnisotropy
The maximum supported anisotropy.
void setNumWorldMatrices(ushort num)
void setStencilBufferBitDepth(ushort num)
void setFragmentProgramConstantIntCount(ushort c)
The number of integer constants fragment programs support.
StringStream StrStreamType
bool getNonPOW2TexturesLimited(void) const
Are non-power of two textures limited in features?
bool getVertexTextureUnitsShared(void) const
Get whether the vertex texture units are shared with the fragment processor.
void setTesselationHullProgramConstantIntCount(ushort c)
The number of integer constants tesselation Domain programs support.
void removeShaderProfile(const String &profile)
Remove a given shader profile, if present.
ushort getGeometryProgramConstantIntCount(void) const
The number of integer constants geometry programs support.
set< String >::type ShaderProfiles
void setTesselationHullProgramConstantBoolCount(ushort c)
The number of boolean constants tesselation Domain programs support.
Supports attaching a depth buffer to an RTT that has width & height less or equal than RTT's...
Supports the VET_UBYTE4 vertex element type.
void setGeometryProgramConstantIntCount(ushort c)
The number of integer constants geometry programs support.
Support for Frame Buffer Objects (FBOs)
void setMaxPointSize(Real s)
Maximum point screen size in pixels.
Supports rendering to vertex buffers.
ushort mTesselationDomainProgramConstantBoolCount
The number of boolean constants tesselation Domain programs support.
Supports hardware render-to-texture (bigger than framebuffer)
ushort mFragmentProgramConstantIntCount
The number of integer constants fragment programs support.
Supports hardware stencil buffer.
String mDeviceName
The name of the device as reported by the render system.
Supports OpenGL version 1.5.
Supports MRTs with different bit depths.
ushort getNumVertexBlendMatrices(void) const
Returns the number of matrices available to hardware vertex blending for this rendering system...
ushort getVertexProgramConstantIntCount(void) const
The number of integer constants vertex programs support.
String mRenderSystemName
The identifier associated with the render system for which these capabilities are valid...
bool isCapabilityRenderSystemSpecific(const Capabilities c) const
Returns true if capability is render system specific.
bool mNonPOW2TexturesLimited
Are non-POW2 textures feature-limited?
void setMaxSupportedAnisotropy(Real s)
Set the maximum supported anisotropic filtering.
void setVendor(GPUVendor v)
void setRenderSystemName(const String &rs)
Set the identifier of the rendersystem from which these capabilities were generated.
CapabilitiesCategory
Enumerates the categories of capabilities.
Supports hardware vertex and index buffers.
Supports fixed-function pipeline.
Capabilities
Enum describing the different hardware capabilities we want to check for OGRE_CAPS_VALUE(a, b) defines each capability.
ushort mNumVertexTextureUnits
The number of vertex texture units supported.
Supports using vertex buffers for instance data.
Real getMaxSupportedAnisotropy()
Get the maximum supported anisotropic filtering.
Supports vertex programs (vertex shaders)
bool isCategoryRelevant(CapabilitiesCategory cat)
Return whether a category is 'relevant' or not, ie will it be reported.
ushort mFragmentProgramConstantBoolCount
The number of boolean constants fragment programs support.
ushort getNumWorldMatrices(void) const
Support for point parameters EXT implementation.
int getGeometryProgramNumOutputVertices(void) const
Get the number of vertices a single geometry program run can emit.
Support for GL 1.5 but without HW occlusion workaround.
Supports hardware compute programs.
void setComputeProgramConstantFloatCount(ushort c)
The number of floating-point constants compute programs support.
Supports float textures and render targets.
ushort getTesselationDomainProgramConstantIntCount(void) const
The number of integer constants fragment programs support.
DriverVersion is used by RenderSystemCapabilities and both GL and D3D9 to store the version of the cu...
Supports generating mipmaps in hardware.
ushort mNumTextureUnits
The number of texture units available.
ushort mTesselationHullProgramConstantBoolCount
The number of boolean constants tesselation Hull programs support.
void setFragmentProgramConstantBoolCount(ushort c)
The number of boolean constants fragment programs support.
void setGeometryProgramConstantFloatCount(ushort c)
The number of floating-point constants geometry programs support.
ushort mTesselationDomainProgramConstantIntCount
The number of integer constants tesselation Domain programs support.
void unsetCapability(const Capabilities c)
Remove a capability flag.
Supports compressed textures in the ATC format.
ushort getTesselationDomainProgramConstantBoolCount(void) const
The number of boolean constants fragment programs support.
ushort mComputeProgramConstantBoolCount
The number of boolean constants compute programs support.
Supports compressed textures in BC6H and BC7 format (DirectX feature level 11_0)
ushort getVertexProgramConstantBoolCount(void) const
The number of boolean constants vertex programs support.
void setCategoryRelevant(CapabilitiesCategory cat, bool relevant)
Mark a category as 'relevant' or not, ie will it be reported.
DriverVersion getDriverVersion() const
void parseVendorFromString(const String &vendorString)
Parse and set vendor.
Supports fragment programs (pixel shaders)
void parseDriverVersionFromString(const String &versionString)
void setNumVertexTextureUnits(ushort n)
Set the number of vertex texture units supported.
ushort mNumVertexBlendMatrices
The number of matrices available for hardware blending.
bool isShaderProfileSupported(const String &profile) const
Returns true if profile is in the list of supported profiles.
Superclass for all objects that wish to use custom memory allocators when their new / delete operator...
Supports extra point parameters (minsize, maxsize, attenuation)
int mGeometryProgramNumOutputVertices
The number of vertices a geometry program can emit in a single run.
Supports compressed textures in BC4 and BC5 format (DirectX feature level 10_0)
void setTesselationHullProgramConstantFloatCount(ushort c)
The number of floating-point constants tesselation Hull programs support.
ushort mStencilBufferBitDepth
The stencil buffer bit depth.
ushort mComputeProgramConstantFloatCount
The number of floating-point constants compute programs support.
ushort mNumMultiRenderTargets
The number of simultaneous render targets supported.
ushort mGeometryProgramConstantIntCount
The number of integer constants vertex geometry support.
vector< String >::type StringVector
ushort mTesselationDomainProgramConstantFloatCount
The number of floating-point constants tesselation Domain programs support.
GPUVendor
Enumeration of GPU vendors.
Supports wrapping the stencil value at the range extremeties.
static vector< String >::type split(const String &str, const String &delims="\t\n ", unsigned int maxSplits=0, bool preserveDelims=false)
Returns a StringVector that contains all the substrings delimited by the characters in the passed del...
void setCapability(const Capabilities c)
Adds a capability flag.
Supports compressed textures in the DXT/ST3C formats.
Supports separate stencil updates for both front and back faces.
void setNumTextureUnits(ushort num)
Supports Blending operations other than +.
ushort mTesselationHullProgramConstantFloatCount
The number of floating-point constants tesselation Hull programs support.
Support for point parameters ARB implementation.
void setComputeProgramConstantIntCount(ushort c)
The number of integer constants compute programs support.
Supports infinite far plane projection.
void setComputeProgramConstantBoolCount(ushort c)
The number of boolean constants compute programs support.
Supports using vertex buffers for instance data.
Supports non-power of two textures.
ushort getFragmentProgramConstantIntCount(void) const
The number of integer constants fragment programs support.
ushort mNumWorldMatrices
The number of world matrices available.
bool mVertexTextureUnitsShared
Are vertex texture units shared with fragment processor?
Supports anisotropic texture filtering.
ushort getTesselationHullProgramConstantBoolCount(void) const
The number of boolean constants fragment programs support.
Supports hardware occlusion queries.
GPUVendor mVendor
GPU Vendor.
ushort getComputeProgramConstantBoolCount(void) const
The number of boolean constants fragment programs support.
static StringVector msGPUVendorStrings
Supports dynamic linkage/shader subroutine.
void setNonPOW2TexturesLimited(bool l)
Non-POW2 textures limited.
void setFragmentProgramConstantFloatCount(ushort c)
The number of floating-point constants fragment programs support.
Supports 32bit hardware index buffers.
const ShaderProfiles & getSupportedShaderProfiles() const
Returns a set of all supported shader profiles.
Supports mipmap LOD biasing.
Supports hardware geometry programs.
Is DirectX feature "per stage constants" supported.
Supports 3d (volume) textures.
Supports Alpha to Coverage (A2C)
void setDeviceName(const String &name)
sets the device name for Render system
void setGeometryProgramNumOutputVertices(int numOutputVertices)
Set the number of vertices a single geometry program run can emit.
singleton class for storing the capabilities of the graphics card.
void setDriverVersion(const DriverVersion &version)
Set the driver version.
GPUVendor getVendor() const
Real mMaxPointSize
The maximum point size.
ushort getGeometryProgramConstantBoolCount(void) const
The number of boolean constants geometry programs support.
String getRenderSystemName(void) const
Get the identifier of the rendersystem from which these capabilities were generated.
Support for Frame Buffer Objects ATI implementation (ARB FBO is higher precedence) ...
Supports asynchronous hardware occlusion queries.
Supports a separate depth buffer for RTTs. D3D 9 & 10, OGL w/FBO (RSC_FBO implies this flag) ...
void setVertexTextureUnitsShared(bool shared)
Set whether the vertex texture units are shared with the fragment processor.
ushort getGeometryProgramConstantFloatCount(void) const
The number of floating-point constants geometry programs support.
void setTesselationDomainProgramConstantBoolCount(ushort c)
The number of boolean constants tesselation Domain programs support.
Supports fixed-function DOT3 texture blend.
bool hasCapability(const Capabilities c) const
Checks for a capability.
ushort getFragmentProgramConstantFloatCount(void) const
The number of floating-point constants fragment programs support.
void fromString(const String &versionString)
Supports basic point sprite rendering.
ushort getNumMultiRenderTargets(void) const
The number of simultaneous render targets supported.
Supports vertex texture fetch.
#define CAPS_CATEGORY_MASK
ushort getNumVertexTextureUnits(void) const
Get the number of vertex texture units supported.
ushort mFragmentProgramConstantFloatCount
The number of floating-point constants fragment programs support.
ushort getComputeProgramConstantIntCount(void) const
The number of integer constants fragment programs support.
ushort mComputeProgramConstantIntCount
The number of integer constants compute programs support.
#define OGRE_CAPS_BITSHIFT
ushort mGeometryProgramConstantFloatCount
The number of floating-point constants geometry programs support.
ushort mVertexProgramConstantIntCount
The number of integer constants vertex programs support.
Supports compressed textures in the PVRTC format.
Placeholder for max value.
void setTesselationDomainProgramConstantIntCount(ushort c)
The number of integer constants tesselation Domain programs support.
Supports hardware tesselation domain programs.
ShaderProfiles mSupportedShaderProfiles
The list of supported shader profiles.
void setTesselationDomainProgramConstantFloatCount(ushort c)
The number of floating-point constants tesselation Domain programs support.
virtual size_t calculateSize() const
Supports compressed textures in the ETC1 format.
Supports asynchronous hardware occlusion queries.
Supports compressed textures in the ETC2 format.