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)) 224 major = minor = release = build = 0;
230 str << major <<
"." << minor <<
"." << release <<
"." << build;
240 if (tokens.size() > 1)
242 if (tokens.size() > 2)
244 if (tokens.size() > 3)
294 static void initVendorStrings();
381 mDriverVersion = version;
388 setDriverVersion(version);
394 return mDriverVersion;
410 setVendor(vendorFromString(vendorString));
439 mNumWorldMatrices = num;
444 mNumTextureUnits = num;
449 mStencilBufferBitDepth = num;
454 mNumVertexBlendMatrices = num;
460 mNumMultiRenderTargets = num;
465 return mNumWorldMatrices;
482 return mNumTextureUnits;
493 return mStencilBufferBitDepth;
500 return mNumVertexBlendMatrices;
506 return mNumMultiRenderTargets;
557 mSupportedShaderProfiles.insert(profile);
565 mSupportedShaderProfiles.erase(profile);
572 return (mSupportedShaderProfiles.end() != mSupportedShaderProfiles.find(profile));
580 return mSupportedShaderProfiles;
587 return mVertexProgramConstantFloatCount;
592 return mVertexProgramConstantIntCount;
597 return mVertexProgramConstantBoolCount;
602 return mGeometryProgramConstantFloatCount;
607 return mGeometryProgramConstantIntCount;
612 return mGeometryProgramConstantBoolCount;
617 return mFragmentProgramConstantFloatCount;
622 return mFragmentProgramConstantIntCount;
627 return mFragmentProgramConstantBoolCount;
645 mVertexProgramConstantFloatCount = c;
650 mVertexProgramConstantIntCount = c;
655 mVertexProgramConstantBoolCount = c;
660 mGeometryProgramConstantFloatCount = c;
665 mGeometryProgramConstantIntCount = c;
670 mGeometryProgramConstantBoolCount = c;
675 mFragmentProgramConstantFloatCount = c;
680 mFragmentProgramConstantIntCount = c;
685 mFragmentProgramConstantBoolCount = c;
695 return mMaxPointSize;
700 mNonPOW2TexturesLimited = l;
712 return mNonPOW2TexturesLimited;
717 mMaxSupportedAnisotropy = s;
722 return mMaxSupportedAnisotropy;
728 mNumVertexTextureUnits = n;
733 return mNumVertexTextureUnits;
738 mVertexTextureUnitsShared = shared;
743 return mVertexTextureUnitsShared;
749 mGeometryProgramNumOutputVertices = numOutputVertices;
754 return mGeometryProgramNumOutputVertices;
760 return mRenderSystemName;
765 mRenderSystemName = rs;
771 mCategoryRelevant[cat] = relevant;
777 return mCategoryRelevant[cat];
789 mTesselationHullProgramConstantFloatCount = c;
794 mTesselationHullProgramConstantIntCount = c;
799 mTesselationHullProgramConstantBoolCount = c;
804 return mTesselationHullProgramConstantFloatCount;
809 return mTesselationHullProgramConstantIntCount;
814 return mTesselationHullProgramConstantBoolCount;
820 mTesselationDomainProgramConstantFloatCount = c;
825 mTesselationDomainProgramConstantIntCount = c;
830 mTesselationDomainProgramConstantBoolCount = c;
835 return mTesselationDomainProgramConstantFloatCount;
840 return mTesselationDomainProgramConstantIntCount;
845 return mTesselationDomainProgramConstantBoolCount;
851 mComputeProgramConstantFloatCount = c;
856 mComputeProgramConstantIntCount = c;
861 mComputeProgramConstantBoolCount = c;
866 return mComputeProgramConstantFloatCount;
871 return mComputeProgramConstantIntCount;
876 return mComputeProgramConstantBoolCount;
888 #endif // __RenderSystemCapabilities__ ushort getStencilBufferBitDepth(void) const
Determines the bit depth of the hardware accelerated stencil buffer, if supported.
Support for point parameters EXT implementation.
Supports compressed textures in the ETC2 format.
void setNumVertexTextureUnits(ushort n)
Set the number of vertex texture units supported.
bool isCapabilityRenderSystemSpecific(const Capabilities c) const
Returns true if capability is render system specific.
void setVertexTextureUnitsShared(bool shared)
Set whether the vertex texture units are shared with the fragment processor.
ushort getGeometryProgramConstantBoolCount(void) const
The number of boolean constants geometry programs support.
bool hasCapability(const Capabilities c) const
Checks for a capability.
static StringVector msGPUVendorStrings
Supports extra point parameters (minsize, maxsize, attenuation)
ushort getNumWorldMatrices(void) const
void setVertexProgramConstantFloatCount(ushort c)
The number of floating-point constants vertex programs support.
ushort mFragmentProgramConstantFloatCount
The number of floating-point constants fragment programs support.
bool getVertexTextureUnitsShared(void) const
Get whether the vertex texture units are shared with the fragment processor.
Supports user clipping planes.
Supports 3d (volume) textures.
ushort mGeometryProgramConstantFloatCount
The number of floating-point constants geometry programs support.
ushort getGeometryProgramConstantIntCount(void) const
The number of integer constants geometry programs support.
String getDeviceName() const
gets the device name for render system
void setComputeProgramConstantBoolCount(ushort c)
The number of boolean constants compute programs support.
ushort mVertexProgramConstantIntCount
The number of integer constants vertex programs support.
Supports rendering to vertex buffers.
ushort getFragmentProgramConstantIntCount(void) const
The number of integer constants fragment programs support.
Supports non-power of two textures.
Supports fixed-function DOT3 texture blend.
Supports basic point sprite rendering.
#define CAPS_CATEGORY_MASK
void setNonPOW2TexturesLimited(bool l)
Non-POW2 textures limited.
DriverVersion getDriverVersion() const
void setVertexProgramConstantIntCount(ushort c)
The number of integer constants vertex programs support.
void setMaxSupportedAnisotropy(Real s)
Set the maximum supported anisotropic filtering.
Supports dynamic linkage/shader subroutine.
void addShaderProfile(const String &profile)
Adds the profile to the list of supported profiles.
Support for Frame Buffer Objects ATI implementation (ARB FBO is higher precedence) ...
ushort getVertexProgramConstantIntCount(void) const
The number of integer constants vertex programs support.
Supports wrapping the stencil value at the range extremeties.
bool isCategoryRelevant(CapabilitiesCategory cat)
Return whether a category is 'relevant' or not, ie will it be reported.
const ShaderProfiles & getSupportedShaderProfiles() const
Returns a set of all supported shader profiles.
String mDeviceName
The name of the device as reported by the render system.
float Real
Software floating point type.
Support for Frame Buffer Objects (FBOs)
Supports hardware tesselation hull programs.
void setGeometryProgramConstantBoolCount(ushort c)
The number of boolean constants geometry programs support.
vector< String >::type StringVector
GPUVendor mVendor
GPU Vendor.
Supports compressed textures in the PVRTC format.
Supports performing a scissor test to exclude areas of the screen.
StringStream StrStreamType
void setVertexProgramConstantBoolCount(ushort c)
The number of boolean constants vertex programs support.
void setDeviceName(const String &name)
sets the device name for Render system
virtual size_t calculateSize() const
bool mVertexTextureUnitsShared
Are vertex texture units shared with fragment processor?
void setMaxPointSize(Real s)
Maximum point screen size in pixels.
CapabilitiesCategory
Enumerates the categories of capabilities.
void setRenderSystemName(const String &rs)
Set the identifier of the rendersystem from which these capabilities were generated.
int getGeometryProgramNumOutputVertices(void) const
Get the number of vertices a single geometry program run can emit.
String getRenderSystemName(void) const
Get the identifier of the rendersystem from which these capabilities were generated.
ushort getNumTextureUnits(void) const
Returns the number of texture units the current output hardware supports.
ushort getNumVertexBlendMatrices(void) const
Returns the number of matrices available to hardware vertex blending for this rendering system...
ushort getTesselationHullProgramConstantBoolCount(void) const
The number of boolean constants fragment programs support.
ushort mFragmentProgramConstantBoolCount
The number of boolean constants fragment programs support.
ushort mGeometryProgramConstantIntCount
The number of integer constants vertex geometry support.
ushort getVertexProgramConstantBoolCount(void) const
The number of boolean constants vertex programs support.
Supports mipmap LOD biasing.
Supports generating mipmaps in hardware.
Supports hardware vertex and index buffers.
DriverVersion mDriverVersion
This is used to build a database of RSC's if a RSC with same name, but newer version is introduced...
ushort getNumVertexTextureUnits(void) const
Get the number of vertex texture units supported.
ushort mVertexProgramConstantFloatCount
The number of floating-point constants vertex programs support.
Supports hardware stencil buffer.
#define OGRE_CAPS_BITSHIFT
Supports attaching a depth buffer to an RTT that has width & height less or equal than RTT's...
ushort mNumVertexBlendMatrices
The number of matrices available for hardware blending.
void setTesselationDomainProgramConstantIntCount(ushort c)
The number of integer constants tesselation Domain programs support.
bool getNonPOW2TexturesLimited(void) const
Are non-power of two textures limited in features?
#define OGRE_CAPS_VALUE(cat, val)
GPUVendor getVendor() const
ushort getFragmentProgramConstantFloatCount(void) const
The number of floating-point constants fragment programs support.
Supports compressed textures in the ATC format.
ushort mNumWorldMatrices
The number of world matrices available.
Supports hardware geometry programs.
void setFragmentProgramConstantIntCount(ushort c)
The number of integer constants fragment programs support.
ushort getVertexProgramConstantFloatCount(void) const
The number of floating-point constants vertex programs support.
ushort getTesselationHullProgramConstantIntCount(void) const
The number of integer constants fragment programs support.
ushort mTesselationDomainProgramConstantFloatCount
The number of floating-point constants tesselation Domain programs support.
Supports fixed-function pipeline.
Supports compressed textures in the DXT/ST3C formats.
Supports anisotropic texture filtering.
void parseVendorFromString(const String &vendorString)
Parse and set vendor.
Real getMaxPointSize(void) const
Maximum point screen size in pixels.
Real mMaxPointSize
The maximum point size.
void setTesselationDomainProgramConstantFloatCount(ushort c)
The number of floating-point constants tesselation Domain programs support.
Supports using the MAIN depth buffer for RTTs.
Supports compressed textures in the ETC1 format.
Support for GL 1.5 but without HW occlusion workaround.
Supports hardware tesselation domain programs.
ushort getComputeProgramConstantIntCount(void) const
The number of integer constants fragment programs support.
Supports compressed textures in BC4 and BC5 format (DirectX feature level 10_0)
ushort mComputeProgramConstantBoolCount
The number of boolean constants compute programs support.
void setComputeProgramConstantIntCount(ushort c)
The number of integer constants compute programs support.
Support for Vertex Array Objects (VAOs)
Supports using vertex buffers for instance data.
Supports vertex texture fetch.
ushort getTesselationDomainProgramConstantIntCount(void) const
The number of integer constants fragment programs support.
bool isShaderProfileSupported(const String &profile) const
Returns true if profile is in the list of supported profiles.
void unsetCapability(const Capabilities c)
Remove a capability flag.
ushort mTesselationHullProgramConstantFloatCount
The number of floating-point constants tesselation Hull programs support.
Real getMaxSupportedAnisotropy()
Get the maximum supported anisotropic filtering.
ushort getComputeProgramConstantFloatCount(void) const
The number of floating-point constants fragment programs support.
ushort mNumMultiRenderTargets
The number of simultaneous render targets supported.
Supports float textures and render targets.
set< String >::type ShaderProfiles
ushort getNumMultiRenderTargets(void) const
The number of simultaneous render targets supported.
void setNumWorldMatrices(ushort num)
Support for Frame Buffer Objects ARB implementation (regular FBO is higher precedence) ...
Real mMaxSupportedAnisotropy
The maximum supported anisotropy.
ShaderProfiles mSupportedShaderProfiles
The list of supported shader profiles.
Supports separate stencil updates for both front and back faces.
void removeShaderProfile(const String &profile)
Remove a given shader profile, if present.
void setGeometryProgramConstantIntCount(ushort c)
The number of integer constants geometry programs support.
ushort mComputeProgramConstantFloatCount
The number of floating-point constants compute programs support.
ushort getGeometryProgramConstantFloatCount(void) const
The number of floating-point constants geometry programs support.
Supports asynchronous hardware occlusion queries.
ushort mStencilBufferBitDepth
The stencil buffer bit depth.
ushort mNumTextureUnits
The number of texture units available.
ushort mTesselationHullProgramConstantBoolCount
The number of boolean constants tesselation Hull programs support.
ushort mNumVertexTextureUnits
The number of vertex texture units supported.
singleton class for storing the capabilities of the graphics card.
void setTesselationDomainProgramConstantBoolCount(ushort c)
The number of boolean constants tesselation Domain programs support.
static vector< String >::type split(const String &str, const String &delims="\ ", unsigned int maxSplits=0, bool preserveDelims=false)
Returns a StringVector that contains all the substrings delimited by the characters in the passed del...
void setNumMultiRenderTargets(ushort num)
The number of simultaneous render targets supported.
void setNumTextureUnits(ushort num)
Supports OpenGL version 1.5.
Supports vertex programs (vertex shaders)
void setGeometryProgramNumOutputVertices(int numOutputVertices)
Set the number of vertices a single geometry program run can emit.
ushort getComputeProgramConstantBoolCount(void) const
The number of boolean constants fragment programs support.
Is DirectX feature "per stage constants" supported.
Supports compressed textures in BC6H and BC7 format (DirectX feature level 11_0)
ushort getTesselationHullProgramConstantFloatCount(void) const
The number of floating-point constants fragment programs support.
Capabilities
Enum describing the different hardware capabilities we want to check for OGRE_CAPS_VALUE(a, b) defines each capability.
void setFragmentProgramConstantFloatCount(ushort c)
The number of floating-point constants fragment programs support.
void fromString(const String &versionString)
ushort getTesselationDomainProgramConstantFloatCount(void) const
The number of floating-point constants fragment programs support.
void setTesselationHullProgramConstantBoolCount(ushort c)
The number of boolean constants tesselation Domain programs support.
void setDriverVersion(const DriverVersion &version)
Set the driver version.
ushort mTesselationDomainProgramConstantIntCount
The number of integer constants tesselation Domain programs support.
Supports compressed textures.
Support for Separate Shader Objects.
Supports hardware compute programs.
This source file is part of OGRE (Object-oriented Graphics Rendering Engine) For the latest info...
void parseDriverVersionFromString(const String &versionString)
bool mNonPOW2TexturesLimited
Are non-POW2 textures feature-limited?
ushort mTesselationHullProgramConstantIntCount
The number of integer constants tesselation Hull programs support.
void setComputeProgramConstantFloatCount(ushort c)
The number of floating-point constants compute programs support.
Placeholder for max value.
static int parseInt(const String &val, int defaultValue=0)
Converts a String to a whole number.
ushort mTesselationDomainProgramConstantBoolCount
The number of boolean constants tesselation Domain programs support.
GPUVendor
Enumeration of GPU vendors.
void setStencilBufferBitDepth(ushort num)
void setGeometryProgramConstantFloatCount(ushort c)
The number of floating-point constants geometry programs support.
ushort mFragmentProgramConstantIntCount
The number of integer constants fragment programs support.
Supports Alpha to Coverage (A2C)
int mGeometryProgramNumOutputVertices
The number of vertices a geometry program can emit in a single run.
ushort mGeometryProgramConstantBoolCount
The number of boolean constants vertex geometry support.
DriverVersion is used by RenderSystemCapabilities and both GL and D3D9 to store the version of the cu...
ushort getFragmentProgramConstantBoolCount(void) const
The number of boolean constants fragment programs support.
Supports fragment programs (pixel shaders)
ushort getTesselationDomainProgramConstantBoolCount(void) const
The number of boolean constants fragment programs support.
void setVendor(GPUVendor v)
Supports a separate depth buffer for RTTs. D3D 9 & 10, OGL w/FBO (RSC_FBO implies this flag) ...
Supports using vertex buffers for instance data.
void setCategoryRelevant(CapabilitiesCategory cat, bool relevant)
Mark a category as 'relevant' or not, ie will it be reported.
Supports the VET_UBYTE4 vertex element type.
Supports asynchronous hardware occlusion queries.
bool isDriverOlderThanVersion(DriverVersion v) const
Supports hardware render-to-texture (bigger than framebuffer)
Supports compressed textures in the VTC format.
ushort mComputeProgramConstantIntCount
The number of integer constants compute programs support.
Supports Blending operations other than +.
void setTesselationHullProgramConstantFloatCount(ushort c)
The number of floating-point constants tesselation Hull programs support.
void setTesselationHullProgramConstantIntCount(ushort c)
The number of integer constants tesselation Domain programs support.
Supports MRTs with different bit depths.
void setNumVertexBlendMatrices(ushort num)
Supports hardware occlusion queries.
Supports infinite far plane projection.
ushort mVertexProgramConstantBoolCount
The number of boolean constants vertex programs support.
String mRenderSystemName
The identifier associated with the render system for which these capabilities are valid...
void setCapability(const Capabilities c)
Adds a capability flag.
Superclass for all objects that wish to use custom memory allocators when their new / delete operator...
void setFragmentProgramConstantBoolCount(ushort c)
The number of boolean constants fragment programs support.
Support for point parameters ARB implementation.