Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


Swatter555

Member Since 03 Jun 2003
Offline Last Active Jul 07 2013 09:14 PM

Posts I've Made

In Topic: DPI awareness and a full-screen

01 July 2013 - 03:47 PM

I am stuck.

 

- I cannot compile the linked program because I have a poor mans version of Visual Studio.

 

- Even if I could compile the program and use it, DIrect2D automatically scales everything if I declare my application as DPI aware.

 

Bottom line, unless I figure out how to disable Direct2D automatic scaling, I cannot implement a custom scaling solution. Unless someone can tell me a way to disable virtualization without making my application DPI aware.


In Topic: DPI awareness and a full-screen

30 June 2013 - 09:28 PM

marcClintDion-

 

Thanks for the tutorial. It helps to go back and think about the basics. As I was thinking about supporting different resolutions, my first thought was just to express all graphical elements as a percentage of the viewing surface. Say a button would be 2% by 1.5%. I haven't really had much time to test it, but it seems like a good idea. Although, I would imagine the screen would not be a carbon copy across all resolutions, but then again that might be ok.

 

Then again, I really cannot escape the logic of what irreversible is saying. I guess that is the answer.

 

As I said though, Direct2D automatically scales, but I would assume that can be disabled. I wish someone would write a book on Direct2D, MSDN is only so useful.

 

Let me see about implementing a true scaling method like irrev is talking about. Ill test it across various settings and get back to you.


In Topic: DPI awareness and a full-screen

30 June 2013 - 05:55 AM

I will do my best to understand here, I am pretty tired so hopefully I make sense.

 

PunCrathod-

 

In Visual Studio Express 2012, there is a flag for DPI awareness that says it automatically makes changes to the manifest. At least that's what it says. Does that not really work?

 

I may be tired, but doesn't the formula: <horizontal DPI> * <width, in pixels> / <default horizontal DPI> result in a larger window at higher DPI?

 

I must not be understanding what is going on correctly, but when someone changes their DPI, they are wanting larger text and icons. I read one MSDN page that encouraged people to use their max monitor resolutions and just use higher DPI settings if they have trouble with small icons and print. I just don't see how that effectively increases monitor resolution. You have bigger text and other items in the same space.

 

Unless you are truly dealing with a display device that handles higher dpi, your just resizing your display elements. I am missing something.

 

irreversible- Thanks for the link. Once I understand what the heck Windows and Direct2D is doing, that something I can look into.


In Topic: Direct2D: Strange behavior

19 April 2012 - 09:17 PM

Direct2D's BeginDraw and EndDraw operate only in response to WM_PAINT messages sent by the window message pump. Setting up a traditional game loop results in the window never updating. You can call Render() outside of the winProc, but it will ignore it. I experienced it first and then read it in the D2D documentation. Perhaps I am misunderstanding your post or perhaps you need to further elaborate.

I do want to create a traditional win32 application, but I need to control the render rate properly.


I was mistaken, you can place the OnPaint/Render in the traditional manner. Not sure why I couldn't get it to work before and I no doubt misunderstood MSDN docs I read. I do remember reading that you needed to call OnPaint in response to WM_PAINT, which is probably true, but I just didn't understand it in context.

Even so, I still can't get rid of the bottleneck. I must be misusing D2D in some way with the large number of little bitmaps I am drawing for the map.

In Topic: Direct2D: Strange behavior

19 April 2012 - 12:58 PM

I went ahead and took out my SendMessage calls and substituted it with InvalidateRect calls. Unfortunately the strange bottleneck behavior remains.

Does anybody actively use Direct2D around here who can guide me on how to use it properly in a game application? The MSDN examples only update the frame/window on resize or other rare conditions. If D2D is tailored to games (or is supposed to be), I am truly in the dark to making it work properly. How many truly robust game applications only update the frame/window on rare occasions?

For all of the cool things Direct2D does, there are too many drawbacks. 1) The only real examples I find are on MSDN (which are of limited value). 2) Nobody seems to work with it. 3) Trying to run a robust/updating game application through the windows message pump seems pure folly.

Please, someone guide me down the correct path!

PARTNERS