Class TGLFeatures
Unit
Declaration
type TGLFeatures = class(TObject)
Description
OpenGL(ES) features, analyzed based on extensions and version. A single instance of this class is assigned to GLFeatures after the first rendering context was created. If you have multiple rendering contexts, our engine assumes they share resources and have equal features.
Hierarchy
- TObject
- TGLFeatures
Overview
Methods
constructor Create; |
|
destructor Destroy; override; |
|
function MaxTextureUnits: Cardinal; |
Properties
property Version_1_2: Boolean read FVersion_1_2; |
|
property Version_1_3: Boolean read FVersion_1_3; |
|
property Version_1_4: Boolean read FVersion_1_4; |
|
property Version_1_5: Boolean read FVersion_1_5; |
|
property Version_2_0: Boolean read FVersion_2_0; |
|
property Version_2_1: Boolean read FVersion_2_1; |
|
property Version_3_0: Boolean read FVersion_3_0; |
|
property Version_3_1: Boolean read FVersion_3_1; |
|
property Version_3_2: Boolean read FVersion_3_2; |
|
property Version_3_3: Boolean read FVersion_3_3; |
|
property Version_4_0: Boolean read FVersion_4_0; |
|
property ARB_shadow: Boolean read FARB_shadow; |
|
property EXT_texture_filter_anisotropic: Boolean read FEXT_texture_filter_anisotropic; |
|
property NV_multisample_filter_hint: Boolean read FNV_multisample_filter_hint; |
|
property ARB_occlusion_query: Boolean read FARB_occlusion_query; |
|
property EXT_framebuffer_blit: Boolean read FEXT_framebuffer_blit; |
|
property EXT_fog_coord: Boolean read FEXT_fog_coord; |
|
property ARB_window_pos: Boolean read FARB_window_pos; |
|
property MESA_window_pos: Boolean read FMESA_window_pos; |
|
property CLAMP_TO_EDGE: TGLenum read FCLAMP_TO_EDGE; |
|
property MaxTextureSize: Cardinal read FMaxTextureSize; |
|
property MaxLights: Cardinal read FMaxLights; |
|
property MaxCubeMapTextureSize: Cardinal read FMaxCubeMapTextureSize; |
|
property MaxTexture3DSize: Cardinal read FMaxTexture3DSize; |
|
property MaxTextureMaxAnisotropyEXT: Single read FMaxTextureMaxAnisotropyEXT; |
|
property QueryCounterBits: TGLint read FQueryCounterBits; |
|
property MaxRenderbufferSize: TGLuint read FMaxRenderbufferSize; |
|
property MaxClipPlanes: Cardinal read FMaxClipPlanes; |
|
property Multisample: Boolean read FMultisample; |
|
property MaxTextureUnitsFixedFunction: Cardinal read FMaxTextureUnitsFixedFunction; |
|
property MaxTextureUnitsShaders: Cardinal read FMaxTextureUnitsShaders; |
|
property UseMultiTexturing: Boolean read FUseMultiTexturing; |
|
property Texture3D: TGLSupport read FTexture3D; |
|
property Framebuffer: TGLSupport read FFramebuffer; |
|
property FBOMultiSampling: Boolean read FFBOMultiSampling; |
|
property CurrentMultiSampling: Cardinal read FCurrentMultiSampling; |
|
property PackedDepthStencil: Boolean read FPackedDepthStencil; |
|
property ShadowVolumesPossible: Boolean read FShadowVolumesPossible; |
|
property TextureNonPowerOfTwo: Boolean read FTextureNonPowerOfTwo; |
|
property TextureCubeMap: TGLSupport read FTextureCubeMap; |
|
property TextureCompression: TTextureCompressions read FTextureCompression; |
|
property VertexBufferObject: Boolean read FVertexBufferObject; |
|
property BlendConstant: Boolean read FBlendConstant; |
|
property TextureFloat: Boolean read FTextureFloat; |
|
property TextureDepth: Boolean read FTextureDepth; |
|
property Shaders: TGLSupport read FShaders write FShaders; |
|
property EnableFixedFunction: Boolean read FEnableFixedFunction write FEnableFixedFunction; |
|
property Memory: TGLMemoryInfo read FMemory; |
|
property MaxViewportDimensions: TVector2Integer read FMaxViewportDimensions; |
Description
Methods
constructor Create; |
|
destructor Destroy; override; |
|
function MaxTextureUnits: Cardinal; |
|
Maximum number of texture units you can safely always use. If EnableFixedFunction, this is MaxTextureUnitsFixedFunction, otherwise MaxTextureUnitsShaders. |
Properties
property Version_1_3: Boolean read FVersion_1_3; |
|
property Version_1_4: Boolean read FVersion_1_4; |
|
property Version_1_5: Boolean read FVersion_1_5; |
|
property Version_2_0: Boolean read FVersion_2_0; |
|
property Version_2_1: Boolean read FVersion_2_1; |
|
property Version_3_0: Boolean read FVersion_3_0; |
|
property Version_3_1: Boolean read FVersion_3_1; |
|
property Version_3_2: Boolean read FVersion_3_2; |
|
property Version_3_3: Boolean read FVersion_3_3; |
|
property Version_4_0: Boolean read FVersion_4_0; |
|
property ARB_shadow: Boolean read FARB_shadow; |
|
Is the extension below loaded. Note: we prefer to avoid exposing directly each extension presence like below. Instead most interesting extensions are wrapped in "features" like UseMultiTexturing, see lower. |
property EXT_texture_filter_anisotropic: Boolean read FEXT_texture_filter_anisotropic; |
|
property NV_multisample_filter_hint: Boolean read FNV_multisample_filter_hint; |
|
property ARB_occlusion_query: Boolean read FARB_occlusion_query; |
|
property EXT_framebuffer_blit: Boolean read FEXT_framebuffer_blit; |
|
property EXT_fog_coord: Boolean read FEXT_fog_coord; |
|
property ARB_window_pos: Boolean read FARB_window_pos; |
|
property MESA_window_pos: Boolean read FMESA_window_pos; |
|
property CLAMP_TO_EDGE: TGLenum read FCLAMP_TO_EDGE; |
|
GL_CLAMP_TO_EDGE, if available in current OpenGL version. Otherwise GL_CLAMP. Use this (insteaf of direct GL_CLAMP_TO_EDGE) to work with really ancient OpenGL versions before 1.2. Note that our engine officially supports only OpenGL >= 1.2, so don't expect everything to work smootly with such ancient OpenGL anyway! |
property MaxTextureSize: Cardinal read FMaxTextureSize; |
|
Constant (for given context) OpenGL limits. Initialized to 0 if appropriate OpenGL functionality is not available. Note that MaxLights is only relevant if we use OpenGL fixed-function pipeline. Otherwise the actual limit is defined purely by Scene.RenderOptions.MaxLightsPerShape, specific to each TCastleScene, and is completely configurable (can be higher or lower than MaxLights). |
property MaxLights: Cardinal read FMaxLights; |
|
property MaxCubeMapTextureSize: Cardinal read FMaxCubeMapTextureSize; |
|
property MaxTexture3DSize: Cardinal read FMaxTexture3DSize; |
|
property MaxTextureMaxAnisotropyEXT: Single read FMaxTextureMaxAnisotropyEXT; |
|
property QueryCounterBits: TGLint read FQueryCounterBits; |
|
property MaxRenderbufferSize: TGLuint read FMaxRenderbufferSize; |
|
property MaxClipPlanes: Cardinal read FMaxClipPlanes; |
|
property Multisample: Boolean read FMultisample; |
|
property MaxTextureUnitsFixedFunction: Cardinal read FMaxTextureUnitsFixedFunction; |
|
Number of texture units available for fixed-function pipeline. Equal to 0 on OpenGLES (that doesn't have fixed-function pipeline). Equal to glGetInteger(GL_MAX_TEXTURE_UNITS), if multi-texturing available. Equal to 1 (OpenGL supports always 1 texture) otherwise. |
property MaxTextureUnitsShaders: Cardinal read FMaxTextureUnitsShaders; |
|
Number of texture units available for shader pipeline. |
property Texture3D: TGLSupport read FTexture3D; |
|
Are 3D textures supported by OpenGL. If they are, note that GL_TEXTURE_3D and GL_TEXTURE_3D_EXT are equal, so often both |
property Framebuffer: TGLSupport read FFramebuffer; |
|
Is Framebuffer supported. Value gsExtension means that EXT_framebuffer_object is used, gsStandard means that ARB_framebuffer_object (which is a "core extesion", present the same way in OpenGL 3 core, also in OpenGL ES >= 2.0 core) is available. |
property FBOMultiSampling: Boolean read FFBOMultiSampling; |
|
Is multisampling possible for FBO buffers and textures. Although these are two orthogonal features of OpenGL, in practice you want to use multisample for both FBO buffers and textures, or for none — otherwise, FBO can not be initialized correctly when you mix various multisample settings. |
property CurrentMultiSampling: Cardinal read FCurrentMultiSampling; |
|
How multi-sampling was initialized for this OpenGL context. Value = 1 means that no multi-sampling is initialized. Values > 1 mean that you have multi-sampling, with given number of samples per pixel. Contrast this with TCastleWindow.MultiSampling or TOpenGLControl.MultiSampling, that say how many samples you wanted to get. |
property PackedDepthStencil: Boolean read FPackedDepthStencil; |
|
Does OpenGL context have depth buffer packed with stencil buffer. See OpenGL extensions EXT_packed_depth_stencil and OES_packed_depth_stencil (http://www.opengl.org/registry/specs/EXT/packed_depth_stencil.txt, https://www.khronos.org/registry/OpenGL/extensions/OES/OES_packed_depth_stencil.txt) for explanation what does it mean. This is important for FBOs, as the depth/stencil have to be set up differently depending on For now, this is simply equal to GL_EXT_packed_depth_stencil. (TODO: for core OpenGL 3, how to detect should we use packed version? http://www.opengl.org/registry/specs/ARB/framebuffer_object.txt incorporates EXT_packed_depth_stencil, so forward-compatible contexts do not need to declare it. Should we assume that forward-compatible gl 3 contexts always have depth/stencil packed?) |
property ShadowVolumesPossible: Boolean read FShadowVolumesPossible; |
|
Does OpenGL context support shadow volumes. This simply checks do we have stencil buffer with at least 4 bits for now. |
property TextureNonPowerOfTwo: Boolean read FTextureNonPowerOfTwo; |
|
Are non-power-of-2 textures supported. |
property TextureCubeMap: TGLSupport read FTextureCubeMap; |
|
Are cubemaps supported. gsExtension means GL_ARB_texture_cube_map on core OpenGL. gsStandard means standard feature of OpenGL or OpenGL ES. Since the constants defined by ARB_texture_cube_map were promoted to core with the same values, the distinction between gsExtension and gsStandard in practice doesn't exist. |
property TextureCompression: TTextureCompressions read FTextureCompression; |
|
Which texture compression formats are supported. |
property VertexBufferObject: Boolean read FVertexBufferObject; |
|
VBO support (in OpenGL (ES) core). |
property BlendConstant: Boolean read FBlendConstant; |
|
glBlendColor and GL_CONSTANT_ALPHA support. |
property TextureFloat: Boolean read FTextureFloat; |
|
Support for float texture formats for glTexImage2d. |
property TextureDepth: Boolean read FTextureDepth; |
|
Support for depth texture formats for glTexImage2d. |
property Shaders: TGLSupport read FShaders write FShaders; |
|
GLSL shaders support. Note: Setting it is allowed for now, as a simple way to force non-shader rendering, to test it. You should not use this or rely it will be available in future versions. |
property EnableFixedFunction: Boolean read FEnableFixedFunction write FEnableFixedFunction; |
|
Enable OpenGL fixed-function rendering on desktops.
This is On OpenGLES, it must be |
property Memory: TGLMemoryInfo read FMemory; |
|
Total and current |
property MaxViewportDimensions: TVector2Integer read FMaxViewportDimensions; |
|
Generated by PasDoc 0.16.0.