Skip to content

Commit

Permalink
Merge pull request #782 from hx2A/fixbug
Browse files Browse the repository at this point in the history
fix #781 - `PShape.getSpecular()`, `.getEmissive()`, and `.getShininess()`
  • Loading branch information
benfry authored Sep 16, 2023
2 parents 9b1cc10 + ad9d86d commit 05eb929
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions core/src/processing/opengl/PShapeOpenGL.java
Original file line number Diff line number Diff line change
Expand Up @@ -2455,7 +2455,7 @@ public void setAmbient(int index, int ambient) {

@Override
public int getSpecular(int index) {
if (family == GROUP) {
if (family != GROUP) {
if (root.tessUpdate) {
return PGL.nativeToJavaARGB(tessGeo.polySpecular[firstPolyVertex + index]);
} else {
Expand Down Expand Up @@ -2528,7 +2528,7 @@ public void setSpecular(int index, int specular) {

@Override
public int getEmissive(int index) {
if (family == GROUP) {
if (family != GROUP) {
if (root.tessUpdate) {
return PGL.nativeToJavaARGB(tessGeo.polyEmissive[firstPolyVertex + index]);
} else {
Expand Down Expand Up @@ -2602,7 +2602,7 @@ public void setEmissive(int index, int emissive) {

@Override
public float getShininess(int index) {
if (family == GROUP) {
if (family != GROUP) {
if (root.tessUpdate) {
return tessGeo.polyShininess[firstPolyVertex + index];
} else {
Expand Down

0 comments on commit 05eb929

Please sign in to comment.