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));
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 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.
Supports 32bit hardware index buffers.
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.
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,...
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.
void parseDriverVersionFromString(const String &versionString)
bool mNonPOW2TexturesLimited
Are non-POW2 textures feature-limited?
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...
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.