mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-19 13:40:49 +03:00
0028811: Visualization - merge texturing support into AIS_Shape class and get rid of AIS_TexturedShape
AIS_Shape and AIS_ColoredShape now computes Shaded presentation with UV coordinates if texture mapping is enabled in Drawer. OpenGl_Context::SetTextureMatrix() - fixed inconsistent handling of texture cooridnates translation vector. vtexture command has been extended to handle new arguments: * -trsfTrans, -trsfScale, -trsfAngle defining transformation matrix * -setFilter, -setAnisoFilter to setup texture filtering
This commit is contained in:
@@ -3251,7 +3251,8 @@ void OpenGl_Context::SetTextureMatrix (const Handle(Graphic3d_TextureParams)& th
|
||||
|
||||
// pack transformation parameters
|
||||
OpenGl_Vec4 aTrsf[2];
|
||||
aTrsf[0].xy() = theParams->Translation();
|
||||
aTrsf[0].x() = -theParams->Translation().x();
|
||||
aTrsf[0].y() = -theParams->Translation().y();
|
||||
aTrsf[0].zw() = theParams->Scale();
|
||||
aTrsf[1].x() = std::sin (-theParams->Rotation() * static_cast<float> (M_PI / 180.0));
|
||||
aTrsf[1].y() = std::cos (-theParams->Rotation() * static_cast<float> (M_PI / 180.0));
|
||||
|
Reference in New Issue
Block a user