Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


SIC Games

Member Since 22 Jun 2012
Offline Last Active May 13 2015 08:26 AM

Posts I've Made

In Topic: D2DFontX 1.0 Released Today!

09 May 2015 - 02:11 PM

New functions help to translate, scale, rotate, skew and to set the the world matrix.

//-- Global Declaration.
D2DFontX *fontX;

bool InitFontX(IDXGISwapChain *d3d11swapchain, HWND windowhandle) {
     FontSettings fontSettings = FontSettings(L"Impact",16.0f, FONTCOLOR(1,1,1,1), DWRITE_FONT_WEIGHT::DWRITE_FONT_WEIGHT_NORMAL, 
     DWRITE_FONT_STYLE::DWRITE_FONT_STYLE_NORMAL);
     fontX = new D2DFontX(d3d11swapchain, fontSettings, windowhandle);
     if(fontX) {

       D2D1::Matrix3x2F myWorld;
       fontX->Translate(100,100); 
       myWorld = fontX->getTranslationMatrix();
       fontX->setWorldTransform(myWorld);
        return true;
         }
return false;
}

void renderFontX(std::wstring text) {
if(fontX) {
             fontX->RenderText(text);
          }
}


In Topic: D2DFontX 1.0 Released Today!

09 May 2015 - 01:20 PM

 

void D2DFontX::RenderText(std::wstring text) {
	//Create our string
	std::wostringstream printString;
	printString << text;
	Text = printString.str(); // (std::wstring D2DFontX::Text)

	//Draw the Text
	TextRenderTarget->DrawTextW(
		Text.c_str(),
		wcslen(Text.c_str()),

... What.

 

That whole thing was stored inside a global decaration std::wstring. No longer needed and I don't know why it was there in the first place.


In Topic: D2DFontX 1.0 Released Today!

09 May 2015 - 01:14 PM

That bit is probablly unnecessary code.  Committing a change now :D


In Topic: Issue with D2D10.1 blending with D3D11 Render Target

09 May 2015 - 12:52 PM

the repository for the D2DFontX Library has been released today IeDoc.

 

http://www.gamedev.net/topic/668283-d2dfontx-10-released-today/


In Topic: Issue with D2D10.1 blending with D3D11 Render Target

07 May 2015 - 10:45 AM

Well high five to IeDoc! I got the D2D1 interoped from the samples you provided with ease. Just had to make sure I released some of the objects. D2D1 Debug Information was giving me memory leaks warning.

 

So this is cool and awesome because less code and easy to intergrate! Finally Microsoft done something cool. :D


PARTNERS