smremde Posted October 10, 2003 Posted October 10, 2003 does anyone know the managed DX9 equivelent of DX8's D3DCOLORVALUE - im trying to convert an vb app to vb.net. also the functions that go with colouts like D3DXColorLerp ... Quote
*Experts* Nerseus Posted October 11, 2003 *Experts* Posted October 11, 2003 Hmmm... I think you can just declare your own struct, as in: public struct ColorType { public byte b; public byte g; public byte r; public byte a; public ColorType(byte r, byte g, byte b) { this.r = r; this.g = g; this.b = b; this.a = 255; } public ColorType(Color c) { this.r = c.R; this.g = c.G; this.b = c.B; this.a = c.A; } } At least, that's what I used for returns to the LockRectangle call. The SDK might have a default color struct defined, I can't remember offhand. -nerseus Quote "I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut
smremde Posted October 11, 2003 Author Posted October 11, 2003 the soluction i found was to use System.Drawing.Color and the Microsoft.DirectX.Direct3D.ColorOperator module to manipulate them from the ms dx9 sdk documentation: ColorOperator Class -------------------------------------------------------------------------------- Contains methods for manipulating colors. Definition Visual Basic NotInheritable Public Class ColorOperator Inherits Object C# public sealed class ColorOperator : Object Managed C++ public __gc __sealed class ColorOperator : public Object JScript public class ColorOperator extends Object Members Table The following table lists the members exposed by the ColorOperator object. Add - Adds two color values together to create a new color value. AdjustContrast - Adjusts the contrast value of a color. AdjustSaturation - Adjusts the saturation value of a color. Lerp - Uses linear interpolation to create a color value. Modulate - Blends two colors. Negative - Creates the negative color value of a color value. Scale - Scales a color value. Subtract - Subtracts two color values to create a new color value. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.