Utilities for OpenGL initialization and states query.
More...
#include <easy3d/renderer/opengl_util.h>
|
static bool | init () |
|
static bool | is_initialized () |
|
static int | gl_profile () |
| returns either GL_CONTEXT_CORE_PROFILE_BIT or GL_CONTEXT_COMPATIBILITY_PROFILE_BIT
|
|
static bool | is_supported (const std::string &name) |
|
static bool | has_extension (const std::string &name) |
|
static std::string | glew_version () |
|
static std::string | gl_vendor () |
|
static std::string | gl_renderer () |
|
static std::string | gl_version () |
|
static std::string | gl_extensions () |
|
static std::string | glsl_version () |
|
static int | gl_major_version () |
|
static int | gl_minor_version () |
|
static float | glew_version_number () |
|
static float | gl_version_number () |
|
static float | glsl_version_number () |
|
static int | samples () |
|
static void | viewport (int &x, int &y, int &width, int &height) |
|
static int | total_gpu_memory () |
|
static int | available_gpu_memory () |
|
static void | set_output (std::ostream *out) |
|
static void | get_current_buffer_info () |
| display current bound buffer info
|
|
static void | get_buffer_info (unsigned int target, int bufferName) |
| display the buffer information
|
|
static void | get_vao_info (unsigned int buffer) |
| display VAO information, including its attributes More...
|
|
static void | get_program_info (unsigned int program) |
| display detailed info for a program
|
|
static void | get_attributes_info (unsigned int program) |
| display detailed info for attributes in a program
|
|
static void | get_uniforms_info (unsigned int program) |
| display info for all active uniforms in a program
|
|
static void | get_uniform_info (unsigned int program, const std::string &uniName) |
| display a uniform's value(s)
|
|
static void | get_uniform_in_block_info (unsigned int program, const std::string &blockName, const std::string &uniName) |
| display the values for a uniform in a named block
|
|
Utilities for OpenGL initialization and states query.
◆ get_vao_info()
void get_vao_info |
( |
unsigned int |
buffer | ) |
|
|
static |
display VAO information, including its attributes
display detailed VAO info
◆ set_output()
void set_output |
( |
std::ostream * |
out | ) |
|
|
static |
sets the output stream for the messages. if null, LOG(INFO) is the default output stream
◆ total_gpu_memory()
in MB. returns 0 if the query fails. NOTE: (1) OpenGL >= 2.0 is required. (2) currently only NVidia GPUs are supported
◆ viewport()
void viewport |
( |
int & |
x, |
|
|
int & |
y, |
|
|
int & |
width, |
|
|
int & |
height |
|
) |
| |
|
static |
Query the OpenGL viewport. The parameters are the same as in glViewport(x, y, width, height). x, y: the lower left corner of the viewport rectangle, in pixels. width, height: the width and height of the viewport.
- Examples
- Tutorial_203_Viewer_wxWidgets.
The documentation for this class was generated from the following files:
- /Users/lnan/Documents/Projects/Easy3D/easy3d/renderer/opengl_util.h
- /Users/lnan/Documents/Projects/Easy3D/easy3d/renderer/opengl_util.cpp