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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T21:27:13+00:00 2026-05-13T21:27:13+00:00

I am trying to setup my swap chain Buffer but I get the following

  • 0

I am trying to setup my swap chain Buffer but I get the following error

error C2228: left of '.DXGI_MODE' must have class/struct/union
1>        type is 'DXGI_MODE_SCANLINE_ORDER'

Note sure what I am doing wrong. here is the code

DXGI_SWAP_CHAIN_DESC swapChainDesc;

    // Set the width and height of the buffers in the swap chain
    swapChainDesc.BufferDesc.Width = 640;
    swapChainDesc.BufferDesc.Height = 480;

    // Set the refresh rate. This is how often the buffers get swapped out
    swapChainDesc.BufferDesc.RefreshRate.Numerator = 60;
    swapChainDesc.BufferDesc.RefreshRate.Denominator = 1;

    // Set the surface format of the buffers
    swapChainDesc.BufferDesc.Format = DXGI_FORMAT_R8G8B8A8_UNORM;
    swapChainDesc.BufferDesc.ScanlineOrdering.DXGI_MODE;
    //_SCANLINE_ORDER_UNSPECIFIED;
    swapChainDesc.BufferDesc.Scaling = DXGI_MODE_SCALING_UNSPECIFIED;
    swapChainDesc.SampleDesc.Count = 1;
    swapChainDesc.SampleDesc.Quality = 0;

    // Set how the buffers are used. Since you are drawing to the buffers, they are
    //considered a render target
    swapChainDesc.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT;

    // Set the number of back buffers, 1 is the minimum and normally sufficient
    swapChainDesc.BufferCount = 1;

    // A handle to the main application window
    swapChainDesc.OutputWindow = hWnd;

    // Set whether you are running in a window or fullscreen mode
    swapChainDesc.Windowed = TRUE;

    // How the buffers are swapped. Discard allows the buffers to be overwritten
    //completely when swapped.
    swapChainDesc.SwapEffect = DXGI_SWAP_EFFECT_DISCARD;
    swapChainDesc.Flags = DXGI_SWAP_CHAIN_FLAG_NONPREROTATED;
  • 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-13T21:27:14+00:00Added an answer on May 13, 2026 at 9:27 pm

    Shouldn’t this bit

    swapChainDesc.BufferDesc.ScanlineOrdering.DXGI_MODE;
    //_SCANLINE_ORDER_UNSPECIFIED;
    

    in fact be

    swapChainDesc.BufferDesc.ScanlineOrdering = DXGI_MODE_SCANLINE_ORDER_UNSPECIFIED;
    

    ?

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

Sidebar

Related Questions

I am receiving the following error when trying to price a 20x10 swap from
I'm trying setup a subset of boost and get it properly compiled using bjam,
I'm trying to setup CruiseControl.net at the moment. So far it works nice, but
I'm trying to setup a socket that won't block on accept(...), using the following
Trying to setup an SSH server on Windows Server 2003. What are some good
After trying to setup my site for Google Webmaster Tools I found that my
I'm trying to setup an Apache/PHP/Postgresql server locally on my machine. I'm using Windows
I am trying to setup tracd for the project I am currently working on.
I am trying to setup a simple demo of activemq and mina. I edited
I am trying to setup a failover location for MOSS. The current farm is

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.