Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 help and support Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.


Go Back   Vista Forums > Vista Newsgroup Archive > Misc Newsgroups > Avalon

RB

Vista - RenderCapability::Tier returns 131072?

 
 
06-28-2006   #1 (permalink)
John Dunn


 

RenderCapability::Tier returns 131072?

When I look at RenderCapability::Tier in my managed C++ app it returns
131072. Any idea what's going on? This is on XPsp2 with the latest WinFX
release. The code looks like -

int tier = RenderCapability::Tier;

Thanks-

John

My System SpecsSystem Spec
06-28-2006   #2 (permalink)
Adam Smith [MS]


 

Re: RenderCapability::Tier returns 131072?

Tier is in a Major.Minor format, with two bytes to each. So, tier 2.0 is (2
<< 16), which is 131072.

-Adam Smith [MS]

"John Dunn" <JohnDunn@discussions.microsoft.com> wrote in message
news:07B5DF5D-8B23-4781-955E-980B1C675ABA@microsoft.com...
> When I look at RenderCapability::Tier in my managed C++ app it returns
> 131072. Any idea what's going on? This is on XPsp2 with the latest WinFX
> release. The code looks like -
>
> int tier = RenderCapability::Tier;
>
> Thanks-
>
> John



My System SpecsSystem Spec
06-28-2006   #3 (permalink)
Drew Marsh


 

Re: RenderCapability::Tier returns 131072?

Adam Smith wrote:

> Tier is in a Major.Minor format, with two bytes to each. So, tier 2.0
> is (2 << 16), which is 131072.


Why not make it a System.Version[1] instead of an int then? It would sure
make it easier to work with.

Curious,
Drew

[1] http://msdn2.microsoft.com/en-us/lib...m.version.aspx


My System SpecsSystem Spec
06-28-2006   #4 (permalink)
Adam Smith [MS]


 

Re: RenderCapability::Tier returns 131072?

A reasonable suggestion, but it's really not a Version per se, though
clearly it shares some of the same design issues. For example, the Build
property has no meaning here, and Major and Minor aren't "revisions". The
expectation is that users of Tier will either perform exact equality or will
compare "<" or "<=", etc, none of which require 'cracking' the number to
separate major or minor tiers.

-Adam Smith [MS]


"Drew Marsh" <drub0y@hotmail.no.spamming.com> wrote in message
news:f01844f1f86a28c868c74eed2660@msnews.microsoft.com...
> Adam Smith wrote:
>
>> Tier is in a Major.Minor format, with two bytes to each. So, tier 2.0
>> is (2 << 16), which is 131072.

>
> Why not make it a System.Version[1] instead of an int then? It would sure
> make it easier to work with.
>
> Curious,
> Drew
>
> [1] http://msdn2.microsoft.com/en-us/lib...m.version.aspx
>
>



My System SpecsSystem Spec
06-28-2006   #5 (permalink)
Drew Marsh


 

Re: RenderCapability::Tier returns 131072?

Adam Smith wrote:

> A reasonable suggestion, but it's really not a Version per se, though
> clearly it shares some of the same design issues. For example, the
> Build property has no meaning here, and Major and Minor aren't
> "revisions". The expectation is that users of Tier will either
> perform exact equality or will compare "<" or "<=", etc, none of which
> require 'cracking' the number to separate major or minor tiers.


Yeah, excellent points... it's really not a version. I guess it's just awkward
having to shift the bytes around in the rich world of .NET. Perhaps a struct
that wraps up an int and offers two properties that do the shifting would
be nicer? Just thinking out loud, it's not really THAT bad, but I can see
a lot of people having to do this themselves to know what level of richness
to apply to their application based on the hardware capabilities.

Cheers,
Drew
___________________________________
Drew Marsh
Chief Software Architect
Mimeo.com, Inc. - http://www.mimeo.com
Microsoft C# / WPF MVP
Weblog - http://blog.hackedbrain.com/


My System SpecsSystem Spec
06-28-2006   #6 (permalink)
Adam Smith [MS]


 

Re: RenderCapability::Tier returns 131072?

I agree that shifting isn't fun, but I'm not sure how often people will even
care to extract the Major version.

I think that most people will do something like:

if (RenderCapability.Tier >= Tier1)
{
//nifty stuff
}
else
{
//fallback
}

where they will simply be comparing against a const instead of extracting
the specific major/minor.

-Adam Smith [MS]

"Drew Marsh" <drub0y@hotmail.no.spamming.com> wrote in message
news:f01844f1f86cd8c868d191359f3e@msnews.microsoft.com...
> Adam Smith wrote:
>
>> A reasonable suggestion, but it's really not a Version per se, though
>> clearly it shares some of the same design issues. For example, the
>> Build property has no meaning here, and Major and Minor aren't
>> "revisions". The expectation is that users of Tier will either
>> perform exact equality or will compare "<" or "<=", etc, none of which
>> require 'cracking' the number to separate major or minor tiers.

>
> Yeah, excellent points... it's really not a version. I guess it's just
> awkward having to shift the bytes around in the rich world of .NET.
> Perhaps a struct that wraps up an int and offers two properties that do
> the shifting would be nicer? Just thinking out loud, it's not really THAT
> bad, but I can see a lot of people having to do this themselves to know
> what level of richness to apply to their application based on the hardware
> capabilities.
>
> Cheers,
> Drew
> ___________________________________
> Drew Marsh
> Chief Software Architect
> Mimeo.com, Inc. - http://www.mimeo.com
> Microsoft C# / WPF MVP
> Weblog - http://blog.hackedbrain.com/
>
>



My System SpecsSystem Spec
 

Thread Tools


Similar Threads for: RenderCapability::Tier returns 131072?
Thread Forum
ipconfig returns too much Vista networking & sharing
N-Tier Networking Question Vista networking & sharing
BSOD returns! Vista performance & maintenance
EnumDisplayDevices from a service, returns none... Vista General
Same RenderCapability, Different CPU Usage Avalon


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51