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

  • Home
  • SEARCH
  • 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 933569
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T20:51:17+00:00 2026-05-15T20:51:17+00:00

I would like some 2D sprites to occlude some 3D DrawableGameComponents. For a simplified

  • 0

I would like some 2D sprites to occlude some 3D DrawableGameComponents. For a simplified example, a pause menu (implemented as a 2D sprite) should be drawn on top of a paused space ship (implemented as 3D game component).

The XNA framework automatically calls Draw methods of classes from Microsoft.Xna.Framework.Game and Microsoft.Xna.Framework.DrawableGameComponent.

In my experience, I am finding that the draw order is:

  1. Game Draw() methods
  2. DrawableGameComponent Draw() methods

My spriteBatch draw method calls are the draw method of my Game class. Therefore, the space ship is drawn over the top of the pause menu (making it unreadable).

It seems to me that the simplest way to solve my problem would be to reverse the order that the draw methods are called. Is this possible?

I have tried setting the DrawOrder of the DrawableGameComponents to different values (1000, 1, 0, -1, -1000) but it has no effect on the XNA framework Draw() method call order between instances of Game and DrawableGameComponent.

I have looked into the layerDepth of SpriteBatch Draw method calls, but they appear to be unrelated to the XNA Framework draw order between the Game and DrawableGameComponent classes. Layer depth only seems to affect the sprites in the SpriteBatch.

I am new to using XNA but I suspect that I am asking too much of the framework. If this is the case, what would be the normal way to achieve the placing of 2D objects on top of 3D objects?

Any assistance would be appreciated.

  • 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-15T20:51:18+00:00Added an answer on May 15, 2026 at 8:51 pm

    There has been a while since I used XNA, but I believe the base.Draw() call in the Draw() method of your Game class will iterate through your DrawableGameComponents, so you could try to place this call before or after the drawing logic in your Draw method depending on what order you want the calls to happen.

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

Sidebar

Related Questions

I would like to create some buttons with dynamic width using CSS sprites and
I have some images which I would like to use as sprites in my
I would like to use SASS & Compass to generate some specific sprites. This
I am making a top-down platformer game using sprites. I would like to add
I would like some help about an Android Application. I used the new Google
I would like some help parsing a dynamic (folder.subfolders) xml with xslt, I tried
I would like some container that I can very efficiently append a variable amount
I would like some sugestion on how to design a table that gets like
I would like some assistance on creating a depreciation run in X++ the variables
I would like some advice on the best approach to use in the following

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.