Skip to content

fix: ON_Material::MaxShine is not a function - #30

Merged
sbaer merged 1 commit into
mcneel:7.xfrom
aminya:maxshine-function
Dec 12, 2021
Merged

fix: ON_Material::MaxShine is not a function#30
sbaer merged 1 commit into
mcneel:7.xfrom
aminya:maxshine-function

Conversation

@aminya

@aminya aminya commented Dec 3, 2021

Copy link
Copy Markdown
Contributor

Cherry-picked from #28

  • It fixes a bug in opennurbs_gl where ON_Material::MaxShine which is a constant was being called as a function.
C:/opennurbs/opennurbs_gl.cpp:603:71: error: called object type 'double' is not a function or function pointer
    GLint shine = (GLint)(128.0*(pMat->Shine() / ON_Material::MaxShine()));
                                                 ~~~~~~~~~~~~~~~~~~~~~^

@sbaer

sbaer commented Dec 12, 2021

Copy link
Copy Markdown
Member

We don't actually compile this legacy source file any of our projects which is why it went by unnoticed. I suspect the CMake PR will need to be adjusted as this was probably discovered by compiling all source files in the opennurbs directory.

@sbaer
sbaer merged commit a098ce3 into mcneel:7.x Dec 12, 2021
danielgronlund pushed a commit to danielgronlund/opennurbs that referenced this pull request Apr 3, 2024
fix: ON_Material::MaxShine is not a function
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants