Closed GoogleCodeExporter closed 8 years ago
The problem is that the Color4 type in SlimDX has an implicit conversion from
System.Drawing.Color, so the compiler is looking for it to make sure it gets
the right overload of Set().
I don't see a way to fix that without breaking things for other users. Is there
some reason you can't reference System.Drawing? It's not like adding a
reference increases the size of your assembly. Also, assemblies are loaded
on-demand, so if you never use the types from it, it won't even get loaded into
your process at runtime.
Original comment by Mike.Popoloski
on 22 Jan 2011 at 5:08
why does it give that error for the code above?
i'm trying to Set() a Vector4, not a Color4 as i already converted it a few
lines above.
so either the compiler is stupid enough to look for an implicit overload even
if an explicit one exists, or something else is wrong?
Original comment by stijn.ta...@gmail.com
on 23 Jan 2011 at 6:47
It has to build a candidate set of overloads to determine the best one to call.
To do this, it needs to know the conversions to and from each type in each
overload. Since the assembly isn't referenced it doesn't know anything about
the Color type, so it gives an error.
Original comment by Mike.Popoloski
on 23 Jan 2011 at 7:03
great :'(
Original comment by stijn.ta...@gmail.com
on 23 Jan 2011 at 9:13
I don't see why this is a problem. Just add the reference. If you don't
actually use any of the types, the assembly won't get loaded at runtime.
Original comment by Mike.Popoloski
on 23 Jan 2011 at 9:28
Original issue reported on code.google.com by
stijn.ta...@gmail.com
on 21 Jan 2011 at 3:51