media/docs/doc/reference/com/google/android/exoplayer2/util/GlUtil.html
michaelkatz 6f1cf6dab4 Update JavaDoc for exoplayer:2.18.2
#minor-release

PiperOrigin-RevId: 490202192
2022-11-22 12:06:09 +00:00

1085 lines
68 KiB
HTML

<!DOCTYPE HTML>
<!-- NewPage -->
<html lang="en">
<head><!-- start favicons snippet, use https://realfavicongenerator.net/ --><link rel="apple-touch-icon" sizes="180x180" href="/assets/apple-touch-icon.png"><link rel="icon" type="image/png" sizes="32x32" href="/assets/favicon-32x32.png"><link rel="icon" type="image/png" sizes="16x16" href="/assets/favicon-16x16.png"><link rel="manifest" href="/assets/site.webmanifest"><link rel="mask-icon" href="/assets/safari-pinned-tab.svg" color="#fc4d50"><link rel="shortcut icon" href="/assets/favicon.ico"><meta name="msapplication-TileColor" content="#ffc40d"><meta name="msapplication-config" content="/assets/browserconfig.xml"><meta name="theme-color" content="#ffffff"><!-- end favicons snippet -->
<title>GlUtil (ExoPlayer library)</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../../jquery/jquery-ui.css" title="Style">
<script type="text/javascript" src="../../../../../script.js"></script>
<script type="text/javascript" src="../../../../../jquery/jszip/dist/jszip.min.js"></script>
<script type="text/javascript" src="../../../../../jquery/jszip-utils/dist/jszip-utils.min.js"></script>
<!--[if IE]>
<script type="text/javascript" src="../../../../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script>
<![endif]-->
<script type="text/javascript" src="../../../../../jquery/jquery-3.5.1.js"></script>
<script type="text/javascript" src="../../../../../jquery/jquery-ui.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="GlUtil (ExoPlayer library)";
}
}
catch(err) {
}
//-->
var data = {"i0":9,"i1":9,"i2":9,"i3":9,"i4":9,"i5":9,"i6":9,"i7":9,"i8":9,"i9":9,"i10":9,"i11":9,"i12":9,"i13":9,"i14":9,"i15":9,"i16":9,"i17":9,"i18":9,"i19":9,"i20":9,"i21":9,"i22":9,"i23":9,"i24":9,"i25":9,"i26":9,"i27":9};
var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
var pathtoroot = "../../../../../";
var useModuleDirectories = false;
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<header role="banner">
<nav role="navigation">
<div class="fixedNav">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a id="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../allclasses.html">All&nbsp;Classes</a></li>
</ul>
<ul class="navListSearch">
<li><label for="search">SEARCH:</label>
<input type="text" id="search" value="search" disabled="disabled">
<input type="reset" id="reset" value="reset" disabled="disabled">
</li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li><a href="#nested.class.summary">Nested</a>&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a id="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
</div>
<div class="navPadding">&nbsp;</div>
<script type="text/javascript"><!--
$('.navPadding').css('padding-top', $('.fixedNav').css("height"));
//-->
</script>
</nav>
</header>
<!-- ======== START OF CLASS DATA ======== -->
<main role="main">
<div class="header">
<div class="subTitle"><span class="packageLabelInType">Package</span>&nbsp;<a href="package-summary.html">com.google.android.exoplayer2.util</a></div>
<h2 title="Class GlUtil" class="title">Class GlUtil</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="https://developer.android.com/reference/java/lang/Object.html" title="class or interface in java.lang" class="externalLink" target="_top">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li>com.google.android.exoplayer2.util.GlUtil</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<pre>public final class <span class="typeNameLabel">GlUtil</span>
extends <a href="https://developer.android.com/reference/java/lang/Object.html" title="class or interface in java.lang" class="externalLink" target="_top">Object</a></pre>
<div class="block">OpenGL ES utilities.</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== NESTED CLASS SUMMARY ======== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="nested.class.summary">
<!-- -->
</a>
<h3>Nested Class Summary</h3>
<table class="memberSummary">
<caption><span>Nested Classes</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Class</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static class&nbsp;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="GlUtil.GlException.html" title="class in com.google.android.exoplayer2.util">GlUtil.GlException</a></span></code></th>
<td class="colLast">
<div class="block">Thrown when an OpenGL error occurs.</div>
</td>
</tr>
</table>
</li>
</ul>
</section>
<!-- =========== FIELD SUMMARY =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="field.summary">
<!-- -->
</a>
<h3>Field Summary</h3>
<table class="memberSummary">
<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Field</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int[]</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#EGL_CONFIG_ATTRIBUTES_RGBA_1010102">EGL_CONFIG_ATTRIBUTES_RGBA_1010102</a></span></code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int[]</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#EGL_CONFIG_ATTRIBUTES_RGBA_8888">EGL_CONFIG_ATTRIBUTES_RGBA_8888</a></span></code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#HOMOGENEOUS_COORDINATE_VECTOR_SIZE">HOMOGENEOUS_COORDINATE_VECTOR_SIZE</a></span></code></th>
<td class="colLast">
<div class="block">Number of elements in a 3d homogeneous coordinate vector describing a vertex.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static float</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#LENGTH_NDC">LENGTH_NDC</a></span></code></th>
<td class="colLast">
<div class="block">Length of the normalized device coordinate (NDC) space, which spans from -1 to 1.</div>
</td>
</tr>
</table>
</li>
</ul>
</section>
<!-- ========== METHOD SUMMARY =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Method</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>static void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#bindTexture(int,int)">bindTexture</a></span>&#8203;(int&nbsp;textureTarget,
int&nbsp;texId)</code></th>
<td class="colLast">
<div class="block">Binds the texture of the given type with default configuration of GL_LINEAR filtering and
GL_CLAMP_TO_EDGE wrapping.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>static void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#checkGlError()">checkGlError</a></span>()</code></th>
<td class="colLast">
<div class="block">Collects all OpenGL errors that occurred since this method was last called and throws a <a href="GlUtil.GlException.html" title="class in com.google.android.exoplayer2.util"><code>GlUtil.GlException</code></a> with the combined error message.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>static void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#checkGlException(boolean,java.lang.String)">checkGlException</a></span>&#8203;(boolean&nbsp;expression,
<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a>&nbsp;errorMessage)</code></th>
<td class="colLast">
<div class="block">Throws a <a href="GlUtil.GlException.html" title="class in com.google.android.exoplayer2.util"><code>GlUtil.GlException</code></a> with the given message if <code>expression</code> evaluates to <code>
false</code>.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>static void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#clearOutputFrame()">clearOutputFrame</a></span>()</code></th>
<td class="colLast">
<div class="block">Fills the pixels in the current output render target with (r=0, g=0, b=0, a=0).</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>static float[]</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#create4x4IdentityMatrix()">create4x4IdentityMatrix</a></span>()</code></th>
<td class="colLast">
<div class="block">Creates a 4x4 identity matrix.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>static <a href="https://developer.android.com/reference/java/nio/FloatBuffer.html" title="class or interface in java.nio" class="externalLink" target="_top">FloatBuffer</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#createBuffer(float%5B%5D)">createBuffer</a></span>&#8203;(float[]&nbsp;data)</code></th>
<td class="colLast">
<div class="block">Allocates a FloatBuffer with the given data.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>static <a href="https://developer.android.com/reference/android/opengl/EGLContext.html" title="class or interface in android.opengl" class="externalLink" target="_top">EGLContext</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#createEglContext(android.opengl.EGLDisplay)">createEglContext</a></span>&#8203;(<a href="https://developer.android.com/reference/android/opengl/EGLDisplay.html" title="class or interface in android.opengl" class="externalLink" target="_top">EGLDisplay</a>&nbsp;eglDisplay)</code></th>
<td class="colLast">
<div class="block">Creates a new <a href="https://developer.android.com/reference/android/opengl/EGLContext.html" title="class or interface in android.opengl" class="externalLink"><code>EGLContext</code></a> for the specified <a href="https://developer.android.com/reference/android/opengl/EGLDisplay.html?is-external=true" title="class or interface in android.opengl" class="externalLink" target="_top"><code>EGLDisplay</code></a>.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>static <a href="https://developer.android.com/reference/android/opengl/EGLContext.html" title="class or interface in android.opengl" class="externalLink" target="_top">EGLContext</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#createEglContext(android.opengl.EGLDisplay,int%5B%5D)">createEglContext</a></span>&#8203;(<a href="https://developer.android.com/reference/android/opengl/EGLDisplay.html" title="class or interface in android.opengl" class="externalLink" target="_top">EGLDisplay</a>&nbsp;eglDisplay,
int[]&nbsp;configAttributes)</code></th>
<td class="colLast">
<div class="block">Creates a new <a href="https://developer.android.com/reference/android/opengl/EGLContext.html" title="class or interface in android.opengl" class="externalLink"><code>EGLContext</code></a> for the specified <a href="https://developer.android.com/reference/android/opengl/EGLDisplay.html?is-external=true" title="class or interface in android.opengl" class="externalLink" target="_top"><code>EGLDisplay</code></a>.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>static <a href="https://developer.android.com/reference/android/opengl/EGLDisplay.html" title="class or interface in android.opengl" class="externalLink" target="_top">EGLDisplay</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#createEglDisplay()">createEglDisplay</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns an initialized default <a href="https://developer.android.com/reference/android/opengl/EGLDisplay.html" title="class or interface in android.opengl" class="externalLink" target="_top"><code>EGLDisplay</code></a>.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#createExternalTexture()">createExternalTexture</a></span>()</code></th>
<td class="colLast">
<div class="block">Creates a GL_TEXTURE_EXTERNAL_OES with default configuration of GL_LINEAR filtering and
GL_CLAMP_TO_EDGE wrapping.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#createFboForTexture(int)">createFboForTexture</a></span>&#8203;(int&nbsp;texId)</code></th>
<td class="colLast">
<div class="block">Returns a new framebuffer for the texture.</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>static <a href="https://developer.android.com/reference/android/opengl/EGLSurface.html" title="class or interface in android.opengl" class="externalLink" target="_top">EGLSurface</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#createFocusedPlaceholderEglSurface(android.opengl.EGLContext,android.opengl.EGLDisplay,int%5B%5D)">createFocusedPlaceholderEglSurface</a></span>&#8203;(<a href="https://developer.android.com/reference/android/opengl/EGLContext.html" title="class or interface in android.opengl" class="externalLink" target="_top">EGLContext</a>&nbsp;eglContext,
<a href="https://developer.android.com/reference/android/opengl/EGLDisplay.html" title="class or interface in android.opengl" class="externalLink" target="_top">EGLDisplay</a>&nbsp;eglDisplay,
int[]&nbsp;configAttributes)</code></th>
<td class="colLast">
<div class="block">Creates and focuses a placeholder <a href="https://developer.android.com/reference/android/opengl/EGLSurface.html" title="class or interface in android.opengl" class="externalLink" target="_top"><code>EGLSurface</code></a>.</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#createTexture(int,int,boolean)">createTexture</a></span>&#8203;(int&nbsp;width,
int&nbsp;height,
boolean&nbsp;useHighPrecisionColorComponents)</code></th>
<td class="colLast">
<div class="block">Allocates a new RGBA texture with the specified dimensions and color component precision.</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code>static float[]</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#createVertexBuffer(java.util.List)">createVertexBuffer</a></span>&#8203;(<a href="https://developer.android.com/reference/java/util/List.html" title="class or interface in java.util" class="externalLink" target="_top">List</a>&lt;float[]&gt;&nbsp;vertexList)</code></th>
<td class="colLast">
<div class="block">Flattens the list of 4 element NDC coordinate vectors into a buffer.</div>
</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code>static void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#deleteTexture(int)">deleteTexture</a></span>&#8203;(int&nbsp;textureId)</code></th>
<td class="colLast">
<div class="block">Deletes a GL texture.</div>
</td>
</tr>
<tr id="i15" class="rowColor">
<td class="colFirst"><code>static void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#destroyEglContext(android.opengl.EGLDisplay,android.opengl.EGLContext)">destroyEglContext</a></span>&#8203;(<a href="https://developer.android.com/reference/android/opengl/EGLDisplay.html" title="class or interface in android.opengl" class="externalLink" target="_top">EGLDisplay</a>&nbsp;eglDisplay,
<a href="https://developer.android.com/reference/android/opengl/EGLContext.html" title="class or interface in android.opengl" class="externalLink" target="_top">EGLContext</a>&nbsp;eglContext)</code></th>
<td class="colLast">
<div class="block">Destroys the <a href="https://developer.android.com/reference/android/opengl/EGLContext.html" title="class or interface in android.opengl" class="externalLink"><code>EGLContext</code></a> identified by the provided <a href="https://developer.android.com/reference/android/opengl/EGLDisplay.html?is-external=true" title="class or interface in android.opengl" class="externalLink"><code>EGLDisplay</code></a> and <a href="https://developer.android.com/reference/android/opengl/EGLContext.html?is-external=true" title="class or interface in android.opengl" class="externalLink" target="_top"><code>EGLContext</code></a>.</div>
</td>
</tr>
<tr id="i16" class="altColor">
<td class="colFirst"><code>static void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#focusEglSurface(android.opengl.EGLDisplay,android.opengl.EGLContext,android.opengl.EGLSurface,int,int)">focusEglSurface</a></span>&#8203;(<a href="https://developer.android.com/reference/android/opengl/EGLDisplay.html" title="class or interface in android.opengl" class="externalLink" target="_top">EGLDisplay</a>&nbsp;eglDisplay,
<a href="https://developer.android.com/reference/android/opengl/EGLContext.html" title="class or interface in android.opengl" class="externalLink" target="_top">EGLContext</a>&nbsp;eglContext,
<a href="https://developer.android.com/reference/android/opengl/EGLSurface.html" title="class or interface in android.opengl" class="externalLink" target="_top">EGLSurface</a>&nbsp;eglSurface,
int&nbsp;width,
int&nbsp;height)</code></th>
<td class="colLast">
<div class="block">Makes the specified <code>eglSurface</code> the render target, using a viewport of <code>width</code> by
<code>height</code> pixels.</div>
</td>
</tr>
<tr id="i17" class="rowColor">
<td class="colFirst"><code>static void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#focusFramebuffer(android.opengl.EGLDisplay,android.opengl.EGLContext,android.opengl.EGLSurface,int,int,int)">focusFramebuffer</a></span>&#8203;(<a href="https://developer.android.com/reference/android/opengl/EGLDisplay.html" title="class or interface in android.opengl" class="externalLink" target="_top">EGLDisplay</a>&nbsp;eglDisplay,
<a href="https://developer.android.com/reference/android/opengl/EGLContext.html" title="class or interface in android.opengl" class="externalLink" target="_top">EGLContext</a>&nbsp;eglContext,
<a href="https://developer.android.com/reference/android/opengl/EGLSurface.html" title="class or interface in android.opengl" class="externalLink" target="_top">EGLSurface</a>&nbsp;eglSurface,
int&nbsp;framebuffer,
int&nbsp;width,
int&nbsp;height)</code></th>
<td class="colLast">
<div class="block">Makes the specified <code>framebuffer</code> the render target, using a viewport of <code>width</code> by
<code>height</code> pixels.</div>
</td>
</tr>
<tr id="i18" class="altColor">
<td class="colFirst"><code>static void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#focusFramebufferUsingCurrentContext(int,int,int)">focusFramebufferUsingCurrentContext</a></span>&#8203;(int&nbsp;framebuffer,
int&nbsp;width,
int&nbsp;height)</code></th>
<td class="colLast">
<div class="block">Makes the specified <code>framebuffer</code> the render target, using a viewport of <code>width</code> by
<code>height</code> pixels.</div>
</td>
</tr>
<tr id="i19" class="rowColor">
<td class="colFirst"><code>static <a href="https://developer.android.com/reference/android/opengl/EGLSurface.html" title="class or interface in android.opengl" class="externalLink" target="_top">EGLSurface</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#focusPlaceholderEglSurface(android.opengl.EGLContext,android.opengl.EGLDisplay)">focusPlaceholderEglSurface</a></span>&#8203;(<a href="https://developer.android.com/reference/android/opengl/EGLContext.html" title="class or interface in android.opengl" class="externalLink" target="_top">EGLContext</a>&nbsp;eglContext,
<a href="https://developer.android.com/reference/android/opengl/EGLDisplay.html" title="class or interface in android.opengl" class="externalLink" target="_top">EGLDisplay</a>&nbsp;eglDisplay)</code></th>
<td class="colLast">
<div class="block">Creates and focuses a placeholder <a href="https://developer.android.com/reference/android/opengl/EGLSurface.html" title="class or interface in android.opengl" class="externalLink" target="_top"><code>EGLSurface</code></a>.</div>
</td>
</tr>
<tr id="i20" class="altColor">
<td class="colFirst"><code>static <a href="https://developer.android.com/reference/android/opengl/EGLSurface.html" title="class or interface in android.opengl" class="externalLink" target="_top">EGLSurface</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getEglSurface(android.opengl.EGLDisplay,java.lang.Object)">getEglSurface</a></span>&#8203;(<a href="https://developer.android.com/reference/android/opengl/EGLDisplay.html" title="class or interface in android.opengl" class="externalLink" target="_top">EGLDisplay</a>&nbsp;eglDisplay,
<a href="https://developer.android.com/reference/java/lang/Object.html" title="class or interface in java.lang" class="externalLink" target="_top">Object</a>&nbsp;surface)</code></th>
<td class="colLast">
<div class="block">Returns a new <a href="https://developer.android.com/reference/android/opengl/EGLSurface.html" title="class or interface in android.opengl" class="externalLink" target="_top"><code>EGLSurface</code></a> wrapping the specified <code>surface</code>.</div>
</td>
</tr>
<tr id="i21" class="rowColor">
<td class="colFirst"><code>static <a href="https://developer.android.com/reference/android/opengl/EGLSurface.html" title="class or interface in android.opengl" class="externalLink" target="_top">EGLSurface</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getEglSurface(android.opengl.EGLDisplay,java.lang.Object,int%5B%5D)">getEglSurface</a></span>&#8203;(<a href="https://developer.android.com/reference/android/opengl/EGLDisplay.html" title="class or interface in android.opengl" class="externalLink" target="_top">EGLDisplay</a>&nbsp;eglDisplay,
<a href="https://developer.android.com/reference/java/lang/Object.html" title="class or interface in java.lang" class="externalLink" target="_top">Object</a>&nbsp;surface,
int[]&nbsp;configAttributes)</code></th>
<td class="colLast">
<div class="block">Returns a new <a href="https://developer.android.com/reference/android/opengl/EGLSurface.html" title="class or interface in android.opengl" class="externalLink" target="_top"><code>EGLSurface</code></a> wrapping the specified <code>surface</code>.</div>
</td>
</tr>
<tr id="i22" class="altColor">
<td class="colFirst"><code>static float[]</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getNormalizedCoordinateBounds()">getNormalizedCoordinateBounds</a></span>()</code></th>
<td class="colLast">
<div class="block">Bounds of normalized device coordinates, commonly used for defining viewport boundaries.</div>
</td>
</tr>
<tr id="i23" class="rowColor">
<td class="colFirst"><code>static float[]</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getTextureCoordinateBounds()">getTextureCoordinateBounds</a></span>()</code></th>
<td class="colLast">
<div class="block">Typical bounds used for sampling from textures.</div>
</td>
</tr>
<tr id="i24" class="altColor">
<td class="colFirst"><code>static boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isProtectedContentExtensionSupported(android.content.Context)">isProtectedContentExtensionSupported</a></span>&#8203;(<a href="https://developer.android.com/reference/android/content/Context.html" title="class or interface in android.content" class="externalLink" target="_top">Context</a>&nbsp;context)</code></th>
<td class="colLast">
<div class="block">Returns whether creating a GL context with <a href="#EXTENSION_PROTECTED_CONTENT">"EGL_EXT_protected_content"</a> is possible.</div>
</td>
</tr>
<tr id="i25" class="rowColor">
<td class="colFirst"><code>static boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isSurfacelessContextExtensionSupported()">isSurfacelessContextExtensionSupported</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns whether the <a href="#EXTENSION_SURFACELESS_CONTEXT">"EGL_KHR_surfaceless_context"</a> extension is supported.</div>
</td>
</tr>
<tr id="i26" class="altColor">
<td class="colFirst"><code>static boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isYuvTargetExtensionSupported()">isYuvTargetExtensionSupported</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns whether the <a href="#EXTENSION_YUV_TARGET">"GL_EXT_YUV_target"</a> extension is supported.</div>
</td>
</tr>
<tr id="i27" class="rowColor">
<td class="colFirst"><code>static void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setToIdentity(float%5B%5D)">setToIdentity</a></span>&#8203;(float[]&nbsp;matrix)</code></th>
<td class="colLast">
<div class="block">Sets the input <code>matrix</code> to an identity matrix.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.<a href="https://developer.android.com/reference/java/lang/Object.html" title="class or interface in java.lang" class="externalLink" target="_top">Object</a></h3>
<code><a href="https://developer.android.com/reference/java/lang/Object.html#clone()" title="class or interface in java.lang" class="externalLink">clone</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang" class="externalLink">equals</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang" class="externalLink">finalize</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang" class="externalLink">getClass</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang" class="externalLink">hashCode</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang" class="externalLink">notify</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang" class="externalLink">notifyAll</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang" class="externalLink">toString</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang" class="externalLink">wait</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang" class="externalLink">wait</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#wait(long,int)" title="class or interface in java.lang" class="externalLink" target="_top">wait</a></code></li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="field.detail">
<!-- -->
</a>
<h3>Field Detail</h3>
<a id="HOMOGENEOUS_COORDINATE_VECTOR_SIZE">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>HOMOGENEOUS_COORDINATE_VECTOR_SIZE</h4>
<pre>public static final&nbsp;int HOMOGENEOUS_COORDINATE_VECTOR_SIZE</pre>
<div class="block">Number of elements in a 3d homogeneous coordinate vector describing a vertex.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#com.google.android.exoplayer2.util.GlUtil.HOMOGENEOUS_COORDINATE_VECTOR_SIZE">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="LENGTH_NDC">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>LENGTH_NDC</h4>
<pre>public static final&nbsp;float LENGTH_NDC</pre>
<div class="block">Length of the normalized device coordinate (NDC) space, which spans from -1 to 1.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#com.google.android.exoplayer2.util.GlUtil.LENGTH_NDC">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="EGL_CONFIG_ATTRIBUTES_RGBA_8888">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>EGL_CONFIG_ATTRIBUTES_RGBA_8888</h4>
<pre>public static final&nbsp;int[] EGL_CONFIG_ATTRIBUTES_RGBA_8888</pre>
</li>
</ul>
<a id="EGL_CONFIG_ATTRIBUTES_RGBA_1010102">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>EGL_CONFIG_ATTRIBUTES_RGBA_1010102</h4>
<pre>public static final&nbsp;int[] EGL_CONFIG_ATTRIBUTES_RGBA_1010102</pre>
</li>
</ul>
</li>
</ul>
</section>
<!-- ============ METHOD DETAIL ========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a id="getNormalizedCoordinateBounds()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getNormalizedCoordinateBounds</h4>
<pre class="methodSignature">public static&nbsp;float[]&nbsp;getNormalizedCoordinateBounds()</pre>
<div class="block">Bounds of normalized device coordinates, commonly used for defining viewport boundaries.</div>
</li>
</ul>
<a id="getTextureCoordinateBounds()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getTextureCoordinateBounds</h4>
<pre class="methodSignature">public static&nbsp;float[]&nbsp;getTextureCoordinateBounds()</pre>
<div class="block">Typical bounds used for sampling from textures.</div>
</li>
</ul>
<a id="create4x4IdentityMatrix()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>create4x4IdentityMatrix</h4>
<pre class="methodSignature">public static&nbsp;float[]&nbsp;create4x4IdentityMatrix()</pre>
<div class="block">Creates a 4x4 identity matrix.</div>
</li>
</ul>
<a id="setToIdentity(float[])">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setToIdentity</h4>
<pre class="methodSignature">public static&nbsp;void&nbsp;setToIdentity&#8203;(float[]&nbsp;matrix)</pre>
<div class="block">Sets the input <code>matrix</code> to an identity matrix.</div>
</li>
</ul>
<a id="createVertexBuffer(java.util.List)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createVertexBuffer</h4>
<pre class="methodSignature">public static&nbsp;float[]&nbsp;createVertexBuffer&#8203;(<a href="https://developer.android.com/reference/java/util/List.html" title="class or interface in java.util" class="externalLink" target="_top">List</a>&lt;float[]&gt;&nbsp;vertexList)</pre>
<div class="block">Flattens the list of 4 element NDC coordinate vectors into a buffer.</div>
</li>
</ul>
<a id="isProtectedContentExtensionSupported(android.content.Context)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isProtectedContentExtensionSupported</h4>
<pre class="methodSignature">public static&nbsp;boolean&nbsp;isProtectedContentExtensionSupported&#8203;(<a href="https://developer.android.com/reference/android/content/Context.html" title="class or interface in android.content" class="externalLink" target="_top">Context</a>&nbsp;context)</pre>
<div class="block">Returns whether creating a GL context with <a href="#EXTENSION_PROTECTED_CONTENT">"EGL_EXT_protected_content"</a> is possible.
<p>If <code>true</code>, the device supports a protected output path for DRM content when using GL.</div>
</li>
</ul>
<a id="isSurfacelessContextExtensionSupported()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isSurfacelessContextExtensionSupported</h4>
<pre class="methodSignature">public static&nbsp;boolean&nbsp;isSurfacelessContextExtensionSupported()</pre>
<div class="block">Returns whether the <a href="#EXTENSION_SURFACELESS_CONTEXT">"EGL_KHR_surfaceless_context"</a> extension is supported.
<p>This extension allows passing <a href="https://developer.android.com/reference/android/opengl/EGL14.html#EGL_NO_SURFACE" title="class or interface in android.opengl" class="externalLink" target="_top"><code>EGL14.EGL_NO_SURFACE</code></a> for both the write and read
surfaces in a call to <a href="https://developer.android.com/reference/android/opengl/EGL14.html#eglMakeCurrent(android.opengl.EGLDisplay,android.opengl.EGLSurface,android.opengl.EGLSurface,android.opengl.EGLContext)" title="class or interface in android.opengl" class="externalLink" target="_top"><code>EGL14.eglMakeCurrent(EGLDisplay, EGLSurface, EGLSurface,
EGLContext)</code></a>.</div>
</li>
</ul>
<a id="isYuvTargetExtensionSupported()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isYuvTargetExtensionSupported</h4>
<pre class="methodSignature">public static&nbsp;boolean&nbsp;isYuvTargetExtensionSupported()</pre>
<div class="block">Returns whether the <a href="#EXTENSION_YUV_TARGET">"GL_EXT_YUV_target"</a> extension is supported.
<p>This extension allows sampling raw YUV values from an external texture, which is required
for HDR.</div>
</li>
</ul>
<a id="createEglDisplay()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createEglDisplay</h4>
<pre class="methodSignature">@RequiresApi(17)
public static&nbsp;<a href="https://developer.android.com/reference/android/opengl/EGLDisplay.html" title="class or interface in android.opengl" class="externalLink" target="_top">EGLDisplay</a>&nbsp;createEglDisplay()
throws <a href="GlUtil.GlException.html" title="class in com.google.android.exoplayer2.util">GlUtil.GlException</a></pre>
<div class="block">Returns an initialized default <a href="https://developer.android.com/reference/android/opengl/EGLDisplay.html" title="class or interface in android.opengl" class="externalLink" target="_top"><code>EGLDisplay</code></a>.</div>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="GlUtil.GlException.html" title="class in com.google.android.exoplayer2.util">GlUtil.GlException</a></code></dd>
</dl>
</li>
</ul>
<a id="createEglContext(android.opengl.EGLDisplay)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createEglContext</h4>
<pre class="methodSignature">@RequiresApi(17)
public static&nbsp;<a href="https://developer.android.com/reference/android/opengl/EGLContext.html" title="class or interface in android.opengl" class="externalLink">EGLContext</a>&nbsp;createEglContext&#8203;(<a href="https://developer.android.com/reference/android/opengl/EGLDisplay.html?is-external=true" title="class or interface in android.opengl" class="externalLink" target="_top">EGLDisplay</a>&nbsp;eglDisplay)
throws <a href="GlUtil.GlException.html" title="class in com.google.android.exoplayer2.util">GlUtil.GlException</a></pre>
<div class="block">Creates a new <a href="https://developer.android.com/reference/android/opengl/EGLContext.html" title="class or interface in android.opengl" class="externalLink"><code>EGLContext</code></a> for the specified <a href="https://developer.android.com/reference/android/opengl/EGLDisplay.html?is-external=true" title="class or interface in android.opengl" class="externalLink" target="_top"><code>EGLDisplay</code></a>.
<p>Configures the <a href="https://developer.android.com/reference/android/opengl/EGLContext.html" title="class or interface in android.opengl" class="externalLink"><code>EGLContext</code></a> with <a href="#EGL_CONFIG_ATTRIBUTES_RGBA_8888" target="_top"><code>EGL_CONFIG_ATTRIBUTES_RGBA_8888</code></a> and OpenGL
ES 2.0.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>eglDisplay</code> - The <a href="https://developer.android.com/reference/android/opengl/EGLDisplay.html" title="class or interface in android.opengl" class="externalLink"><code>EGLDisplay</code></a> to create an <a href="https://developer.android.com/reference/android/opengl/EGLContext.html?is-external=true" title="class or interface in android.opengl" class="externalLink" target="_top"><code>EGLContext</code></a> for.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="GlUtil.GlException.html" title="class in com.google.android.exoplayer2.util">GlUtil.GlException</a></code></dd>
</dl>
</li>
</ul>
<a id="createEglContext(android.opengl.EGLDisplay,int[])">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createEglContext</h4>
<pre class="methodSignature">@RequiresApi(17)
public static&nbsp;<a href="https://developer.android.com/reference/android/opengl/EGLContext.html" title="class or interface in android.opengl" class="externalLink">EGLContext</a>&nbsp;createEglContext&#8203;(<a href="https://developer.android.com/reference/android/opengl/EGLDisplay.html?is-external=true" title="class or interface in android.opengl" class="externalLink" target="_top">EGLDisplay</a>&nbsp;eglDisplay,
int[]&nbsp;configAttributes)
throws <a href="GlUtil.GlException.html" title="class in com.google.android.exoplayer2.util">GlUtil.GlException</a></pre>
<div class="block">Creates a new <a href="https://developer.android.com/reference/android/opengl/EGLContext.html" title="class or interface in android.opengl" class="externalLink"><code>EGLContext</code></a> for the specified <a href="https://developer.android.com/reference/android/opengl/EGLDisplay.html?is-external=true" title="class or interface in android.opengl" class="externalLink" target="_top"><code>EGLDisplay</code></a>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>eglDisplay</code> - The <a href="https://developer.android.com/reference/android/opengl/EGLDisplay.html" title="class or interface in android.opengl" class="externalLink"><code>EGLDisplay</code></a> to create an <a href="https://developer.android.com/reference/android/opengl/EGLContext.html?is-external=true" title="class or interface in android.opengl" class="externalLink" target="_top"><code>EGLContext</code></a> for.</dd>
<dd><code>configAttributes</code> - The attributes to configure EGL with. Accepts either <a href="#EGL_CONFIG_ATTRIBUTES_RGBA_1010102"><code>EGL_CONFIG_ATTRIBUTES_RGBA_1010102</code></a>, which will request OpenGL ES 3.0, or <a href="#EGL_CONFIG_ATTRIBUTES_RGBA_8888"><code>EGL_CONFIG_ATTRIBUTES_RGBA_8888</code></a>, which will request OpenGL ES 2.0.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="GlUtil.GlException.html" title="class in com.google.android.exoplayer2.util">GlUtil.GlException</a></code></dd>
</dl>
</li>
</ul>
<a id="getEglSurface(android.opengl.EGLDisplay,java.lang.Object)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getEglSurface</h4>
<pre class="methodSignature">@RequiresApi(17)
public static&nbsp;<a href="https://developer.android.com/reference/android/opengl/EGLSurface.html" title="class or interface in android.opengl" class="externalLink">EGLSurface</a>&nbsp;getEglSurface&#8203;(<a href="https://developer.android.com/reference/android/opengl/EGLDisplay.html?is-external=true" title="class or interface in android.opengl" class="externalLink" target="_top">EGLDisplay</a>&nbsp;eglDisplay,
<a href="https://developer.android.com/reference/java/lang/Object.html" title="class or interface in java.lang" class="externalLink" target="_top">Object</a>&nbsp;surface)
throws <a href="GlUtil.GlException.html" title="class in com.google.android.exoplayer2.util">GlUtil.GlException</a></pre>
<div class="block">Returns a new <a href="https://developer.android.com/reference/android/opengl/EGLSurface.html" title="class or interface in android.opengl" class="externalLink" target="_top"><code>EGLSurface</code></a> wrapping the specified <code>surface</code>.
<p>The <a href="https://developer.android.com/reference/android/opengl/EGLSurface.html" title="class or interface in android.opengl" class="externalLink"><code>EGLSurface</code></a> will configure with <a href="#EGL_CONFIG_ATTRIBUTES_RGBA_8888" target="_top"><code>EGL_CONFIG_ATTRIBUTES_RGBA_8888</code></a> and
OpenGL ES 2.0.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>eglDisplay</code> - The <a href="https://developer.android.com/reference/android/opengl/EGLDisplay.html" title="class or interface in android.opengl" class="externalLink" target="_top"><code>EGLDisplay</code></a> to attach the surface to.</dd>
<dd><code>surface</code> - The surface to wrap; must be a surface, surface texture or surface holder.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="GlUtil.GlException.html" title="class in com.google.android.exoplayer2.util">GlUtil.GlException</a></code></dd>
</dl>
</li>
</ul>
<a id="getEglSurface(android.opengl.EGLDisplay,java.lang.Object,int[])">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getEglSurface</h4>
<pre class="methodSignature">@RequiresApi(17)
public static&nbsp;<a href="https://developer.android.com/reference/android/opengl/EGLSurface.html" title="class or interface in android.opengl" class="externalLink">EGLSurface</a>&nbsp;getEglSurface&#8203;(<a href="https://developer.android.com/reference/android/opengl/EGLDisplay.html?is-external=true" title="class or interface in android.opengl" class="externalLink" target="_top">EGLDisplay</a>&nbsp;eglDisplay,
<a href="https://developer.android.com/reference/java/lang/Object.html" title="class or interface in java.lang" class="externalLink" target="_top">Object</a>&nbsp;surface,
int[]&nbsp;configAttributes)
throws <a href="GlUtil.GlException.html" title="class in com.google.android.exoplayer2.util">GlUtil.GlException</a></pre>
<div class="block">Returns a new <a href="https://developer.android.com/reference/android/opengl/EGLSurface.html" title="class or interface in android.opengl" class="externalLink" target="_top"><code>EGLSurface</code></a> wrapping the specified <code>surface</code>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>eglDisplay</code> - The <a href="https://developer.android.com/reference/android/opengl/EGLDisplay.html" title="class or interface in android.opengl" class="externalLink" target="_top"><code>EGLDisplay</code></a> to attach the surface to.</dd>
<dd><code>surface</code> - The surface to wrap; must be a surface, surface texture or surface holder.</dd>
<dd><code>configAttributes</code> - The attributes to configure EGL with. Accepts <a href="#EGL_CONFIG_ATTRIBUTES_RGBA_1010102"><code>EGL_CONFIG_ATTRIBUTES_RGBA_1010102</code></a> and <a href="#EGL_CONFIG_ATTRIBUTES_RGBA_8888"><code>EGL_CONFIG_ATTRIBUTES_RGBA_8888</code></a>.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="GlUtil.GlException.html" title="class in com.google.android.exoplayer2.util">GlUtil.GlException</a></code></dd>
</dl>
</li>
</ul>
<a id="focusPlaceholderEglSurface(android.opengl.EGLContext,android.opengl.EGLDisplay)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>focusPlaceholderEglSurface</h4>
<pre class="methodSignature">@RequiresApi(17)
public static&nbsp;<a href="https://developer.android.com/reference/android/opengl/EGLSurface.html" title="class or interface in android.opengl" class="externalLink">EGLSurface</a>&nbsp;focusPlaceholderEglSurface&#8203;(<a href="https://developer.android.com/reference/android/opengl/EGLContext.html?is-external=true" title="class or interface in android.opengl" class="externalLink" target="_top">EGLContext</a>&nbsp;eglContext,
<a href="https://developer.android.com/reference/android/opengl/EGLDisplay.html" title="class or interface in android.opengl" class="externalLink" target="_top">EGLDisplay</a>&nbsp;eglDisplay)
throws <a href="GlUtil.GlException.html" title="class in com.google.android.exoplayer2.util">GlUtil.GlException</a></pre>
<div class="block">Creates and focuses a placeholder <a href="https://developer.android.com/reference/android/opengl/EGLSurface.html" title="class or interface in android.opengl" class="externalLink" target="_top"><code>EGLSurface</code></a>.
<p>This makes a <a href="https://developer.android.com/reference/android/opengl/EGLContext.html" title="class or interface in android.opengl" class="externalLink" target="_top"><code>EGLContext</code></a> current when reading and writing to a surface is not
required, configured with <a href="#EGL_CONFIG_ATTRIBUTES_RGBA_8888"><code>EGL_CONFIG_ATTRIBUTES_RGBA_8888</code></a>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>eglContext</code> - The <a href="https://developer.android.com/reference/android/opengl/EGLContext.html" title="class or interface in android.opengl" class="externalLink" target="_top"><code>EGLContext</code></a> to make current.</dd>
<dd><code>eglDisplay</code> - The <a href="https://developer.android.com/reference/android/opengl/EGLDisplay.html" title="class or interface in android.opengl" class="externalLink" target="_top"><code>EGLDisplay</code></a> to attach the surface to.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><a href="https://developer.android.com/reference/android/opengl/EGL14.html#EGL_NO_SURFACE" title="class or interface in android.opengl" class="externalLink" target="_top"><code>EGL14.EGL_NO_SURFACE</code></a> if supported and a 1x1 pixel buffer surface otherwise.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="GlUtil.GlException.html" title="class in com.google.android.exoplayer2.util">GlUtil.GlException</a></code></dd>
</dl>
</li>
</ul>
<a id="createFocusedPlaceholderEglSurface(android.opengl.EGLContext,android.opengl.EGLDisplay,int[])">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createFocusedPlaceholderEglSurface</h4>
<pre class="methodSignature">@RequiresApi(17)
public static&nbsp;<a href="https://developer.android.com/reference/android/opengl/EGLSurface.html" title="class or interface in android.opengl" class="externalLink">EGLSurface</a>&nbsp;createFocusedPlaceholderEglSurface&#8203;(<a href="https://developer.android.com/reference/android/opengl/EGLContext.html?is-external=true" title="class or interface in android.opengl" class="externalLink" target="_top">EGLContext</a>&nbsp;eglContext,
<a href="https://developer.android.com/reference/android/opengl/EGLDisplay.html" title="class or interface in android.opengl" class="externalLink" target="_top">EGLDisplay</a>&nbsp;eglDisplay,
int[]&nbsp;configAttributes)
throws <a href="GlUtil.GlException.html" title="class in com.google.android.exoplayer2.util">GlUtil.GlException</a></pre>
<div class="block">Creates and focuses a placeholder <a href="https://developer.android.com/reference/android/opengl/EGLSurface.html" title="class or interface in android.opengl" class="externalLink" target="_top"><code>EGLSurface</code></a>.
<p>This makes a <a href="https://developer.android.com/reference/android/opengl/EGLContext.html" title="class or interface in android.opengl" class="externalLink" target="_top"><code>EGLContext</code></a> current when reading and writing to a surface is not
required.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>eglContext</code> - The <a href="https://developer.android.com/reference/android/opengl/EGLContext.html" title="class or interface in android.opengl" class="externalLink" target="_top"><code>EGLContext</code></a> to make current.</dd>
<dd><code>eglDisplay</code> - The <a href="https://developer.android.com/reference/android/opengl/EGLDisplay.html" title="class or interface in android.opengl" class="externalLink" target="_top"><code>EGLDisplay</code></a> to attach the surface to.</dd>
<dd><code>configAttributes</code> - The attributes to configure EGL with. Accepts <a href="#EGL_CONFIG_ATTRIBUTES_RGBA_1010102"><code>EGL_CONFIG_ATTRIBUTES_RGBA_1010102</code></a> and <a href="#EGL_CONFIG_ATTRIBUTES_RGBA_8888"><code>EGL_CONFIG_ATTRIBUTES_RGBA_8888</code></a>.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>A placeholder <a href="https://developer.android.com/reference/android/opengl/EGLSurface.html" title="class or interface in android.opengl" class="externalLink" target="_top"><code>EGLSurface</code></a> that has been focused to allow rendering to take
place, or <a href="https://developer.android.com/reference/android/opengl/EGL14.html#EGL_NO_SURFACE" title="class or interface in android.opengl" class="externalLink" target="_top"><code>EGL14.EGL_NO_SURFACE</code></a> if the current context supports rendering without a
surface.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="GlUtil.GlException.html" title="class in com.google.android.exoplayer2.util">GlUtil.GlException</a></code></dd>
</dl>
</li>
</ul>
<a id="checkGlError()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>checkGlError</h4>
<pre class="methodSignature">public static&nbsp;void&nbsp;checkGlError()
throws <a href="GlUtil.GlException.html" title="class in com.google.android.exoplayer2.util">GlUtil.GlException</a></pre>
<div class="block">Collects all OpenGL errors that occurred since this method was last called and throws a <a href="GlUtil.GlException.html" title="class in com.google.android.exoplayer2.util"><code>GlUtil.GlException</code></a> with the combined error message.</div>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="GlUtil.GlException.html" title="class in com.google.android.exoplayer2.util">GlUtil.GlException</a></code></dd>
</dl>
</li>
</ul>
<a id="clearOutputFrame()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>clearOutputFrame</h4>
<pre class="methodSignature">public static&nbsp;void&nbsp;clearOutputFrame()
throws <a href="GlUtil.GlException.html" title="class in com.google.android.exoplayer2.util">GlUtil.GlException</a></pre>
<div class="block">Fills the pixels in the current output render target with (r=0, g=0, b=0, a=0).</div>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="GlUtil.GlException.html" title="class in com.google.android.exoplayer2.util">GlUtil.GlException</a></code></dd>
</dl>
</li>
</ul>
<a id="focusEglSurface(android.opengl.EGLDisplay,android.opengl.EGLContext,android.opengl.EGLSurface,int,int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>focusEglSurface</h4>
<pre class="methodSignature">@RequiresApi(17)
public static&nbsp;void&nbsp;focusEglSurface&#8203;(<a href="https://developer.android.com/reference/android/opengl/EGLDisplay.html" title="class or interface in android.opengl" class="externalLink" target="_top">EGLDisplay</a>&nbsp;eglDisplay,
<a href="https://developer.android.com/reference/android/opengl/EGLContext.html" title="class or interface in android.opengl" class="externalLink" target="_top">EGLContext</a>&nbsp;eglContext,
<a href="https://developer.android.com/reference/android/opengl/EGLSurface.html" title="class or interface in android.opengl" class="externalLink" target="_top">EGLSurface</a>&nbsp;eglSurface,
int&nbsp;width,
int&nbsp;height)
throws <a href="GlUtil.GlException.html" title="class in com.google.android.exoplayer2.util">GlUtil.GlException</a></pre>
<div class="block">Makes the specified <code>eglSurface</code> the render target, using a viewport of <code>width</code> by
<code>height</code> pixels.</div>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="GlUtil.GlException.html" title="class in com.google.android.exoplayer2.util">GlUtil.GlException</a></code></dd>
</dl>
</li>
</ul>
<a id="focusFramebuffer(android.opengl.EGLDisplay,android.opengl.EGLContext,android.opengl.EGLSurface,int,int,int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>focusFramebuffer</h4>
<pre class="methodSignature">@RequiresApi(17)
public static&nbsp;void&nbsp;focusFramebuffer&#8203;(<a href="https://developer.android.com/reference/android/opengl/EGLDisplay.html" title="class or interface in android.opengl" class="externalLink" target="_top">EGLDisplay</a>&nbsp;eglDisplay,
<a href="https://developer.android.com/reference/android/opengl/EGLContext.html" title="class or interface in android.opengl" class="externalLink" target="_top">EGLContext</a>&nbsp;eglContext,
<a href="https://developer.android.com/reference/android/opengl/EGLSurface.html" title="class or interface in android.opengl" class="externalLink" target="_top">EGLSurface</a>&nbsp;eglSurface,
int&nbsp;framebuffer,
int&nbsp;width,
int&nbsp;height)
throws <a href="GlUtil.GlException.html" title="class in com.google.android.exoplayer2.util">GlUtil.GlException</a></pre>
<div class="block">Makes the specified <code>framebuffer</code> the render target, using a viewport of <code>width</code> by
<code>height</code> pixels.</div>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="GlUtil.GlException.html" title="class in com.google.android.exoplayer2.util">GlUtil.GlException</a></code></dd>
</dl>
</li>
</ul>
<a id="focusFramebufferUsingCurrentContext(int,int,int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>focusFramebufferUsingCurrentContext</h4>
<pre class="methodSignature">@RequiresApi(17)
public static&nbsp;void&nbsp;focusFramebufferUsingCurrentContext&#8203;(int&nbsp;framebuffer,
int&nbsp;width,
int&nbsp;height)
throws <a href="GlUtil.GlException.html" title="class in com.google.android.exoplayer2.util">GlUtil.GlException</a></pre>
<div class="block">Makes the specified <code>framebuffer</code> the render target, using a viewport of <code>width</code> by
<code>height</code> pixels.
<p>The caller must ensure that there is a current OpenGL context before calling this method.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>framebuffer</code> - The identifier of the framebuffer object to bind as the output render
target.</dd>
<dd><code>width</code> - The viewport width, in pixels.</dd>
<dd><code>height</code> - The viewport height, in pixels.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="GlUtil.GlException.html" title="class in com.google.android.exoplayer2.util">GlUtil.GlException</a></code></dd>
</dl>
</li>
</ul>
<a id="deleteTexture(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>deleteTexture</h4>
<pre class="methodSignature">public static&nbsp;void&nbsp;deleteTexture&#8203;(int&nbsp;textureId)
throws <a href="GlUtil.GlException.html" title="class in com.google.android.exoplayer2.util">GlUtil.GlException</a></pre>
<div class="block">Deletes a GL texture.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>textureId</code> - The ID of the texture to delete.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="GlUtil.GlException.html" title="class in com.google.android.exoplayer2.util">GlUtil.GlException</a></code></dd>
</dl>
</li>
</ul>
<a id="destroyEglContext(android.opengl.EGLDisplay,android.opengl.EGLContext)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>destroyEglContext</h4>
<pre class="methodSignature">@RequiresApi(17)
public static&nbsp;void&nbsp;destroyEglContext&#8203;(@Nullable
<a href="https://developer.android.com/reference/android/opengl/EGLDisplay.html" title="class or interface in android.opengl" class="externalLink" target="_top">EGLDisplay</a>&nbsp;eglDisplay,
@Nullable
<a href="https://developer.android.com/reference/android/opengl/EGLContext.html" title="class or interface in android.opengl" class="externalLink" target="_top">EGLContext</a>&nbsp;eglContext)
throws <a href="GlUtil.GlException.html" title="class in com.google.android.exoplayer2.util">GlUtil.GlException</a></pre>
<div class="block">Destroys the <a href="https://developer.android.com/reference/android/opengl/EGLContext.html" title="class or interface in android.opengl" class="externalLink"><code>EGLContext</code></a> identified by the provided <a href="https://developer.android.com/reference/android/opengl/EGLDisplay.html?is-external=true" title="class or interface in android.opengl" class="externalLink"><code>EGLDisplay</code></a> and <a href="https://developer.android.com/reference/android/opengl/EGLContext.html?is-external=true" title="class or interface in android.opengl" class="externalLink" target="_top"><code>EGLContext</code></a>.</div>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="GlUtil.GlException.html" title="class in com.google.android.exoplayer2.util">GlUtil.GlException</a></code></dd>
</dl>
</li>
</ul>
<a id="createBuffer(float[])">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createBuffer</h4>
<pre class="methodSignature">public static&nbsp;<a href="https://developer.android.com/reference/java/nio/FloatBuffer.html" title="class or interface in java.nio" class="externalLink" target="_top">FloatBuffer</a>&nbsp;createBuffer&#8203;(float[]&nbsp;data)</pre>
<div class="block">Allocates a FloatBuffer with the given data.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>data</code> - Used to initialize the new buffer.</dd>
</dl>
</li>
</ul>
<a id="createExternalTexture()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createExternalTexture</h4>
<pre class="methodSignature">public static&nbsp;int&nbsp;createExternalTexture()
throws <a href="GlUtil.GlException.html" title="class in com.google.android.exoplayer2.util">GlUtil.GlException</a></pre>
<div class="block">Creates a GL_TEXTURE_EXTERNAL_OES with default configuration of GL_LINEAR filtering and
GL_CLAMP_TO_EDGE wrapping.</div>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="GlUtil.GlException.html" title="class in com.google.android.exoplayer2.util">GlUtil.GlException</a></code></dd>
</dl>
</li>
</ul>
<a id="createTexture(int,int,boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createTexture</h4>
<pre class="methodSignature">public static&nbsp;int&nbsp;createTexture&#8203;(int&nbsp;width,
int&nbsp;height,
boolean&nbsp;useHighPrecisionColorComponents)
throws <a href="GlUtil.GlException.html" title="class in com.google.android.exoplayer2.util">GlUtil.GlException</a></pre>
<div class="block">Allocates a new RGBA texture with the specified dimensions and color component precision.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>width</code> - The width of the new texture in pixels.</dd>
<dd><code>height</code> - The height of the new texture in pixels.</dd>
<dd><code>useHighPrecisionColorComponents</code> - If <code>false</code>, uses 8-bit unsigned bytes. If <code>
true</code>, use 16-bit (half-precision) floating-point.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The texture identifier for the newly-allocated texture.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="GlUtil.GlException.html" title="class in com.google.android.exoplayer2.util">GlUtil.GlException</a></code> - If the texture allocation fails.</dd>
</dl>
</li>
</ul>
<a id="bindTexture(int,int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>bindTexture</h4>
<pre class="methodSignature">public static&nbsp;void&nbsp;bindTexture&#8203;(int&nbsp;textureTarget,
int&nbsp;texId)
throws <a href="GlUtil.GlException.html" title="class in com.google.android.exoplayer2.util">GlUtil.GlException</a></pre>
<div class="block">Binds the texture of the given type with default configuration of GL_LINEAR filtering and
GL_CLAMP_TO_EDGE wrapping.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>textureTarget</code> - The target to which the texture is bound, e.g. <a href="https://developer.android.com/reference/android/opengl/GLES20.html#GL_TEXTURE_2D" title="class or interface in android.opengl" class="externalLink"><code>GLES20.GL_TEXTURE_2D</code></a> for a two-dimensional texture or <a href="https://developer.android.com/reference/android/opengl/GLES11Ext.html?is-external=true#GL_TEXTURE_EXTERNAL_OES" title="class or interface in android.opengl" class="externalLink" target="_top"><code>GLES11Ext.GL_TEXTURE_EXTERNAL_OES</code></a> for an external texture.</dd>
<dd><code>texId</code> - The texture identifier.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="GlUtil.GlException.html" title="class in com.google.android.exoplayer2.util">GlUtil.GlException</a></code></dd>
</dl>
</li>
</ul>
<a id="createFboForTexture(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createFboForTexture</h4>
<pre class="methodSignature">public static&nbsp;int&nbsp;createFboForTexture&#8203;(int&nbsp;texId)
throws <a href="GlUtil.GlException.html" title="class in com.google.android.exoplayer2.util">GlUtil.GlException</a></pre>
<div class="block">Returns a new framebuffer for the texture.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>texId</code> - The identifier of the texture to attach to the framebuffer.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="GlUtil.GlException.html" title="class in com.google.android.exoplayer2.util">GlUtil.GlException</a></code></dd>
</dl>
</li>
</ul>
<a id="checkGlException(boolean,java.lang.String)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>checkGlException</h4>
<pre class="methodSignature">public static&nbsp;void&nbsp;checkGlException&#8203;(boolean&nbsp;expression,
<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a>&nbsp;errorMessage)
throws <a href="GlUtil.GlException.html" title="class in com.google.android.exoplayer2.util">GlUtil.GlException</a></pre>
<div class="block">Throws a <a href="GlUtil.GlException.html" title="class in com.google.android.exoplayer2.util"><code>GlUtil.GlException</code></a> with the given message if <code>expression</code> evaluates to <code>
false</code>.</div>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="GlUtil.GlException.html" title="class in com.google.android.exoplayer2.util">GlUtil.GlException</a></code></dd>
</dl>
</li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
</div>
</main>
<!-- ========= END OF CLASS DATA ========= -->
<footer role="contentinfo">
<nav role="navigation">
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a id="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../allclasses.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li><a href="#nested.class.summary">Nested</a>&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a id="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</nav>
</footer>
</body>
</html>