sugrhigh

I've done the resets from Shawn Hargreaves blog and it's worked in the past, but since i moved over to the nucles font engine these dont work(even in a minimalistic demo setup). The model(s) are still skewed.... anyone have a workaround



Re: XNA Game Studio Express 2d resets with nuclex fonts?

Nick Gravelyn

Here's their solution to a possible problem you are experiencing: http://www.nuclex.org/node/180. Hope that helps you out.




Re: XNA Game Studio Express 2d resets with nuclex fonts?

sugrhigh

thanks... i missed that one for some reason(i was looking at their forums as we spoke).

ill read into the TextManager





Re: XNA Game Studio Express 2d resets with nuclex fonts?

sugrhigh

adding the line at the beginning of my draw function doesnt work.

is there a reset im missing

im using a console(like the quake-based games have) and it uses nuclex fonts too so i need something that can be used globally to fix the drawing then too...

am i basically screwed





Re: XNA Game Studio Express 2d resets with nuclex fonts?

Nick Gravelyn

What line are you adding How are you drawing the strings Can you post some code




Re: XNA Game Studio Express 2d resets with nuclex fonts?

sugrhigh

heres my draw method... i think thats all thats relevant



protected override void Draw(GameTime gameTime)
{
graphics.GraphicsDevice.RenderState.StencilEnable = true;
graphics.GraphicsDevice.Clear(Color.CornflowerBlue);

mLoader.DrawModel(tank, tankposition, camera.projectionMatrix, camera.viewMatrix);

framerate.Draw();

#region 2D Resets
graphics.GraphicsDevice.RenderState.DepthBufferEnable = true;
graphics.GraphicsDevice.RenderState.AlphaBlendEnable = false;
graphics.GraphicsDevice.RenderState.AlphaTestEnable = false;
graphics.GraphicsDevice.SamplerStates[0].AddressU = TextureAddressMode.Wrap;
graphics.GraphicsDevice.SamplerStates[0].AddressV = TextureAddressMode.Wrap;
graphics.GraphicsDevice.RenderState.StencilEnable = true;
//graphics.GraphicsDevice.RenderState.CullMode = CullMode;
#endregion

base.Draw(gameTime);
}




Re: XNA Game Studio Express 2d resets with nuclex fonts?

sugrhigh

nothing




Re: XNA Game Studio Express 2d resets with nuclex fonts?

Nick Gravelyn

Did you try the TextManager class That's what I use and I don't mess with resetting the settings manually. Just create a TextManager class like anything other game component:

TextManager manager = new TextManager(this);
Components.Add(manager);

And then when you render a string instead of using

myFont.DrawString(...);

You would use

manager.DrawString(myFont, ...);

And it handles all the resetting after the fact. I believe that should help you out. The TextManager fixed all my problems anyway.




Re: XNA Game Studio Express 2d resets with nuclex fonts?

sugrhigh

ove experimented with that lately but im trying to eliminate all the other variables going on so ill get back to you





Re: XNA Game Studio Express 2d resets with nuclex fonts?

sugrhigh

i cant even use the textmanager class to work... maybe im missing something...

it doesnt draw ANYTHING