Skip to content

Instantly share code, notes, and snippets.

@yorung
Last active August 29, 2015 14:25
Show Gist options
  • Save yorung/8a4d16bd4cbcd1bc9050 to your computer and use it in GitHub Desktop.
Save yorung/8a4d16bd4cbcd1bc9050 to your computer and use it in GitHub Desktop.
half float texture creating
#ifdef OPENGL_OR_ES30
// ES 3.0
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA16F, w, h, 0, GL_RGBA, GL_HALF_FLOAT, nullptr);
#else
// ES 2.0
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, w, h, 0, GL_RGBA, GL_HALF_FLOAT_OES, nullptr);
#endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment