bIsAndroidOpenGLES

bIsAndroidOpenGLES

#Overview

name: bIsAndroidOpenGLES

The value of this variable can be defined or overridden in .ini config files. 3 .ini config files referencing this setting variable.

It is referenced in 3 C++ source files.

#Summary

#Usage in the C++ source code

The purpose of bIsAndroidOpenGLES is to indicate whether the current shader platform is using Android OpenGL ES. This variable is primarily used in the rendering system, specifically for shader platform information and capabilities.

This setting variable is relied upon by the RHI (Rendering Hardware Interface) module of Unreal Engine. It’s part of the FGenericDataDrivenShaderPlatformInfo class, which provides information about various shader platforms.

The value of this variable is set during the parsing of data-driven shader information. This occurs in the ParseDataDrivenShaderInfo function within the DataDrivenShaderPlatformInfo.cpp file.

bIsAndroidOpenGLES interacts with other platform-specific boolean variables like bIsPC and bIsConsole. It’s part of a larger set of flags that describe the capabilities and characteristics of different shader platforms.

Developers must be aware that this variable is specific to Android platforms using OpenGL ES. It should not be confused with other Android rendering APIs or with OpenGL ES on other platforms.

Best practices when using this variable include:

  1. Always check its value through the provided getter method (GetIsAndroidOpenGLES) rather than accessing it directly.
  2. Use it in conjunction with other platform flags to ensure correct platform-specific behavior.
  3. Be cautious when making assumptions based solely on this flag, as Android devices may support multiple graphics APIs.
  4. Consider the implications on shader compilation and rendering paths when this flag is true.
  5. Keep in mind that this is part of a data-driven system, so its value may change based on the current configuration or platform.

#Setting Variables

#References In INI files

Location: <Workspace>/Engine/Config/Android/DataDrivenPlatformInfo.ini:61, section: [ShaderPlatform OPENGL_ES3_1_ANDROID]

Location: <Workspace>/Engine/Config/VulkanPC/DataDrivenPlatformInfo.ini:20, section: [ShaderPlatform VULKAN_SM5]

Location: <Workspace>/Engine/Config/VulkanPC/DataDrivenPlatformInfo.ini:151, section: [ShaderPlatform VULKAN_SM6]

#References in C++ code

#Callsites

This variable is referenced in the following C++ source code:

#Loc: <Workspace>/Engine/Source/Runtime/RHI/Private/DataDrivenShaderPlatformInfo.cpp:202

Scope (from outer to inner):

file
function     void FGenericDataDrivenShaderPlatformInfo::ParseDataDrivenShaderInfo

Source code excerpt:

	GET_SECTION_BOOL_HELPER(bIsPC);
	GET_SECTION_BOOL_HELPER(bIsConsole);
	GET_SECTION_BOOL_HELPER(bIsAndroidOpenGLES);
	GET_SECTION_BOOL_HELPER(bSupportsDebugViewShaders);
	GET_SECTION_BOOL_HELPER(bSupportsMobileMultiView);
	GET_SECTION_BOOL_HELPER(bSupportsArrayTextureCompression);
	GET_SECTION_BOOL_HELPER(bSupportsDistanceFields);
	GET_SECTION_BOOL_HELPER(bSupportsDiaphragmDOF);
	GET_SECTION_BOOL_HELPER(bSupportsRGBColorBuffer);

#Loc: <Workspace>/Engine/Source/Runtime/RHI/Public/DataDrivenShaderPlatformInfo.h:27

Scope (from outer to inner):

file
class        class FGenericDataDrivenShaderPlatformInfo

Source code excerpt:

	uint32 bIsPC : 1;
	uint32 bIsConsole : 1;
	uint32 bIsAndroidOpenGLES : 1;

	uint32 bSupportsDebugViewShaders : 1;
	uint32 bSupportsMobileMultiView : 1;
	uint32 bSupportsArrayTextureCompression : 1;
	uint32 bSupportsDistanceFields : 1; // used for DFShadows and DFAO - since they had the same checks
	uint32 bSupportsDiaphragmDOF : 1;

#Loc: <Workspace>/Engine/Source/Runtime/RHI/Public/DataDrivenShaderPlatformInfo.h:227

Scope (from outer to inner):

file
class        class FGenericDataDrivenShaderPlatformInfo
function     static const bool GetIsAndroidOpenGLES

Source code excerpt:

	{
		check(IsValid(Platform));
		return Infos[Platform].bIsAndroidOpenGLES;
	}

	static FORCEINLINE_DEBUGGABLE const bool GetSupportsDebugViewShaders(const FStaticShaderPlatform Platform)
	{
		check(IsValid(Platform));
		return Infos[Platform].bSupportsDebugViewShaders;