@ -244,6 +244,21 @@ void RendererOpenGL::InitOpenGLObjects() {
LoadColorToActiveGLTexture ( 0 , 0 , 0 , 0 , screen_info . texture ) ;
}
void RendererOpenGL : : AddTelemetryFields ( ) {
const char * const gl_version { reinterpret_cast < char const * > ( glGetString ( GL_VERSION ) ) } ;
const char * const gpu_vendor { reinterpret_cast < char const * > ( glGetString ( GL_VENDOR ) ) } ;
const char * const gpu_model { reinterpret_cast < char const * > ( glGetString ( GL_RENDERER ) ) } ;
LOG_INFO ( Render_OpenGL , " GL_VERSION: {} " , gl_version ) ;
LOG_INFO ( Render_OpenGL , " GL_VENDOR: {} " , gpu_vendor ) ;
LOG_INFO ( Render_OpenGL , " GL_RENDERER: {} " , gpu_model ) ;
auto & telemetry_session = system . TelemetrySession ( ) ;
telemetry_session . AddField ( Telemetry : : FieldType : : UserSystem , " GPU_Vendor " , gpu_vendor ) ;
telemetry_session . AddField ( Telemetry : : FieldType : : UserSystem , " GPU_Model " , gpu_model ) ;
telemetry_session . AddField ( Telemetry : : FieldType : : UserSystem , " GPU_OpenGL_Version " , gl_version ) ;
}
void RendererOpenGL : : CreateRasterizer ( ) {
if ( rasterizer ) {
return ;
@ -466,17 +481,7 @@ bool RendererOpenGL::Init() {
glDebugMessageCallback ( DebugHandler , nullptr ) ;
}
const char * gl_version { reinterpret_cast < char const * > ( glGetString ( GL_VERSION ) ) } ;
const char * gpu_vendor { reinterpret_cast < char const * > ( glGetString ( GL_VENDOR ) ) } ;
const char * gpu_model { reinterpret_cast < char const * > ( glGetString ( GL_RENDERER ) ) } ;
LOG_INFO ( Render_OpenGL , " GL_VERSION: {} " , gl_version ) ;
LOG_INFO ( Render_OpenGL , " GL_VENDOR: {} " , gpu_vendor ) ;
LOG_INFO ( Render_OpenGL , " GL_RENDERER: {} " , gpu_model ) ;
Core : : Telemetry ( ) . AddField ( Telemetry : : FieldType : : UserSystem , " GPU_Vendor " , gpu_vendor ) ;
Core : : Telemetry ( ) . AddField ( Telemetry : : FieldType : : UserSystem , " GPU_Model " , gpu_model ) ;
Core : : Telemetry ( ) . AddField ( Telemetry : : FieldType : : UserSystem , " GPU_OpenGL_Version " , gl_version ) ;
AddTelemetryFields ( ) ;
if ( ! GLAD_GL_VERSION_4_3 ) {
return false ;