Back to index

nux  3.0.0
Public Member Functions | Private Member Functions | Private Attributes | Friends
nux::GpuInfo Class Reference

#include <GpuDevice.h>

List of all members.

Public Member Functions

 GpuInfo ()
bool SupportOpenGL11 () const
bool SupportOpenGL12 () const
bool SupportOpenGL13 () const
bool SupportOpenGL14 () const
bool SupportOpenGL15 () const
bool SupportOpenGL20 () const
bool SupportOpenGL21 () const
bool SupportOpenGL30 () const
bool SupportOpenGL31 () const
bool SupportOpenGL33 () const
bool SupportOpenGL32 () const
bool SupportOpenGL40 () const
bool SupportOpenGL41 () const
bool Support_EXT_Swap_Control () const
bool Support_ARB_Texture_Rectangle () const
bool Support_ARB_Vertex_Program () const
bool Support_ARB_Fragment_Program () const
bool Support_ARB_Shader_Objects () const
bool Support_ARB_Vertex_Shader () const
bool Support_ARB_Fragment_Shader () const
bool Support_ARB_Vertex_Buffer_Object () const
bool Support_ARB_Texture_Non_Power_Of_Two () const
bool Support_EXT_Framebuffer_Object () const
bool Support_EXT_Draw_Range_Elements () const
bool Support_EXT_Stencil_Two_Side () const
bool Support_EXT_Texture_Rectangle () const
bool Support_NV_Texture_Rectangle () const
bool Support_ARB_Pixel_Buffer_Object () const
bool Support_EXT_Blend_Equation_Separate () const
bool Support_EXT_Texture_sRGB () const
bool Support_EXT_Texture_Decode () const
bool Support_EXT_Framebuffer_sRGB () const
bool Support_ARB_Framebuffer_sRGB () const
int GetMaxFboAttachment ()

Private Member Functions

void Setup ()

Private Attributes

bool _support_opengl_version_11
bool _support_opengl_version_12
bool _support_opengl_version_13
bool _support_opengl_version_14
bool _support_opengl_version_15
bool _support_opengl_version_20
bool _support_opengl_version_21
bool _support_opengl_version_30
bool _support_opengl_version_31
bool _support_opengl_version_32
bool _support_opengl_version_33
bool _support_opengl_version_40
bool _support_opengl_version_41
int _opengl_max_texture_units
int _opengl_max_texture_coords
int _opengl_max_texture_image_units
int _opengl_max_fb_attachment
int _opengl_max_vertex_attributes
bool _support_ext_swap_control
bool _support_arb_vertex_program
bool _support_arb_fragment_program
bool _support_arb_shader_objects
bool _support_arb_vertex_shader
bool _support_arb_fragment_shader
bool _support_arb_vertex_buffer_object
bool _support_arb_texture_non_power_of_two
bool _support_ext_framebuffer_object
bool _support_ext_draw_range_elements
bool _support_ext_stencil_two_side
bool _support_ext_texture_rectangle
bool _support_arb_texture_rectangle
 Promoted from GL_EXT_TEXTURE_RECTANGLE to ARB.
bool _support_nv_texture_rectangle
bool _support_arb_pixel_buffer_object
bool _support_ext_blend_equation_separate
bool _support_ext_texture_srgb
bool _support_ext_texture_srgb_decode
bool _support_ext_framebuffer_srgb
bool _support_arb_framebuffer_srgb

Friends

class GpuDevice

Detailed Description

Definition at line 72 of file GpuDevice.h.


Constructor & Destructor Documentation


Member Function Documentation

Definition at line 116 of file GpuDevice.h.

void nux::GpuInfo::Setup ( ) [private]

Definition at line 199 of file GpuDevice.cpp.

  {
#ifndef NUX_OPENGLES_20
    _support_opengl_version_11 = GLEW_VERSION_1_1 ? true : false;
    _support_opengl_version_12 = GLEW_VERSION_1_2 ? true : false;
    _support_opengl_version_13 = GLEW_VERSION_1_3 ? true : false;
    _support_opengl_version_14 = GLEW_VERSION_1_4 ? true : false;
    _support_opengl_version_15 = GLEW_VERSION_1_5 ? true : false;
    _support_opengl_version_20 = GLEW_VERSION_2_0 ? true : false;
    _support_opengl_version_21 = GLEW_VERSION_2_1 ? true : false;
    _support_opengl_version_30 = GLEW_VERSION_3_0 ? true : false;
    _support_opengl_version_31 = GLEW_VERSION_3_1 ? true : false;
    _support_opengl_version_32 = GLEW_VERSION_3_2 ? true : false;
//     _support_opengl_version_33 = GLEW_VERSION_3_3 ? true : false;
//     _support_opengl_version_40 = GLEW_VERSION_4_0 ? true : false;
//     _support_opengl_version_41 = GLEW_VERSION_4_1 ? true : false;

    // See: http://developer.nvidia.com/object/General_FAQ.html
    // The value of GL_MAX_TEXTURE_UNITS is 4 for GeForce FX and GeForce 6 Series GPUs. Why is that, since those GPUs have 16 texture units?
    CHECKGL(glGetIntegerv(GL_MAX_TEXTURE_UNITS, &_opengl_max_texture_units));
    CHECKGL(glGetIntegerv(GL_MAX_TEXTURE_COORDS, &_opengl_max_texture_coords));
    CHECKGL(glGetIntegerv(GL_MAX_TEXTURE_IMAGE_UNITS_ARB, &_opengl_max_texture_image_units));
    CHECKGL(glGetIntegerv(GL_MAX_VERTEX_ATTRIBS, &_opengl_max_vertex_attributes));
    CHECKGL(glGetIntegerv(GL_MAX_COLOR_ATTACHMENTS_EXT, &_opengl_max_fb_attachment));
#else
    _opengl_max_fb_attachment = 1;
#endif

#if defined(NUX_OS_WINDOWS)
    _support_ext_swap_control                 = WGLEW_EXT_swap_control ? true : false;
#elif defined(NUX_OS_LINUX) && !defined(NUX_OPENGLES_20)
    _support_ext_swap_control                 = GLXEW_SGI_swap_control ? true : false;
#endif

#ifndef NUX_OPENGLES_20
    _support_arb_vertex_program               = GLEW_ARB_vertex_program ? true : false;
    _support_arb_fragment_program             = GLEW_ARB_fragment_program ? true : false;
    _support_ext_framebuffer_object           = GLEW_EXT_framebuffer_object ? true : false;
    _support_arb_shader_objects               = GLEW_ARB_shader_objects ? true : false;
    _support_arb_vertex_shader                = GLEW_ARB_vertex_shader ? true : false;
    _support_arb_fragment_shader              = GLEW_ARB_fragment_shader ? true : false;
    _support_arb_vertex_buffer_object         = GLEW_ARB_vertex_buffer_object ? true : false;
    _support_arb_texture_non_power_of_two     = GLEW_ARB_texture_non_power_of_two ? true : false;
    _support_ext_draw_range_elements          = GLEW_EXT_draw_range_elements ? true : false;
    _support_ext_stencil_two_side             = GLEW_EXT_stencil_two_side ? true : false;
    _support_ext_texture_rectangle            = GLEW_EXT_texture_rectangle ? true : false;
    _support_arb_texture_rectangle            = GLEW_ARB_texture_rectangle ? true : false;
    _support_nv_texture_rectangle             = GLEW_NV_texture_rectangle ? true : false;
    _support_arb_pixel_buffer_object          = GLEW_ARB_pixel_buffer_object ? true : false;
    _support_ext_blend_equation_separate      = GLEW_EXT_blend_equation_separate ? true : false;
    _support_ext_texture_srgb                 = GLEW_EXT_texture_sRGB ? true : false;
    _support_ext_texture_srgb_decode          = false; //GLEW_EXT_texture_sRGB_decode ? true : false;
    _support_ext_framebuffer_srgb             = GLEW_EXT_framebuffer_sRGB ? true : false;
    _support_arb_framebuffer_srgb             = GLEW_ARB_framebuffer_sRGB ? true : false;
#else
    _support_arb_vertex_program               = false;
    _support_arb_fragment_program             = false;
    _support_arb_shader_objects               = true;
    _support_arb_vertex_shader                = true;
    _support_arb_fragment_shader              = true;
    _support_arb_vertex_buffer_object         = true;
    _support_arb_texture_non_power_of_two     = true;
    _support_ext_framebuffer_object           = true;
    _support_ext_draw_range_elements          = false;
    _support_ext_stencil_two_side             = false;
    _support_ext_texture_rectangle            = false;
    _support_arb_texture_rectangle            = false;
    _support_nv_texture_rectangle             = false;
    _support_arb_pixel_buffer_object          = false;
    _support_ext_blend_equation_separate      = true;
#endif
  }

Definition at line 95 of file GpuDevice.h.

Here is the caller graph for this function:

Definition at line 98 of file GpuDevice.h.

Here is the caller graph for this function:

Definition at line 113 of file GpuDevice.h.

Definition at line 106 of file GpuDevice.h.

Definition at line 96 of file GpuDevice.h.

Definition at line 100 of file GpuDevice.h.

Here is the caller graph for this function:

Definition at line 93 of file GpuDevice.h.

Here is the caller graph for this function:

Definition at line 99 of file GpuDevice.h.

Definition at line 94 of file GpuDevice.h.

Here is the caller graph for this function:

bool nux::GpuInfo::Support_ARB_Vertex_Shader ( ) const [inline]

Definition at line 97 of file GpuDevice.h.

Here is the caller graph for this function:

Definition at line 107 of file GpuDevice.h.

Here is the caller graph for this function:

Definition at line 102 of file GpuDevice.h.

Definition at line 101 of file GpuDevice.h.

Here is the caller graph for this function:

Definition at line 112 of file GpuDevice.h.

Definition at line 103 of file GpuDevice.h.

bool nux::GpuInfo::Support_EXT_Swap_Control ( ) const [inline]

Definition at line 92 of file GpuDevice.h.

Here is the caller graph for this function:

Definition at line 111 of file GpuDevice.h.

Definition at line 104 of file GpuDevice.h.

Here is the caller graph for this function:

bool nux::GpuInfo::Support_EXT_Texture_sRGB ( ) const [inline]

Definition at line 110 of file GpuDevice.h.

Definition at line 105 of file GpuDevice.h.

bool nux::GpuInfo::SupportOpenGL11 ( ) const [inline]

Definition at line 78 of file GpuDevice.h.

bool nux::GpuInfo::SupportOpenGL12 ( ) const [inline]

Definition at line 79 of file GpuDevice.h.

bool nux::GpuInfo::SupportOpenGL13 ( ) const [inline]

Definition at line 80 of file GpuDevice.h.

bool nux::GpuInfo::SupportOpenGL14 ( ) const [inline]

Definition at line 81 of file GpuDevice.h.

bool nux::GpuInfo::SupportOpenGL15 ( ) const [inline]

Definition at line 82 of file GpuDevice.h.

bool nux::GpuInfo::SupportOpenGL20 ( ) const [inline]

Definition at line 83 of file GpuDevice.h.

Here is the caller graph for this function:

bool nux::GpuInfo::SupportOpenGL21 ( ) const [inline]

Definition at line 84 of file GpuDevice.h.

bool nux::GpuInfo::SupportOpenGL30 ( ) const [inline]

Definition at line 85 of file GpuDevice.h.

bool nux::GpuInfo::SupportOpenGL31 ( ) const [inline]

Definition at line 86 of file GpuDevice.h.

bool nux::GpuInfo::SupportOpenGL32 ( ) const [inline]

Definition at line 88 of file GpuDevice.h.

bool nux::GpuInfo::SupportOpenGL33 ( ) const [inline]

Definition at line 87 of file GpuDevice.h.

bool nux::GpuInfo::SupportOpenGL40 ( ) const [inline]

Definition at line 89 of file GpuDevice.h.

bool nux::GpuInfo::SupportOpenGL41 ( ) const [inline]

Definition at line 90 of file GpuDevice.h.


Friends And Related Function Documentation

friend class GpuDevice [friend]

Definition at line 166 of file GpuDevice.h.


Member Data Documentation

Definition at line 139 of file GpuDevice.h.

Definition at line 137 of file GpuDevice.h.

Definition at line 138 of file GpuDevice.h.

Definition at line 136 of file GpuDevice.h.

Definition at line 140 of file GpuDevice.h.

Definition at line 144 of file GpuDevice.h.

Definition at line 147 of file GpuDevice.h.

Definition at line 163 of file GpuDevice.h.

Definition at line 156 of file GpuDevice.h.

Definition at line 145 of file GpuDevice.h.

Definition at line 149 of file GpuDevice.h.

Promoted from GL_EXT_TEXTURE_RECTANGLE to ARB.

Definition at line 154 of file GpuDevice.h.

Definition at line 148 of file GpuDevice.h.

Definition at line 143 of file GpuDevice.h.

Definition at line 146 of file GpuDevice.h.

Definition at line 157 of file GpuDevice.h.

Definition at line 151 of file GpuDevice.h.

Definition at line 150 of file GpuDevice.h.

Definition at line 162 of file GpuDevice.h.

Definition at line 152 of file GpuDevice.h.

Definition at line 142 of file GpuDevice.h.

Definition at line 153 of file GpuDevice.h.

Definition at line 160 of file GpuDevice.h.

Definition at line 161 of file GpuDevice.h.

Definition at line 155 of file GpuDevice.h.

Definition at line 122 of file GpuDevice.h.

Definition at line 123 of file GpuDevice.h.

Definition at line 124 of file GpuDevice.h.

Definition at line 125 of file GpuDevice.h.

Definition at line 126 of file GpuDevice.h.

Definition at line 127 of file GpuDevice.h.

Definition at line 128 of file GpuDevice.h.

Definition at line 129 of file GpuDevice.h.

Definition at line 130 of file GpuDevice.h.

Definition at line 131 of file GpuDevice.h.

Definition at line 132 of file GpuDevice.h.

Definition at line 133 of file GpuDevice.h.

Definition at line 134 of file GpuDevice.h.


The documentation for this class was generated from the following files: