MantisBT - Community
View Issue Details
0029754Community[OCCT] OCCT:Codingpublic2018-05-11 07:092018-05-24 16:02
Vico Liang 
normalintegration request 
[OCCT] 7.3.0 
0029754: Replace Graphic3d_ZLayerId with Standard_Interger inside OpenGl_GraphicDriver
In class OpenGl_GraphicDriver,Graphic3d_ZLayerId is used:
void AddZLayer (const Graphic3d_ZLayerId theLayerId) Standard_OVERRIDE;
void RemoveZLayer (const Graphic3d_ZLayerId theLayerId) Standard_OVERRIDE;

In class V3d_Viewer, Standard_Integer is used:
Standard_Boolean AddZLayer (Standard_Integer& theLayerId);
Standard_Boolean RemoveZLayer (const Standard_Integer theLayerId);

It would be better to unify the interface and remove Graphic3d_ZLayerId.
No tags attached.
Issue History
2018-05-11 07:09Vico LiangNew Issue
2018-05-11 07:09Vico LiangAssigned To => kgv
2018-05-11 09:40kgvNote Added: 0075935
2018-05-11 12:05kgvSeverityminor => integration request
2018-05-14 08:54gitNote Added: 0075955
2018-05-14 09:03gitNote Added: 0075956
2018-05-14 09:54kgvNote Added: 0075957
2018-05-14 09:54kgvAssigned Tokgv => san
2018-05-14 09:54kgvStatusnew => resolved
2018-05-14 09:54kgvTarget Version7.4.0* => 7.3.0
2018-05-24 16:02abvChangeset attached => occt master 8f138407
2018-05-24 16:02abvAssigned Tosan => abv
2018-05-24 16:02abvStatusresolved => verified
2018-05-24 16:02abvResolutionopen => fixed

2018-05-11 09:40   
Graphic3d_ZLayerId is here to have at least some tiny line between enumeration defining standard Layers (Graphic3d_ZLayerId_Default, Graphic3d_ZLayerId_Top, Graphic3d_ZLayerId_Topmost, Graphic3d_ZLayerId_TopOSD, Graphic3d_ZLayerId_BotOSD) and API for managing Layers.

At the same time, V3d_Viewer::AddZLayer() and V3d_Viewer::RemoveZLayer() are declared for managing custom Layers, so that Graphic3d_ZLayerId enumeration is not helpful. But I suppose that it is better unifying interface and replacing Standard_Integer with Graphic3d_ZLayerId in these two methods.
2018-05-14 08:54   
Branch CR29754 has been created by kgv.

SHA-1: 2272241632b071ddf4421303fe9aa0d602dc248d

Detailed log of new commits:

Author: kgv
Date: Mon May 14 08:54:08 2018 +0300

    0029754: Coding Rules - replace Standard_Integer with Graphic3d_ZLayerId for consistency
2018-05-14 09:03   
Branch CR29754 has been updated forcibly by kgv.

SHA-1: ce0f6b3b0f0cbb3c2a7294843f12d28cecf1384b
2018-05-14 09:54   
Patch is ready for review. [^]