[英]DirectX11 - Is it possible to render 2D graphics using D3DX11CreateTextureFromFile?
[英]directx11 add glow to DrawLine 2d
我画一条2D线我该如何给它增加发光效果?
auto renderer::draw_line(point<float> const& start_point, point<float> const& end_point, float const stroke_width, color const& stroke_color) -> void {
brush->SetColor(D2D1::ColorF(stroke_color.r, stroke_color.g, stroke_color.b, stroke_color.a));
device_context_d2d1->DrawLine(
D2D1::Point2F(start_point.x + offsetX, start_point.y + offsetY),
D2D1::Point2F(end_point.x + offsetX, end_point.y + offsetY),
brush.get(), stroke_width
);
}
我认为这与该功能有关
ID2D1Effect* shadowEffect;
device_context_d2d1->CreateEffect(CLSID_D2D1Shadow, &shadowEffect);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.