+ rb->Depth = 0;
+
+ /* In GL 3, the initial format is GL_RGBA according to Table 6.26
+ * on page 302 of the GL 3.3 spec.
+ *
+ * In GLES 3, the initial format is GL_RGBA4 according to Table 6.15
+ * on page 258 of the GLES 3.0.4 spec.
+ *
+ * If the context is current, set the initial format based on the
+ * specs. If the context is not current, we cannot determine the
+ * API, so default to GL_RGBA.
+ */
+ if (ctx && _mesa_is_gles3(ctx)) {
+ rb->InternalFormat = GL_RGBA4;
+ } else {
+ rb->InternalFormat = GL_RGBA;
+ }
+