Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9000497
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T00:19:07+00:00 2026-06-16T00:19:07+00:00

What are the valid possible values to pass to internalformat in WebGL’s texImage2D call?

  • 0

What are the valid possible values to pass to internalformat in WebGL’s texImage2D call? The WebGL spec doesn’t seem to make it clear, and I’m not sure which enums from desktop GL documentation will work in WebGL.

WebGL defines: RGB, RGBA, RGBA4, RGB5_A1, RGB565. Are all of these guaranteed to be valid internal formats?

Does the type parameter get taken in to account? If I set internalformat to RGB and type to UNSIGNED_SHORT_5_6_5, does this guarantee the internal format will be 16-bit? Or does it always use RGB8 or decide based on other factors?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T00:19:08+00:00Added an answer on June 16, 2026 at 12:19 am

    From my understanding the following parameters are valid in webgl:

    internalformat: GL_ALPHA, GL_LUMINANCE, GL_LUMINANCE_ALPHA, GL_RGB, GL_RGBA.

    format: GL_ALPHA, GL_RGB, GL_RGBA, GL_LUMINANCE and GL_LUMINANCE_ALPHA.

    type: GL_UNSIGNED_BYTE, GL_UNSIGNED_SHORT_5_6_5, GL_UNSIGNED_SHORT_4_4_4_4, and GL_UNSIGNED_SHORT_5_5_5_1.

    internalformat must match format

    From the opengl ES 2.0 documentation:

    internalformat must match format. No conversion between formats is supported during texture image processing. type may be used as a hint to specify how much precision is desired, but a GL implementation may choose to store the texture array at any internal resolution it chooses.

    If the webgl documentation does not give enough details maybe the full opengl es 2.0 documentation can help (chapter 3.7.1). From looking at the differences between webgl and opengl es 2.0 there shouldn’t be any difference inglTexImage2D between webgl and opengl es 2.0

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: What are valid values for the id attribute in HTML? Underscores seem
Possible Duplicate: Cross-thread operation not valid I am trying to close the base of
Possible Duplicate: Getting Cross-thread operation not valid Cross-thread operation not valid I am trying
Possible Duplicate: Cross-thread operation not valid: Control accessed from a thread other than the
Possible Duplicate: Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result I'm getting
Possible Duplicate: What are valid values for the id attribute in HTML? valid value
Possible Duplicates: Valid use of goto for error management in C? Examples of good
Is it possible to mark a field valid with jQuery validator, or to ask
Possible Duplicate: What characters are valid in CSS class names? Don't if this is
is it possible to get an valid access token for an user via a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.