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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T19:39:45+00:00 2026-05-30T19:39:45+00:00

Having XNA background, I try to create a simple DirectX11 application. Now I try

  • 0

Having XNA background, I try to create a simple DirectX11 application. Now I try to figure out how to set shader constants such as projection matrix etc. I’m reading about constant-buffers – but is there no simple way to set some constants before rendering, without using buffers?

  • 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-30T19:39:46+00:00Added an answer on May 30, 2026 at 7:39 pm

    I have taken the same path and this is something I have been struggling with as well.
    Since DirectX10 there have been a lot of changes to the interface, allowing more overall control.

    Sooner or later you will get used to the buffers and discover they are in fact pretty neat.

    Here are some advantages and tips:

    • There is now a uniform way of binding vertex, index and constant data to the pipeline, namely the Buffer class.

    • Constants are packed in registers with each holding up to four 32-bit components.

    • You can pack the constants manually using the packoffset() HLSL function. There are some rules you have to consider.

    • As you can bind multiple constant buffers to a single stage it is recommended to separate your constants by their update frequency. For example, the view and projection matrices are usually updated once every frame, while the world matrix will change for every mesh. For optimal performance you would create two buffers, one containing per frame data, and the other one per mesh data.

    • Finally, the limits for constant buffers:

    Each constant buffer can hold up to 4096 vectors; each vector contains up to four 32-bit values. You can bind up to 14 constant buffers per pipeline stage (2 additional slots are reserved for internal use).

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

Sidebar

Related Questions

I am having problems debugging a Windows Phone XNA game application. I can build
I am having trouble debugging my XNA application, using VS 2010 ultimate and XNA
I'm having some serious trouble understanding the view matrix in XNA. I've come pretty
I'm having difficulty with an architectural decision for my C# XNA game. The basic
Having worked with Classic ASP for about 2 years now by creating a few
I'm following this tutorial attempting to learn XNA, but I'm having issues making my
I am experimenting with lidgren in XNA and I'm having some issues with the
I am trying to create a pacman game to learn XNA, but I am
I know that when developing for Xbox in XNA, you basically just set the
Trying to integrate Ninject with XNA however I am having a bit of pain

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.