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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T20:39:41+00:00 2026-05-14T20:39:41+00:00

i have a question concerning how to declare the points for a texture on

  • 0

i have a question concerning how to declare the points for a texture on a cube

to be exactly i mean the:

glTexCoord2f(x.f, y.f);

for the front side, my declaration works:

glBegin(GL_POLYGON);   //Vorderseite
        glNormal3f(0.0f, 0.0f, 1.0f);//normale für vorderseite

    glTexCoord2f(0.0f, -1.f);
    glVertex3f(-fSeitenL/2.0f,-fSeitenL/2.0f,+fSeitenL/2.0f);

    glTexCoord2f(1.f, -1.f);
    glVertex3f(+fSeitenL/2.0f,-fSeitenL/2.0f,+fSeitenL/2.0f);

    glTexCoord2f(1.f, 0.0f);
    glVertex3f(+fSeitenL/2.0f,+fSeitenL/2.0f,+fSeitenL/2.0f); 

    glTexCoord2f(0.0f, 0.0f);
    glVertex3f(-fSeitenL/2.0f,+fSeitenL/2.0f,+fSeitenL/2.0f);
    glEnd();

but for the right side, it doesn’t work, i suggest i need other parameters, for glTexCoord2f, but i don’t know witch one.

glBegin(GL_POLYGON);   //Rechte Seite

    glNormal3f(1.0f, 0.0f, 0.0f); //normale für rechte seite

    glTexCoord2f(0.0f, -1.f);
    glVertex3f(+fSeitenL/2.0f,-fSeitenL/2.0f,+fSeitenL/2.0f);

    glTexCoord2f(1.0f, -1.f);
    glVertex3f(+fSeitenL/2.0f,-fSeitenL/2.0f,-fSeitenL/0.0f);

    glTexCoord2f(1.0f, 0.0f);
    glVertex3f(+fSeitenL/2.0f,+fSeitenL/2.0f,-fSeitenL/0.0f);

    glTexCoord2f(0.0f, 0.0f);
    glVertex3f(+fSeitenL/2.0f,+fSeitenL/2.0f,+fSeitenL/0.0f);
    glEnd();

after all i close the “texture-declaration with”

glDisable(GL_TEXTURE_2D);

thanks in advance

edit:

the frontside is shown with the picture, the other side isn’t shown, not even the “cubeside”.
for now i just use a picture that’s black with some random white spaces, so the exactly position is not that much importent, despite that i’m very interessted how to set the glTexCoord2f right.

  • 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-14T20:39:42+00:00Added an answer on May 14, 2026 at 8:39 pm

    Since you’re using negative texture coordinates (or really anything outside the 0..1 range) you need to make sure that your texture wrap mode is set to repeat.

    glTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT );
    glTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT );
    

    If those are set to GL_CLAMP instead, then any value less than 0 will be set to 0 and any value greater than 1 will be set to 1. But since you say the first part of your model textures correctly, this is probably not your problem.

    The next most likely issue is lighting. If you turn off lighting with glDisable(GL_LIGHTING); does the entire model show up? If so, then you need to make sure you have a light facing the problem portion of your model, or add an ambient component to your light.

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

Sidebar

Related Questions

I have a question concerning this code which I want to run on QNX:
I have question about NSView: Imagine a Custom View where the mouseDown, mouseDrag and
We have the question is there a performance difference between i++ and ++i in
We have a question with regards to XML-sig and need detail about the optional
I have a Question class: class Question { public int QuestionNumber { get; set;
I have a question on the best way of exposing an asynchronous remote interface.
I have a question about using streams in .NET to load files from disk.
I have a question about best practices regarding how one should approach storing complex
I have a question regarding the two additional columns (timeCreated, timeLastUpdated) for each record
I have a question about locking. This doesn't have to be only about record

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.