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 7166653
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T14:26:54+00:00 2026-05-28T14:26:54+00:00

As the title already says, I’d like to know how to create a 1024×1024

  • 0

As the title already says, I’d like to know how to create a 1024×1024 Texture with only one 8-bit value in Java for Android OpenGL-ES 2.0. The reason for this is that I only need it with 8-bit values and don’t want to waste the other 24-bits in a RGBA-Texture which would be 4MB instead of 1MB.

The only way I know to set textures in Java is with:

GLUtils.texImage2D(GL10.GL_TEXTURE_2D, 0, map, 0);

But I don’t know if that is of any use here, or if I have to do what I want with a different method or if the only way to achieve this is with the NDK.

I’d like to use that value as alpha for a shader but its not really important what it is, because I can set that in the shader.

Does anyone know how this is possible in Java?

  • 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-05-28T14:26:55+00:00Added an answer on May 28, 2026 at 2:26 pm

    The method

    GLUtils.texImage2D (int target, int level, int internalformat, Bitmap bitmap, int type, int border)
    

    allows you to chose the internal texture format.

    http://www.opengl.org/resources/code/samples/sig99/advanced99/notes/node51.html

    In this web you have the existing formats explained. Btw, ALPHA8 seems to be the one that fits all the requirements.

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

Sidebar

Related Questions

As the title already says, I would like to know if it is somehow
as the title already says... I'd like to open a ElementTreeSelectionDialog with the Tree
As the title says, I want to know, if possible, how can I create
as the title already says, I want to execute a linux comand with a
I just want what my title says.I have already read all the previous similar
as the title already says, I need to convert an int[] to a ByteBuffer
As the title already says I am having trouble using databinding with a DependencyProperty.
I believe the title already says it all, but here is my question: what
well, as the title says, I need to create a component inheriting from the
As the title says; how can i create a UIButton that activate a UISwitch,

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.