Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(450)

Unified Diff: samplecode/SampleLitAtlas.cpp

Issue 2237493002: Added PointLights to SkLights::Light (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: fixed serialization bug Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « samplecode/SampleLighting.cpp ('k') | samplecode/SampleShadowing.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samplecode/SampleLitAtlas.cpp
diff --git a/samplecode/SampleLitAtlas.cpp b/samplecode/SampleLitAtlas.cpp
index 5f62e2abfb1cfedd236dc3c2dae5ca7e8c6d7223..cb49bf38723721495746bc65e2f0d08ea3e93429 100644
--- a/samplecode/SampleLitAtlas.cpp
+++ b/samplecode/SampleLitAtlas.cpp
@@ -182,8 +182,9 @@ private:
void updateLights() {
SkLights::Builder builder;
- builder.add(SkLights::Light(SkColor3f::Make(1.0f, 1.0f, 1.0f), fLightDir));
- builder.add(SkLights::Light(SkColor3f::Make(0.2f, 0.2f, 0.2f)));
+ builder.add(SkLights::Light::MakeDirectional(
+ SkColor3f::Make(1.0f, 1.0f, 1.0f), fLightDir));
+ builder.add(SkLights::Light::MakeAmbient(SkColor3f::Make(0.2f, 0.2f, 0.2f)));
fLights = builder.finish();
}
« no previous file with comments | « samplecode/SampleLighting.cpp ('k') | samplecode/SampleShadowing.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698