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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T17:48:45+00:00 2026-06-15T17:48:45+00:00

I cannot seem to find a simple tutorial to address what I suspect is

  • 0

I cannot seem to find a simple tutorial to address what I suspect is an overly easy problem:
I have a square built from a triangle strip. I want to map an image to it (game sprite). Everything is 2d, and lighting is not being used.

I have found tutorials addressing 3d objects with lighting, but they are addressing vastly more complicated scenarios.

How do I go about this?

  • 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-15T17:48:47+00:00Added an answer on June 15, 2026 at 5:48 pm

    In GLES 2.0, the fixed-function pipeline has been replaced with programmable shaders. This means that you no longer can simply “enable” textures on your objects, but have to create the implementation yourself. Generally you will need to have a texture-coordinate attribute for the 2d-texture space of your geometry as well as a texture sampler.

    Here is a simple example of a vertex and fragment shader using textures:

    Vertex shader:

    attribute vec4 vertexPosition;
    attribute vec2 texCoords;
    uniform mat4 mvpMatrix;
    varying vec2 uv;
    void main(){
        gl_Position = mvpMatrix*vertexPosition;
        uv = texCoords;
    }
    

    Fragment shader:

    uniform sampler2D texture;
    varying vec2 uv;
    void main(){
        gl_FragColor = texture2D(texture, uv);
    }
    

    Then, before drawing you will have to bind the texture. If you only use one texture each drawing call then it is as simple as that.

    For more code examples on loading and using textures, take a look at the GLES20 sample project in the Android Api-demos

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

Sidebar

Related Questions

I have a simple problem that I cannot seem to find a solution to.
I have a relatively simple question that I cannot seem to find the answer
I cannot seem to find a way to have LINQ return the value from
I'm sure this is a very simple fix but I cannot seem to find
I have been researching this issue pretty extensively and cannot seem to find an
I have gotten myself into a catch 22 and cannot seem to find my
Although probarly quite simple, i cannot seem to find the following. The form takes
Quick CSS Question. I cannot seem to figure out a very simple CSS/HTML problem.
This may sound like a simple question, but I just cannot seem to find
I have what I think is a fairly common problem, but I cannot seem

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.