Jump to content

  • Log In with Google      Sign In   
  • Create Account


We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.

Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


Member Since 14 Sep 2011
Offline Last Active Sep 20 2014 07:31 PM

Posts I've Made

In Topic: Font Rendering Woes (FreeType)

31 August 2014 - 10:49 PM

I think

byte intensity = ftBitmap->buffer[y * ftBitmap->pitch + x];

should be something like

float intensity = ftBitmap->buffer[y * ftBitmap->pitch + x] / 255.0f;


Perfect, this fixed it, many thanks :)


Are you sure this is not .jpg artifact? I'm not sure how good quality is on those.

I feel that part of the horrible quality it was producing was due to it being a JPG (tried PNG, looks better), but it turns out the actual issue was the data type that the intensity was using. Many thanks for the help though :)

In Topic: Tracing a ray to a certain X value

28 March 2012 - 10:58 PM


In Topic: Tracing a ray to a certain X value

26 March 2012 - 08:52 PM


In Topic: Tracing a ray to a certain X value

22 March 2012 - 05:13 PM


In Topic: Tracing a ray to a certain X value

11 March 2012 - 08:48 PM

I never call CreateWindow(). The windows are managed by the Managed C++ code that handles the forms (one of the reasons all the rendering code is in an unmanaged DLL). I just take the window sizes given (and the hWnd of each window). Would that affect it?

You should still make sure the client size (i.e. excluding titlebar and borders) is equal to your backbuffer, otherwise you will get some ugly downsampling and messed up picking as Evil Steve noted. I'm not sure what you would use in C++ but it should be something like "yourwindow.ClientSize = (800, 600)" in pseudocode.

When the 'window' is resized, the managed C++ code puts the new size (excluding bars) into the directx code to resize window.. I think it always has the correct window size.