Jump to content
  • Advertisement
Sign in to follow this  

draw texture

This topic is 1375 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts


why does my Texture (500x625) get drawn multiple times. I get around 4 to the side and 4-5 up/down images drawn, when I only want to

display it once ( but scaled ).




    float offx = XPLMGetDataf(panel_total_pnl_l);//left
    float offy = XPLMGetDataf(panel_total_pnl_b);//bottom

    XPLMSetGraphicsState(0, 1, 0, 0, 1, 0, 0); // 1 texture and alpha blending
    XPLMBindTexture2d(textures[CHECKL_TEXTURE].texIMGID, 0);
    glColor3f(1, 1, 1);
    glTexCoord2f(0, 0);
    glVertex2f(offx + 100, offy + 200);
    glTexCoord2f(0, 1);
    glVertex2f(offx + 100, offy + 825);
    glTexCoord2f(1, 1);
    glVertex2f(offx + 600, offy + 825);
    glTexCoord2f(1, 0);
    glVertex2f(offx + 600, offy + 200);


Share this post

Link to post
Share on other sites

Too little info to tell. What kind of texture wrap parameters are you using for the texture? Have you changed the glTextureMatrix at all? That will scale your textures, e,g


glScalef(4f, 4f, 1f)

Share this post

Link to post
Share on other sites

Thanks, found out that it works fine with another texture. So after copying my texture into that it works. Hence it must either have been image size or tga format related, weird anyway.

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!