RasterizerState set to null after calling DrawText in Nuclex
Posted
by
ProgrammerAtWork
on Game Development
See other posts from Game Development
or by ProgrammerAtWork
Published on 2012-09-12T07:48:50Z
Indexed on
2012/09/12
9:49 UTC
Read the original article
Hit count: 248
I have the following code in XNA:
// class members
Text t1;
Text t2;
Text t3;
// init
// Debugfont is size 24 vectorfont
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);
test.End();
//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
© Game Development or respective owner