View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0030119 | Open CASCADE | OCCT:Visualization | public | 2018-09-10 11:48 | 2019-02-21 00:20 |
Reporter | Assigned To | apn | |||
Priority | normal | Severity | feature | ||
Status | closed | Resolution | fixed | ||
Target Version | 7.4.0 | Fixed in Version | 7.4.0 | ||
Summary | 0030119: Visualization, OpenGl_ShaderManager - implement mechanism generating in/out section of shader programs | ||||
Description | It's desired to have functionality for generating source code for in/out section of shader programs, which will be collect var names and generate target source code in one place. | ||||
Steps To Reproduce | Not required | ||||
Tags | No tags attached. | ||||
Test case number | Not needed | ||||
|
Branch CR30119 has been created by mnv. SHA-1: c0c56870aa54d56e98a6d6053e24d9a0bf09c2b8 Detailed log of new commits: Author: mnv Date: Fri Sep 7 10:18:46 2018 +0300 0030119: Visualization - implement mechanism for generating in/out section of shader programs. Added function which generate in/out part of shaders source code from prepared list of variables. |
|
Branch CR30119 has been updated forcibly by mnv. SHA-1: 7b1e3aacc7b2cb460eef4308bd4e7f02d698b80a |
|
Branch CR30119 has been updated forcibly by mnv. SHA-1: 3d6d57d57262fee535392aad129c32c98cf4964c |
|
Patch is ready for review |
|
+//! List of variable of shader program. +typedef NCollection_Vector<TCollection_AsciiString> OpenGl_ShaderVarList; I still don't see an answer to the question, why NCollection_Vector is used here. + Standard_EXPORT void prepareShadersOutSrc (TCollection_AsciiString& theSrcVertOut, + TCollection_AsciiString& theSrcFragOut, + const OpenGl_ShaderVarList& theVarList); Should be static or const method. - aSrcVertExtraOut += - EOL"THE_SHADER_OUT vec2 ScreenSpaceCoord;"; + aVarList.Append ("vec2 ScreenSpaceCoord"); aSrcFragExtraOut += - EOL"THE_SHADER_IN vec2 ScreenSpaceCoord;" EOL"uniform int uPattern;" EOL"uniform float uFactor;"; Please generalize approach to cover uniform variables as well (probably, these can be specified per-stage). + if (!aVarList.IsEmpty()) + { + prepareShadersOutSrc (aSrcVertExtraOut, aSrcFragExtraOut, aVarList); + } This looks awkward to keep dedicated variables for that - aSrcVertExtraOut and aSrcFragExtraOut are probably should gone away. prepareShadersOutSrc() can be redefined to be called per-shader stage (take enumeration). Or even better, Graphic3d_ShaderObject::CreateFromSource() can be wrapped by OpenGl_ShaderObject/OpenGl_ShaderManager to take additional arguments (in/out variables, uniform variables). |
|
Branch CR30119 has been updated forcibly by mnv. SHA-1: dce5f089792f1199c8cc4e0ecd9a9b1ac9167a6c |
|
Branch CR30119 has been updated forcibly by mnv. SHA-1: a5bc3aef487c15a3928c3111fd430d77650739ae |
|
Branch CR30119 has been updated forcibly by mnv. SHA-1: 7a6f109f987b0a879b592a756d7f5b81f4e0dc99 |
|
Patch is ready for review. http://jenkins-test-12.nnov.opencascade.com/view/CR30119-master-MNV/view/ALL/ |
|
Branch CR30119_1 has been created by mnv. SHA-1: f3be2cb43dc3bf33a6e8080e80fdfd09c0647f14 Detailed log of new commits: Author: mnv Date: Fri Sep 7 10:18:46 2018 +0300 0030119: Visualization - implement mechanism for generating in/out section of shader programs. Added functionality which generate in/out part of shaders source code from prepared list of variables. |
|
Branch CR30119_1 has been updated forcibly by mnv. SHA-1: a4e9f20c1f1a42589006f2cdbdfbc1d311c0885a |
|
Branch CR30119_1 has been updated forcibly by mnv. SHA-1: de15358417492fed963a77ae96c0347fa2d047b9 |
|
Branch CR30119_1 has been updated forcibly by mnv. SHA-1: ba91a5d576536c48fa3bfcd1a232fef2337f1650 |
|
Branch CR30119_1 has been updated forcibly by kgv. SHA-1: f856ee605986c81b59f3857728b98ab248816147 |
|
Branch CR30119_2 has been created by kgv. SHA-1: fb4dea0c406931e5238d5cc75ddf06e3c68deba5 Detailed log of new commits: Author: mnv Date: Fri Sep 7 10:18:46 2018 +0300 0030119: Visualization - implement mechanism for generating in/out section of shader programs Added functionality which generate in/out part of shaders source code from prepared list of variables. |
|
Please take the patch (reviewed with amendments). http://jenkins-test-12.nnov.opencascade.com:8080/view/CR30119_2-master-KGV |
|
Combination - OCCT branch : CR30119_2 SHA - fb4dea0c406931e5238d5cc75ddf06e3c68deba5 Products branch : master SHA - 35af85def09c66ceeaf90b4e4fb8b54e68d5e98c was compiled on Linux, MacOS and Windows platforms and tested in optimize mode. Number of compiler warnings: No new/fixed warnings Regressions/Differences/Improvements: No regressions/differences CPU differences: Debian80-64: OCCT Total CPU difference: 17629.539999999823 / 17520.90999999988 [+0.62%] Products Total CPU difference: 7459.220000000069 / 7462.09000000004 [-0.04%] Windows-64-VC14: OCCT Total CPU difference: 17688.563387498496 / 17666.582846598394 [+0.12%] Products Total CPU difference: 8382.495333599978 / 8372.402068899986 [+0.12%] Image differences : No differences that require special attention Memory differences : No differences that require special attention |
|
Branch CR30119_2 has been deleted by inv. SHA-1: fb4dea0c406931e5238d5cc75ddf06e3c68deba5 |
|
Branch CR30119_1 has been deleted by inv. SHA-1: f856ee605986c81b59f3857728b98ab248816147 |
|
Branch CR30119 has been deleted by inv. SHA-1: 7a6f109f987b0a879b592a756d7f5b81f4e0dc99 |
occt: master 3b4c6945 2018-09-07 07:18:46
Committer: apn Details Diff |
0030119: Visualization, OpenGl_ShaderManager - implement mechanism generating in/out section of shader programs Added functionality which generate in/out part of shaders source code from prepared list of variables. |
Affected Issues 0030119 |
|
mod - src/OpenGl/OpenGl_ShaderManager.cxx | Diff File | ||
mod - src/OpenGl/OpenGl_ShaderObject.cxx | Diff File | ||
mod - src/OpenGl/OpenGl_ShaderObject.hxx | Diff File | ||
mod - src/ViewerTest/ViewerTest_ViewerCommands.cxx | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2018-09-10 11:48 |
|
New Issue | |
2018-09-10 11:48 |
|
Assigned To | => kgv |
2018-09-10 11:48 |
|
Assigned To | kgv => mnv |
2018-09-10 11:48 |
|
Status | new => assigned |
2018-09-10 11:58 | git | Note Added: 0079079 | |
2018-09-10 14:42 | git | Note Added: 0079085 | |
2018-09-10 15:34 | git | Note Added: 0079089 | |
2018-09-11 08:56 |
|
Note Added: 0079108 | |
2018-09-11 08:56 |
|
Assigned To | mnv => kgv |
2018-09-11 08:56 |
|
Status | assigned => resolved |
2018-09-11 08:56 |
|
Steps to Reproduce Updated | |
2018-09-11 11:02 | kgv | Note Added: 0079111 | |
2018-09-11 11:02 | kgv | Assigned To | kgv => mnv |
2018-09-11 11:02 | kgv | Status | resolved => assigned |
2018-09-26 14:36 | git | Note Added: 0079409 | |
2018-09-26 15:03 | git | Note Added: 0079411 | |
2018-09-27 08:55 | git | Note Added: 0079428 | |
2018-09-27 13:42 |
|
Note Added: 0079441 | |
2018-09-27 13:42 |
|
Assigned To | mnv => kgv |
2018-09-27 13:42 |
|
Status | assigned => resolved |
2018-09-27 13:59 | kgv | Severity | minor => feature |
2018-09-27 13:59 | kgv | Summary | Visualization - implement mechanism for generating in/out section of shader programs. => Visualization, OpenGl_ShaderManager - implement mechanism generating in/out section of shader programs |
2018-10-11 14:02 | git | Note Added: 0079886 | |
2018-10-11 14:15 | git | Note Added: 0079887 | |
2018-10-11 14:21 | git | Note Added: 0079888 | |
2018-10-15 15:56 | git | Note Added: 0079965 | |
2018-10-22 20:07 | git | Note Added: 0080208 | |
2018-10-22 22:04 | git | Note Added: 0080209 | |
2018-10-22 23:45 | kgv | Note Added: 0080210 | |
2018-10-22 23:45 | kgv | Assigned To | kgv => bugmaster |
2018-10-22 23:45 | kgv | Status | resolved => reviewed |
2018-10-22 23:45 | kgv | Relationship added | related to 0029076 |
2018-10-23 11:08 | apn | Test case number | => Not needed |
2018-10-23 11:08 | apn | Note Added: 0080220 | |
2018-10-23 11:08 | apn | Status | reviewed => tested |
2018-10-28 13:20 | apn | Changeset attached | => occt master 3b4c6945 |
2018-10-28 13:20 | apn | Assigned To | bugmaster => apn |
2018-10-28 13:20 | apn | Status | tested => verified |
2018-10-28 13:20 | apn | Resolution | open => fixed |
2018-10-28 16:13 | git | Note Added: 0080416 | |
2018-10-28 16:13 | git | Note Added: 0080417 | |
2018-10-28 16:14 | git | Note Added: 0080428 | |
2019-02-21 00:20 | kgv | Relationship added | parent of 0030384 |