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

The Archive Base Latest Questions

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

The question is 2D specific. I am a constantly updating texture, which is a

  • 0

The question is 2D specific.

I am a constantly updating texture, which is a render target for one of my layers. The update is a whole redraw of the texture and is performed by drawing sprites and outputting text. The operation is performed frequently, consumes quite a lot of CPU and I have, of course, optimized the number of the redraws to keep it down.

Is there a way to buffer these operations in Direct3D? Because currently I have to repeatedly construct a chain of sprite/text operations. Lets assume any game performing a world update – how do they overcome this tedious work? Maybe by creating more layers?

The best thing for me would be creating a modifiable draw chain object, but I haven’t found anything like this in Direct3D.

  • 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-27T21:11:31+00:00Added an answer on May 27, 2026 at 9:11 pm

    There are a few general methods you might look into:

    • Batching: Order and combine draws to perform as few calls as possible, and draw as many objects between state changes as you can.
    • Cache: Keep as much geometry in vertex buffers as you can. With 2D, this gets more interesting, since most things are textured quads. In that case…
    • Shaders: It may be possible to write a vertex shader that takes a float4 giving the X/Y position/size of your quad, then use that to draw 4 vertexes. You won’t need to perform full matrix state changes then, just update 4 floats in your shader (skips all the view calculations, 75% less memory and math). To help make sure the right settings are being used with the shaders, …
    • State Blocks: Save a state block for each type of sprite, with all the colors, modes, and shaders bound. Then simply apply the state block, bind your textures, set your coordinates, and draw. At best, you can get each sprite down to 4 calls. Even still…
    • Cull: It’s best not to draw something at all. If you can do simple screen bounds-checking (can be faster than the per-poly culling that will be done otherwise), sorting and basic occlusion (flag sprites with transparency). With 2D, most culling checks are very very cheap. Sort and clip and cull wherever you can.

    As far as actually buffering, the driver will handle that for you, when and where it’s appropriate. State blocks can effect buffering, by delivering all the modes in a single call (I forget whether it’s good or bad, though I believe they can be beneficial). Cutting down the calls to:

    if (sprite.Visible && Active(sprite) && OnScreen(sprite))
    {
        states[sprite.Type]->Apply(); 
        device->BindTexture(sprite.Texture); 
        device->SetVertexShaderF(sprite.PositionSize); 
        device->Draw(quad);
    }
    

    is very likely to help with CPU use.

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

Sidebar

Related Questions

This is a very specific question which will probably earn me the tumbleweed badge,
This question is specific to the iMacros suite in particular. What is the best
A very specific question from a novice to TDD : I separate my tests
I know this specific question has been asked before , but I am not
I have a specific question, that could use a general answer... When building Multi-Tier
Sorry since this question is specific to my problem. While learning reflections i did
Skip to the specific question as needed. Some background: The scenario: I have a
This is a very specific question regarding MySQL as implemented in WordPress . I'm
Sorry for a pretty specific question. I have a table (see bottom), and when
I have a fairly specific question about concurrent programming in C. I have done

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.