HELP

Topics: Using Cosmos (Developing your own OS, projects, etc)
Aug 19, 2012 at 11:18 AM
Edited Aug 27, 2012 at 2:29 PM

In my OS i have decided to add transparency. the svga graphics return colors on the screen as uints, so i need a uint to color method. this is the code for color to uint:

public uint touint()

{

return (uint)((r * (255 * 255)) + (255 * g) + b);

}

EDIT

I found out how to. I also finished transparency

Aug 19, 2012 at 12:58 PM

So, you are trying to split a 4-byte uint into 4, 1 byte channels for red, green, blue and alpha?

Developer
Aug 21, 2012 at 10:07 PM
And what is the problem, again?

On 22 August 2012 06:36, LukeTerry <notifications@codeplex.com> wrote:

From: LukeTerry

So, you are trying to split a 4-byte uint into 4, 1 byte channels for red, green, blue and alpha?

Read the full discussion online.

To add a post to this discussion, reply to this email (Cosmos@discussions.codeplex.com)

To start a new discussion for this project, email Cosmos@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com


Coordinator
Aug 23, 2012 at 11:04 PM
Also, I think you need to multiply with 256, but I'd advise to do bitshifting, as it's more clear what happens then..


On Tue, Aug 21, 2012 at 11:24 PM, Cman332 <notifications@codeplex.com> wrote:

From: Cman332

And what is the problem, again?


On 22 August 2012 06:36, LukeTerry <notifications@codeplex.com> wrote:

From: LukeTerry

So, you are trying to split a 4-byte uint into 4, 1 byte channels for red, green, blue and alpha?

Read the full discussion online.

To add a post to this discussion, reply to this email (Cosmos@discussions.codeplex.com)

To start a new discussion for this project, email Cosmos@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com


Read the full discussion online.

To add a post to this discussion, reply to this email (Cosmos@discussions.codeplex.com)

To start a new discussion for this project, email Cosmos@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com