Easy3D 2.6.1
|
Utilities for OpenGL initialization and states query. More...
#include <easy3d/renderer/opengl_util.h>
Static Public Member Functions | |
static bool | init () |
Initialize OpenGL. | |
static bool | is_initialized () |
Check if OpenGL is initialized. | |
static int | gl_profile () |
Get the OpenGL profile. | |
static bool | is_supported (const std::string &name) |
Check if a specific OpenGL feature is supported. | |
static bool | has_extension (const std::string &name) |
Check if a specific OpenGL extension is available. | |
static std::string | glew_version () |
Get the GLEW version. | |
static std::string | gl_vendor () |
Get the OpenGL vendor. | |
static std::string | gl_renderer () |
Get the OpenGL renderer. | |
static std::string | gl_version () |
Get the OpenGL version. | |
static std::string | gl_extensions () |
Get the OpenGL extensions. | |
static std::string | glsl_version () |
Get the GLSL version. | |
static int | gl_major_version () |
Get the major version of OpenGL. | |
static int | gl_minor_version () |
Get the minor version of OpenGL. | |
static float | glew_version_number () |
Get the GLEW version number. | |
static float | gl_version_number () |
Get the OpenGL version number. | |
static float | glsl_version_number () |
Get the GLSL version number. | |
static int | samples () |
Get the number of samples. | |
static void | viewport (int &x, int &y, int &width, int &height) |
Query the OpenGL viewport. The parameters are the same as in glViewport(x, y, width, height) | |
static int | total_gpu_memory () |
Get the total GPU memory. | |
static int | available_gpu_memory () |
Get the available GPU memory. | |
static void | set_output (std::ostream *out) |
Set the output stream for the messages. | |
static void | get_current_buffer_info () |
Get current bound buffer info. | |
static void | get_buffer_info (unsigned int target, int bufferName) |
Get the buffer information. | |
static void | get_vao_info (unsigned int buffer) |
Get VAO information, including its attributes. | |
static void | get_program_info (unsigned int program) |
Get detailed info for a program. | |
static void | get_attributes_info (unsigned int program) |
Get detailed info for attributes in a program. | |
static void | get_uniforms_info (unsigned int program) |
Get info for all active uniforms in a program. | |
static void | get_uniform_info (unsigned int program, const std::string &uniName) |
Get a uniform's value(s). | |
static void | get_uniform_in_block_info (unsigned int program, const std::string &blockName, const std::string &uniName) |
Get the values for a uniform in a named block. | |
Utilities for OpenGL initialization and states query.
|
static |
Get the available GPU memory.
|
static |
Get detailed info for attributes in a program.
display detailed info for attributes in a program
program | The program ID. |
|
static |
Get the buffer information.
display the buffer information
target | The target buffer. |
bufferName | The name of the buffer. |
|
static |
Get current bound buffer info.
display current bound buffer info
|
static |
Get detailed info for a program.
display detailed info for a program
program | The program ID. |
|
static |
Get the values for a uniform in a named block.
display the values for a uniform in a named block
program | The program ID. |
blockName | The name of the block. |
uniName | The name of the uniform. |
|
static |
Get a uniform's value(s).
display a uniform's value(s)
program | The program ID. |
uniName | The name of the uniform. |
|
static |
Get info for all active uniforms in a program.
program | The program ID. |
|
static |
Get VAO information, including its attributes.
display detailed VAO info
buffer | The VAO buffer. |
|
static |
Get the OpenGL extensions.
|
static |
Get the major version of OpenGL.
|
static |
Get the minor version of OpenGL.
|
static |
Get the OpenGL profile.
|
static |
Get the OpenGL renderer.
|
static |
Get the OpenGL vendor.
|
static |
Get the OpenGL version.
|
static |
Get the OpenGL version number.
|
static |
Get the GLEW version.
|
static |
Get the GLEW version number.
|
static |
Get the GLSL version.
|
static |
Get the GLSL version number.
|
static |
Check if a specific OpenGL extension is available.
name | The name of the extension, e.g., "GL\_EXT\_framebuffer\_object". |
true
if the extension is available, false
otherwise.
|
static |
Initialize OpenGL.
true
if initialization is successful, false
otherwise.
|
static |
Check if OpenGL is initialized.
true
if OpenGL is initialized, false
otherwise.
|
static |
Check if a specific OpenGL feature is supported.
name | The name of the feature, e.g., "GL\_VERSION\_3\_2", "GL\_ARB\_vertex\_array\_object". |
true
if the feature is supported, false
otherwise.
|
static |
Get the number of samples.
|
static |
Set the output stream for the messages.
out | The output stream. If null, LOG(INFO) is the default output stream. |
|
static |
Get the total GPU memory.
|
static |
Query the OpenGL viewport. The parameters are the same as in glViewport(x, y, width, height)
x | The lower left corner x-coordinate of the viewport rectangle, in pixels. |
y | The lower left corner y-coordinate of the viewport rectangle, in pixels. |
width | The width of the viewport. |
height | The height of the viewport. |