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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T23:22:33+00:00 2026-05-25T23:22:33+00:00

I want to set states in SlimDX Direct3d9 device. I have that code at

  • 0

I want to set states in SlimDX Direct3d9 device.

I have that code at the beging of frameRender function.

        device.BeginStateBlock();
        device.SetRenderState(RenderState.ZEnable, false);
        device.SetRenderState(RenderState.Lighting, false);
        device.SetRenderState(RenderState.CullMode, Cull.None);            
        device.EndStateBlock();  

But I’m getting this error in debug window:

Object of type SlimDX.Direct3D9.StateBlock was not disposed. Stack trace of object creation:

I’m getting millions of those lines. All of them say the same thing.
How should I dispose those states? How to make it in proper way?

  • 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-25T23:22:34+00:00Added an answer on May 25, 2026 at 11:22 pm

    The only hint i can give you, given your information, is that EndStackeBlock should return a StateBlock object, which is disposable. My guess is, you get these after a LostDevice event? Before you reset the device you need to free all those resources.
    And of course, the whole reason to make StateBlocks is so that you create them once and reuse them, but it seems you are recreating them everytime and never applying them. So after a while you created a lot of stateblocks without using or disposing any of them.
    But maybe you can post more code or give more informations.

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

Sidebar

Related Questions

I have a set of items that can be in various states. I want
I have a form that I want to present in two states: 1) Normal
I have a cocoa class set up that I want to use to connect
I have a table ATMStatusHistory . I want an IF condition which states that
I have a range named STATE. I want to set data validation in range
My question is : I have an EditText and I want set a margin
i have a problem, i want set text of a UILabel or UItextView or
jQueryUI Datepicker documentation states that the minDate option can be set using a string
I have a spinner set up like this: ArrayAdapter<String> states = new ArrayAdapter<String>(this, android.R.layout.simple_spinner_dropdown_item,
I have a requirement that i need to set the connection into the hibernate,

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.