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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T19:02:23+00:00 2026-06-15T19:02:23+00:00

In an attempt to get a texture on a simple rectangle, I get an

  • 0

In an attempt to get a texture on a simple rectangle, I get an odd issue. Only the last column of pixels in the texture are seemingly used.
https://i.stack.imgur.com/H9AgX.png <- The result being the black and white rectangle at the top there.

I’ve trudged the depths of already asked questions and journeyed the perilous underbelly of Google to no avail. I’ve compared my code to the tutorial I’d based it off (which, coincidentally, works with my chosen texture) yet still am puzzled.
I was thinking it could be the input layout, perhaps the offsets?

D3D11_INPUT_ELEMENT_DESC ied[] =
{
    {"POSITION", 0, DXGI_FORMAT_R32G32B32_FLOAT, 0, 0, D3D11_INPUT_PER_VERTEX_DATA, 0},
    {"COLOR", 0, DXGI_FORMAT_R32G32B32A32_FLOAT, 0, 12, D3D11_INPUT_PER_VERTEX_DATA, 0},        
    {"TEXCOORD", 0, DXGI_FORMAT_R32G32_FLOAT, 0, 24, D3D11_INPUT_PER_VERTEX_DATA, 0},
};

dev->CreateInputLayout(ied, 3, VS->GetBufferPointer(), VS->GetBufferSize(), &pLayout);
devcon->IASetInputLayout(pLayout);

If not this, then theres a chance it could be the CreateShaderResourceFromViewFile:

 D3DX11CreateShaderResourceViewFromFile(dev,        // the Direct3D device
                                   L"Ptitle.png",    // load Wood.png in the local folder
                                   NULL,           // no additional information
                                   NULL,           // no multithreading
                                   &Ttitle,      // address of the shader-resource-view
                                   NULL);          // no multithreading

Also, just for good measure – although I’m certain it’s fine, here are the vertices and their respective texture coordinates

        // Title
    {-200.0f, 100.0f, 0.0f, D3DXCOLOR(1.0f, 1.0f, 1.0f, 1.0f), 0.0f, 1.0f},//13 BOTTOM LEFT
    {-200.0f, 200.0f, 0.0f, D3DXCOLOR(1.0f, 1.0f, 1.0f, 1.0f), 0.0f, 0.0f},//14 TOP LEFT
    {200.0f, 100.0f, 0.0f, D3DXCOLOR(1.0f, 1.0f, 1.0f, 1.0f), 1.0f, 1.0f},//15 BOTTOM RIGHT
    {200.0f, 200.0f, 0.0f, D3DXCOLOR(1.0f, 1.0f, 1.0f, 1.0f), 1.0f, 0.0f},//16 TOP RIGHT

I have a feeling I’ll be kicking myself.
Many thanks for any help I may receive, as well as apologies in case I’m still being too vague.

  • 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-15T19:02:24+00:00Added an answer on June 15, 2026 at 7:02 pm

    Seems you input layout is wrong:

    D3D11_INPUT_ELEMENT_DESC ied[] =
    {
        {"POSITION", 0, DXGI_FORMAT_R32G32B32_FLOAT, 0, 0, D3D11_INPUT_PER_VERTEX_DATA, 0},
        {"COLOR", 0, DXGI_FORMAT_R32G32B32A32_FLOAT, 0, 12, D3D11_INPUT_PER_VERTEX_DATA, 0},        
        {"TEXCOORD", 0, DXGI_FORMAT_R32G32_FLOAT, 0, 24, D3D11_INPUT_PER_VERTEX_DATA, 0},
    };
    

    For TEXCOORD replace 24 by 28, since color is 16 in size.

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

Sidebar

Related Questions

When I attempt to debug a simple program with gdb on cygwin I get
Here's my attempt to get the last item in the dropdown and check it:
We've put frustrating hours into the attempt to get a remarkably simple script to
I am using the following code to attempt to get the font color of
I have an image that I get and attempt to load into a graphics
When I attempt to run the following test in IntelliJ IDEA I get the
When I attempt to instantiate my instance of the base class I get the
When I attempt to connect to SQL server using enterprise manager I get the
When I attempt to open a file to write, I get an error: Ada.IO_Exceptions.Name_Error
In an attempt to develop a hard disk analytic tool, I'm trying to get

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.