lightSpecular()

Lights Camera / Lights

Description

Sets the specular color for lights. Affects materials with specular component.

Syntax

void lightSpecular(float r, float g, float b)

Parameters

NameTypeDescription
rfloatred component
gfloatgreen component
bfloatblue component

Returns

void

Related

Under the Hood

From Processing.h:

void lightSpecular(float r, float g, float b); inline void PGraphics::lightSpecular(float r, float g, float b) { if(PApplet::g_papplet) PApplet::g_papplet->lightSpecular(r,g,b); }

Under the Hood

From Processing.cpp:

void PApplet::lightSpecular(float r, float g, float b) { // Store as pending so subsequent light calls pick it up pendingSpecR = lc(r); pendingSpecG = lc(g); pendingSpecB = lc(b); // Also apply to any already-created lights for (int i = 0; i < lightIndex; i++) { GLenum lt = GL_LIGHT0 + i; GLfloat col[] = { pendingSpecR, pendingSpecG, pendingSpecB, 1.0f }; glLightfv(lt, GL_SPECULAR, col); } }