1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-10 18:51:21 +03:00

5583 Commits

Author SHA1 Message Date
kgv
7fd4958d45 0032188: Visualization, Graphic3d_Aspects - define backface culling using Graphic3d_TypeOfBackfacingModel
Graphic3d_Aspects::ToSuppressBackFaces() bool flag has been replaced by
Graphic3d_Aspects::FaceCulling() property defined by Graphic3d_TypeOfBackfacingModel enumeration.

Graphic3d_TypeOfBackfacingModel_Auto corresponds to old ToSuppressBackFaces()==TRUE;
Graphic3d_TypeOfBackfacingModel_DoubleSided corresponds to old ToSuppressBackFaces()==FALSE;
Graphic3d_TypeOfBackfacingModel_BackCulled allows enabling back face culling regardless of Graphic3d_Group::IsClosed() flag.

XCAFDoc_VisMaterial::IsDoubleSided() bool flag has been replaced by
XCAFDoc_VisMaterial::FaceCulling() property defined by Graphic3d_TypeOfBackfacingModel enumeration.

glTF reader now maps "doubleSided" material flag into
Graphic3d_TypeOfBackfacingModel_BackCulled (forced back face culling) and
Graphic3d_TypeOfBackfacingModel_Auto (e.g. practically doubleSided as there is no closed/open info in glTF).

glTF writer by default writes materials as "doubleSided" save the Graphic3d_TypeOfBackfacingModel_BackCulled property set
(in future, extra logic might written for automatically defining singleSided materials for Solid B-Rep objects).

Removed obsolete unused types V3d_TypeOfPickCamera, V3d_TypeOfPickLight, V3d_TypeOfRepresentation, and V3d_Coordinate.
Deprecated types V3d_TypeOfBackfacingModel, V3d_TypeOfLight, and V3d_TypeOfShadingModel.
2021-03-04 19:40:23 +03:00
kgv
42ddd0028c 0032184: Visualization - remove ambiguous AIS_GlobalStatus constructor
Auxiliary AIS_GlobalStatus constructor has been removed.
AIS_InteractiveContext::setObjectStatus() no more adds
an invalid -1 mode to AIS_GlobalStatus.

Never updated property AIS_GlobalStatus::GetLayerIndex() has been removed;
AIS_InteractiveContext::SetTransformPersistence() has been corrected to use
ZLayer defined within object itself.
2021-03-04 19:39:20 +03:00
kgv
33425a46b8 0032143: Visualization - add option excluding transparent object from sorting
Added option Graphic3d_AlphaMode_MaskBlend combining Mask (no sorting)
and Blend (enable blending with background) behavior.
2021-03-04 19:38:16 +03:00
kgv
ba590cbf15 0032180: Visualization - StdSelect_BRepOwner::SetLocation() does not update selected sub-shape
StdSelect_BRepOwner::SetLocation() now propagates location to sub-shape presentation instead of invalidating it.
2021-02-27 15:36:19 +03:00
osa
bc0711a5c3 0032171: Data Exchange - RWGltf_TriangulationReader doesn't copy cached bounding box
Save cached bounding box in loaded triangulation getting it from "proxy" late-loaded object.
2021-02-26 17:31:02 +03:00
kgv
53219061ca 0032165: Visualization - remove obsolete method AIS_InteractiveContext::PurgeViewer() 2021-02-26 10:56:32 +03:00
kgv
decbff0dfd 0032161: Coding Rules - deprecate obsolete alias PrsMgr_PresentationManager3d 2021-02-26 10:56:31 +03:00
kgv
1507ccda40 0032168: Visualization - Wrong computation of screen axis in V3d_View::SetTwist method
Fixed wrong axis check.
2021-02-26 10:56:31 +03:00
kgv
478862fcc2 0032160: Coding Rules - merge AIS_InteractiveContext_*.cxx into single file
Removed redundant .lxx files from API package.

AIS_InteractiveContext_1.cxx,AIS_InteractiveContext_2.cxx,AIS_InteractiveContext_3.cxx
have been merged into AIS_InteractiveContext.cxx.
V3d_View_2.cxx,V3d_View_3.cxx,V3d_View_4.cxx have been merged into V3d_View.cxx
V3d_View_4.cxx has been merged into V3d_View.cxx.
2021-02-25 18:58:50 +03:00
kgv
39e6123e3b 0032162: Visualization - move AIS_DisplayStatus from AIS_GlobalStatus to PrsMgr_PresentableObject
AIS_DisplayStatus has been renamed to PrsMgr_DisplayStatus
and moved from AIS_GlobalStatus class field to PrsMgr_PresentableObject.

0032167: Visualization, AIS_InteractiveContext - setObjectStatus sets wrong status when AIS_DS_Erased

AIS_InteractiveContext::setObjectStatus() Fixed setting unexpected Displayed status to Erased objects.
2021-02-25 18:58:49 +03:00
kgv
79d49683d6 0032155: Tests - remove broken command OCC280
Command OCC280 and a couple of useless tests have been removed.
Test case bug349 has been updated to reproduce scenario using standard commands.
2021-02-25 18:55:30 +03:00
kgv
72ed06442e 0032154: Tests - include vglinfo into Tests Summary
Command testgrid now includes vglinfo into summary.
Command vinit has been extended by -virtual option creating an offscreen window.
Command vglinfo now splits long values into multiple lines.
Added test case v3d/glsl/glinfo dumping OpenGL context creation info.

OpenGl_Window - fixed initialization of OpenGL 4.6 Core Profile (was limited to 4.5).
2021-02-25 18:55:29 +03:00
kgv
02a2beaad9 0032153: Visualization, Graphic3d_ArrayOfPrimitives - share common allocator
Added method Graphic3d_Buffer::DefaultAllocator(), which is now used across code.
2021-02-25 18:55:28 +03:00
kgv
4bf072e4eb 0032152: Visualization - move out GLSL program generator from OpenGl_ShaderManager to Graphic3d_ShaderManager 2021-02-25 18:55:27 +03:00
kgv
4464c6b591 0032149: Draw Harness, ViewerTest - remove obsolete command vfeedback 2021-02-25 18:55:27 +03:00
kgv
9299697997 0032150: Visualization, TKOpenGl - ignore OpenGl_Caps::ffpEnable when FFP is unavailable
OpenGl_Workspace::Activate() now implicitly disables OpenGl_Caps::ffpEnable when it is unsupported.
OpenGl_AspectsSprite::build() now ignores OpenGl_Caps::pntSpritesDisable when Display Lists are unsupported.
2021-02-24 20:59:43 +03:00
kgv
93cdaa76da 0031196: Visualization, TKOpenGl - enable Ray-Tracing using OpenGL ES 3.2
OpenGl_Context now activates Ray-Tracing and arbTboRGB32 for GLES 3.2.
Removed initialization of some uniforms from GLSL code.
Fixed implicit casts within Ray-Tracing shaders.
2021-02-24 20:58:38 +03:00
kgv
127330f9d7 0032147: Documentation - drop mentioning of WOK from build_3rdparty 2021-02-20 19:00:34 +03:00
kgv
374dffea0b 0032139: Visualization - support single-precision floating point data within Poly_Triangulation
Introduced NCollection_AliasedArray collection defining a general byte array
to be aliased as array of elements of mutable type.

Poly_ArrayOfNodes specializes this interface for collecting 2d/3d points with single/double precision.
Poly_Triangulation relies on this new class for definition of 3D nodes and UV coordinates
using gp_Pnt and gp_Pnt2d by default as before.

RWGltf_CafReader now fills in triangulation using single precision by default (as stored in the file).
2021-02-20 18:58:56 +03:00
kgv
e44b849de9 0032145: Coding Rules - move GL functions loading to OpenGl_GlFunctions.cxx 2021-02-20 18:57:49 +03:00
asuraven
a13df0fee0 0031990: Coding, Draw Harness - Replace C-like pointers to function in Draw_SaveAndRestore class to virtual function
Save/Restore interface has been moved to Draw_Drawable3D base class.
Create a singleton Draw_Params class for DRAW parameters
2021-02-20 10:43:32 +03:00
dpasukhi
930b466c9b 0032087: Data Exchange, STEPCAFControl_Reader - NULL representation of shape for DGT
- Fixed problem with find a Path for the DimensionType_Location_WithPath
- Added check for the null object within FindShapeIndexForDGT
2021-02-20 10:43:17 +03:00
vro
a8b605eb5e 0032133: Modeling Data - Restriction of access to internal arrays for Poly_Triangulation, revision of API
Removed methods from Poly_Triangulation/Poly_PolygonOnTriangulation giving access to internal arrays of 2d and 3d nodes, triangles and normals.
2021-02-18 18:55:21 +03:00
kgv
008210c3e2 0032129: Visualization, TKOpenGl - shadowmap is broken for ZLayer having non-zero origin
OpenGl_LayerList::renderLayer() - fixed usage of wrong camera while rendering shadowmap,
and apply Z-Layer origin shift to shadowmap matrix while applying shadow.
2021-02-14 01:11:37 +03:00
osa
92f8ec2f01 0032099: Visualization - define OSD_FileSystem class managing opening of file streams
1) Remove unnecessary includes of "Standard_OStream.hxx" file and add it only into files where it is really used.
2) Create the base interface for a file stream provider OSD_FileSystem and its inheritor OSD_CachedFileSystem that keeping last stream to be reused for opening a stream with the same URL.
3) Use OSD_CachedFileSystem object instead of RWGltf_GltfSharedIStream during Gltf reading.
2021-02-13 11:04:19 +03:00
kgv
9ee2481598 0032124: Visualization, AIS_Shape - setting color will cause Iso Lines to appear due to misprint in Prs3d_Drawer::SetOwnLineAspects()
Fixed misprint myUIsoAspect -> myVIsoAspect.
2021-02-11 20:06:15 +03:00
emv
8d55cb22a8 0031974: Modeling Algorithms - Strange behavior of boolean operations on this BREP
Problem is fixed by #0031995. Integrating test case only.
2021-02-11 20:06:14 +03:00
mkrylova
2daa5d95a5 0031704: Visualization - add an interactive object AIS_LightSource representing a light source
Added new class AIS_LightSource representing a light source presentation.

Graphic3d_TMF_CameraPers - added new mode to Graphic3d_TransformPers
defining 3D point relative to camera Eye position
2021-02-11 20:06:14 +03:00
kgv
9779ff75fd 0032095: Tests - drop comparison in unstable perf/ncollection group
Mark performance deviations compared to STL collections as warnings instead of errors.
2021-02-11 20:06:13 +03:00
dpasukhi
830616a60b 0032119: Coding Rules - eliminate msvc warning C4800 (implicit cast to bool) after fix for 32115
Fixed incorrect comparison and forcing cast
2021-02-10 20:45:26 +03:00
kgv
e03a03fdc2 0032122: Samples - handle WASD keys in WebGL sample 2021-02-10 20:44:31 +03:00
kgv
1ff3663c91 0032118: Visualization, Graphic3d_MarkerImage::StandardMarker() - return marker with pre-defined id 2021-02-10 20:42:57 +03:00
kgv
665dc9e50b 0032117: Visualization, TKOpenGl - assert in OpenGl_AspectsSprite due to implicit destruction of existing resource
RGBA and Alpha markers are now handled independently within OpenGl_AspectsSprite::build().
2021-02-10 20:42:57 +03:00
dpasukhi
00a72254dc 0032115: Data Exchange, STEP reader - Incorrect full path to file is not caught
Fixed a checking for a non-existent step file
2021-02-06 14:09:56 +03:00
dpasukhi
0c38be8f8d 0031970: Data Exchange, STEP reader - parser syntax error messages are inaccessible
- Upgraded files using new version of WinFlexBison
 - Removed global variables within StepFile_Read.cxx
 - Upgraded error message during bison analyzing ( added a expected expression information )
 - Used 'Interface_ParamType' as argument type for the StepFile_ReadData::Argument
 for a compatibility with the StepData/StepData_StepReaderData
 - Added handling parse errors and transferring it to the StepData_StepReaderData
 - Now parsing and referencing errors save in the check and non output by default
 - Step_file's and Step_Data's output info prints according by trace level of printer
 - Removed useless location.hxx
 - Removed TraceLevel for the StepFile_Reader ( now it useless,
  it is 0 by default and newer and nowhere change )
 - Translate error message into English within StepData_StepReaderData
 - Replace "Error" word in the output messages
2021-02-05 20:35:19 +03:00
kgv
1ac837b2c2 0032114: Visualization, TKOpenGl - broken PBR LUT on OpenGL ES 2.0
Added image formats Image_Format_RGF_half/Image_Format_RGBAF_half
with manual conversion between 32-bit float and 16-bit half-float values.

PBR LUT table is now converted into GL_HALF_FLOAT_OES data format in case of OpenGL ES 2.0.
2021-02-03 18:40:34 +03:00
kgv
75642c1489 0032110: Visualization, TKOpenGl - allow incomplete PBR on OpenGL ES 2.0 without GL_EXT_shader_texture_lod
textureCube() is now used as fallback when textureCubeLod() is unavailable.
2021-02-03 18:38:50 +03:00
kgv
7106e4c8b1 0032113: Visualization, TKOpenGl - broken PBR diffuse map within OpenGl_Caps::buffersOpaqueAlpha() on OpenGL ES 2.0
Fixed enabling of alpha channel writes while baking PBR environment.
2021-02-03 18:34:25 +03:00
emv
a36a30b724 0032108: Modeling Algorithms - BRepAlgoAPI_Section is too slow
Fixed by 0029711. Integrating test case only.
2021-02-03 18:32:55 +03:00
luz paz
4551e1be75 0031939: Coding - correction of spelling errors in comments [part 8]
Fix various typos

Fixed via codespell v2.1.dev
2021-02-03 18:31:42 +03:00
kgv
8df3104cd2 0032105: Visualization, TKOpenGl - PBR flat shading GLSL program compilation error on OpenGL ES 2.0
OpenGl_ShaderManager::defaultGlslVersion() - fixed combining two extensions in header.
2021-02-03 18:28:17 +03:00
kgv
e1d17cebe2 0032101: Visualization, TKOpenGl - use GL_UNPACK_ROW_LENGTH within OpenGL ES 3.0 / WebGL 2.0
Added OpenGl_Context::hasUnpackRowLength property for using GL_UNPACK_ROW_LENGTH in runtime.
OpenGl_Texture now uses GL_UNPACK_ROW_LENGTH on OpenGL ES 3.0 when necessary.
OpenGl_Texture::InitCubeMap() now allows uploading vertically-stacked cubemaps
without GL_UNPACK_ROW_LENGTH requirement.
2021-02-03 18:26:28 +03:00
kgv
82b856b880 0032079: Coding Rules - rename AIS_KindOfInteractive enumeration values with fully-qualified name
In addition, several ViewerTest command have been cleared out from duplicated checks.
2021-01-30 20:22:29 +03:00
kgv
4ad4054c90 0032094: Visualization, TKOpenGl - OpenGl_VertexBuffer::bindAttribute() silently does nothing without active GLSL program
OpenGl_VertexBuffer::bindAttribute() now prints an error message indicating a possible VBO misuse.
2021-01-29 19:54:31 +03:00
kgv
a0073def2d 0032081: Visualization - WebGL sample errors when run in Safari browser with WebGL 1.0
"MAX_WEBGL_VERSION=2" Emscripten option is now used for building sample instead of deprecated "USE_WEBGL2=1".
2021-01-29 19:51:18 +03:00
kgv
8f8fe4a97c 0032083: Visualization, TKOpenGl - PBR rendering is unavailable on Apple A12 Bionic (iPad)
Added "#define occLight_Index(theId) 0" workaround allowing to compile
a single light source PBR shading program on OpenGL ES 2.0,
as it disallows non-constant index expressions (even trivially deducable at compile-time).

PBR lookup table is now automatically resized to RGBA format
when RG texture format is unsupported (OpenGL ES 2.0).

OpenGl_ShaderManager now allows compiling PBR shaders
using WebGL 1.0 + GL_EXT_shader_texture_lod extension.

PBR IBL baking GLSL program has been redisigned to use
if/else to avoid non-constant index expressions.
Diffuse baking implements packing float values into a temporary RGBA8 texture
as a fallback solution on WebGL 1.0 implementations supporting float textures
but not as FBO render targets.

OpenGl_PBREnvironment now uses GL_FRAMEBUFFER instead of GL_DRAW_FRAMEBUFFER
for compatibility with OpenGL ES 2.0.
2021-01-29 19:51:18 +03:00
kgv
776302d46b 0032093: Visualization, TKOpenGl - loading texture in BGR format fails in OpenGL ES
Graphic3d_TextureRoot::convertToCompatible() - fixed handling of
Image_Format_BGR and Image_Format_BGRA formats.

OpenGl_Texture - added error message for unsupported pixel format;
error messages have been extended by resource id.
OpenGl_Texture::InitCubeMap() now does not release cubemap
on mipmaps generation failure.

Image_PixMap::ImageFormatToString() - added method returning name of pixel format.
2021-01-29 19:51:17 +03:00
emv
961c002c46 0031912: Modeling Algorithms - Boolean Cut can't build resulting shape
Problem is fixed by #0032058. Integrating test case only.
2021-01-29 19:44:58 +03:00
osa
538ab5dd8a 0032078: Visualization, Poly_Triangulation - add cached bounding box.
1) Add empty constructor for Poly_Triangulation(),
2) Add Poly_Triangulation::HasGeometry() method to check that triangulation has any geometry.
3) Add possibility to cache bounding box in Poly_Triangulation and use it later in case of empty triangulation.
4) Add Poly_Triangulation::MinMax() to extends input box with bounding box of triangulation.
5) Add Poly_Triangulation::UpdateCachedMinMax() to cache min - max range of this triangulation with bounding box of nodal data.
6) Add virtual Poly_Triangulation::computeBoundingBox() to calculate bounding box of nodal data.
7) Update BRepBndLib::Add/AddOptimal/AddOBB algorithms to check empty triangulation and use cached box in this case.
8) Update BRepGProp::roughBary/surfaceProperties/volumeProperties to skip empty triangulation.
9) Remove additional myBox from RWGltf_GltfLatePrimitiveArray and some hack to save this box as nodes of base Poly_Triangulation.
10) Cache min-max range from JT file during its parsing
2021-01-27 21:21:32 +03:00
kgv
a46ab511c5 0032082: Visualization, TKOpenGl - improve formatting of error messages
Error messages in TKOpenGl package have been improved to format
GLenum values as string constants or hex values.
OpenGl_VertexBuffer::init() now logs a message with error details
instead of just returning Boolean flag.
2021-01-24 23:48:10 +03:00