This project is read-only.

RasterizerState set to null after calling DrawText

Sep 11, 2012 at 9:25 PM
Edited Sep 11, 2012 at 9:27 PM

I have the following texts:


// class members
    Text t1;
    Text t2;
    Text t3;

// init
// Debugfont is size 24
      t1 = MM.DebugFont24.Fill("hello");
      t1 = MM.DebugFont24.Extrude("hello");
      t2 = MM.DebugFont24.Fill("hello");
      t2 = MM.DebugFont24.Extrude("hello");
      t3 = MM.DebugFont24.Fill("hello");
      t3 = MM.DebugFont24.Extrude("hello");

// Draw
TextBatch test = new TextBatch(MM.GD);
      test.DrawText(t1, Color.Red);
      test.DrawText(t2, Color.Red);
      test.DrawText(t3, Color.Red);

//After the second call to the TextBatch, RasterizerState of the GraphicsDevice is set to null
//But I don't get any runtime errors or any indication of that something is wrong. 

Is this supposed to happen? Or am I doing something wrong? I've discovered that this happened because culling was set to None  when I was rendering textures

Sep 12, 2012 at 6:14 PM
Edited Sep 12, 2012 at 6:16 PM

I've also asked this question on stackexchange:

Sep 12, 2012 at 9:41 PM

Blendstate & DepthStencilState are also set to null.