Support Forum G3D Web Page |
Low-level wrapper for OpenGL extension management.
More...
Public Types | |
enum | Vendor { ATI, AMD = ATI, NVIDIA, MESA, INTEL, ARB } |
Static Public Member Functions | |
static OSWindow::Settings::API | api () |
static const String & | driverVersion () |
static Vendor | enumVendor () |
static const class ImageFormat * | firstSupportedTexture (const Array< const class ImageFormat *> &prefs) |
Returns the first element of prefs for which supportsTexture() returns true. More... | |
static void | getExtensions (Array< String > &extensions) |
Fills the array with the currently available extension names. More... | |
static float | glslVersion () |
e.g., 1.50 or 4.00 More... | |
static const String & | glVersion () |
static float | glVersionNumber () |
static bool | hasBug_R11G11B10F () |
Some ATI cards claim to support ImageFormat::R11G10B10F but render to it incorrectly. More... | |
static void | init (OSWindow::Settings::API api=OSWindow::Settings::API::API_OPENGL) |
Loads OpenGL extensions (e.g. More... | |
static int | maxCubeMapSize () |
static int | maxTextureBufferSize () |
static int | maxTextureSize () |
static int | numTextureCoords () |
Between 8 and 16 on most cards. More... | |
static int | numTextures () |
Between 16 and 32 on most cards. More... | |
static int | numTextureUnits () |
4 on most cards. More... | |
static const String & | renderer () |
static const class ImageFormat * | smallHDRFormat () |
Returns a small high-dynamic range (float) RGB format supported on this machine. More... | |
static bool | supports (const String &extName) |
static bool | supports_GL_ARB_fragment_program () |
static bool | supports_GL_ARB_fragment_shader () |
static bool | supports_GL_ARB_framebuffer_object () |
static bool | supports_GL_ARB_framebuffer_sRGB () |
static bool | supports_GL_ARB_multitexture () |
static bool | supports_GL_ARB_shader_objects () |
static bool | supports_GL_ARB_shading_language_100 () |
static bool | supports_GL_ARB_shadow () |
static bool | supports_GL_ARB_sync () |
static bool | supports_GL_ARB_texture_border_clamp () |
static bool | supports_GL_ARB_texture_buffer_object () |
static bool | supports_GL_ARB_texture_float () |
static bool | supports_GL_ARB_texture_non_power_of_two () |
static bool | supports_GL_ARB_vertex_buffer_object () |
static bool | supports_GL_ARB_vertex_program () |
static bool | supports_GL_ARB_vertex_shader () |
static bool | supports_GL_ATI_separate_stencil () |
static bool | supports_GL_EXT_framebuffer_object () |
static bool | supports_GL_EXT_geometry_shader4 () |
static bool | supports_GL_EXT_separate_specular_color () |
static bool | supports_GL_EXT_stencil_two_side () |
static bool | supports_GL_EXT_stencil_wrap () |
static bool | supports_GL_EXT_texture3D () |
static bool | supports_GL_EXT_texture_compression_s3tc () |
static bool | supports_GL_EXT_texture_cube_map () |
static bool | supports_GL_EXT_texture_edge_clamp () |
static bool | supports_GL_EXT_texture_mirror_clamp () |
static bool | supports_GL_EXT_texture_rectangle () |
static bool | supports_GL_NV_fence () |
static bool | supports_GL_NV_vertex_program2 () |
static bool | supports_GL_SGIS_generate_mipmap () |
static bool | supports_glTexStorage2D () |
static bool | supportsG3D10 (String &explanation) |
Returns true if this GPU/driver supports the features needed for the G3D 10 release, which raises the minimum standards for GPUs. More... | |
static bool | supportsTexture (const class ImageFormat *fmt) |
Returns true if the given texture format is supported on this device for Textures. More... | |
static bool | supportsTextureDrawBuffer (const class ImageFormat *fmt) |
Returns true if the given texture format is supported on this device for draw FrameBuffers. More... | |
static const String & | vendor () |
Low-level wrapper for OpenGL extension management.
Can be used without G3D::RenderDevice to load and manage extensions.
OpenGL has a base API and an extension API. All OpenGL drivers must support the base API. The latest features may not be supported by some drivers, so they are in the extension API and are dynamically loaded at runtime using GLCaps::loadExtensions.
Before using a specific extension you must test for its presence using the GLCaps::supports method.
For convenience, frequently used extensions have fast tests, e.g., GLCaps::supports_GL_EXT_texture_rectangle.
Note that GL_NV_texture_rectangle and GL_EXT_texture_rectangle have exactly the same constants, so supports_GL_EXT_texture_rectangle returns true if either is supported.
GLCaps assumes all OpenGL contexts have the same capabilities.
The following extensions are shortcutted with a method named similarly to GLCaps::supports_GL_EXT_texture_rectangle():
These methods do not appear in the documentation because they are generated using macros.
The hasBug_
methods detect specific common bugs on graphics cards. They can be used to switch to fallback rendering paths.
enum G3D::GLCaps::Vendor |
|
inlinestatic |
|
static |
|
static |
|
static |
Returns the first element of prefs for which supportsTexture() returns true.
Returns nullptr if none are supported.
Fills the array with the currently available extension names.
|
inlinestatic |
e.g., 1.50 or 4.00
|
static |
|
static |
|
static |
Some ATI cards claim to support ImageFormat::R11G10B10F but render to it incorrectly.
|
static |
Loads OpenGL extensions (e.g.
glBindBufferARB). Call this once at the beginning of the program, after a video device is created. This is called for you if you use G3D::RenderDevice.
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
Between 8 and 16 on most cards.
Can be more than number of textures.
|
inlinestatic |
Between 16 and 32 on most cards.
Can be more than number of fixed-function texture units.
|
inlinestatic |
4 on most cards.
Only affects fixed function. See http://developer.nvidia.com/object/General_FAQ.html#t6 for a discussion of the number of texture units.
|
static |
|
static |
Returns a small high-dynamic range (float) RGB format supported on this machine.
Prefers: R11G11B10F, RGB16F, RGB32F
|
static |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
static |
|
static |
Returns true if this GPU/driver supports the features needed for the G3D 10 release, which raises the minimum standards for GPUs.
This call is intended to give developers some guidance in what to expect from the new API, however, it is not guaranteed to match the G3D 10.xx specification and requirements because that API is still under design.
explanation | Detailed explanation of which extensions are needed. |
|
static |
Returns true if the given texture format is supported on this device for Textures.
|
static |
Returns true if the given texture format is supported on this device for draw FrameBuffers.
Note: always false for depth compressed formats
|
static |