Jump to content
  • Advertisement
Sign in to follow this  
thedodgeruk

DXGI_FORMAT_R8G8B8A8_UINT , what container is best for this

This topic is 2479 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

whats the best container for this
DXGI_FORMAT_R8G8B8A8_UINT

[color=#2A2A2A]A four-component, 32-bit unsigned-integer format that supports 8 bits per channel including alpha.


a
struct
{
UINT r;
UINT g;
UINT b;
UINT a;
};

Share this post


Link to post
Share on other sites
Advertisement
I'm not sure what you mean by this.

Also, it'd be something like

struct
{
char r;
char g;
char b;
char a;
}


but there are plenty of people that just 'think' in terms of standard uint32_t or their equivalent.

EDIT: WTF did the code block do to my tabs

Share this post


Link to post
Share on other sites
Personally I'd use something like this as it gives good flexibility and options:
union
{
struct
{
unsigned char r, g, b, a;
};
unsigned char rgba[4];
unsigned int color;
};

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!