diff options
author | Dennis Kasprzyk <onestone@opencompositing.org> | 2007-07-04 19:53:13 +0200 |
---|---|---|
committer | Dennis Kasprzyk <onestone@opencompositing.org> | 2007-07-04 19:53:13 +0200 |
commit | d89d59c074b8601ae415ff107e83b2800312a6a0 (patch) | |
tree | 65689085b7c2a46ef4502facbc5ffa132f771faa | |
parent | 89724e285406d18d1b5eaabbc75c5459562f0282 (diff) | |
download | atlantis-d89d59c074b8601ae415ff107e83b2800312a6a0.tar.gz atlantis-d89d59c074b8601ae415ff107e83b2800312a6a0.tar.bz2 |
Added option to enable colors
-rw-r--r-- | atlantis.c | 10 | ||||
-rw-r--r-- | atlantis.xml | 5 |
2 files changed, 13 insertions, 2 deletions
@@ -268,13 +268,13 @@ static void atlantisPaintInside (CompScreen *s, const ScreenPaintAttrib *sAttrib glPushAttrib(GL_COLOR_BUFFER_BIT | GL_TEXTURE_BIT | GL_LIGHTING_BIT); glDisable(GL_BLEND); - if (!glIsEnabled(GL_CULL_FACE)) + if (glIsEnabled(GL_CULL_FACE)) { enabledCull = TRUE; glEnable(GL_CULL_FACE); } - glDisable(GL_CULL_FACE); + glPushMatrix(); glScalef(0.00001,0.00001,0.00001); @@ -290,6 +290,12 @@ static void atlantisPaintInside (CompScreen *s, const ScreenPaintAttrib *sAttrib glEnable(GL_NORMALIZE); glEnable(GL_LIGHTING); glEnable(GL_LIGHT1); + glEnable(GL_LIGHT0); + + if (atlantisGetColors(s)) + glEnable (GL_COLOR_MATERIAL); + else + glDisable (GL_COLOR_MATERIAL); glEnable(GL_DEPTH_TEST); glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); diff --git a/atlantis.xml b/atlantis.xml index 80e7e29..1bbd24c 100644 --- a/atlantis.xml +++ b/atlantis.xml @@ -20,6 +20,11 @@ <min>5</min> <max>100</max> </option> + <option name="colors" type="bool"> + <short>Colors</short> + <long>Enable colors</long> + <default>true</default> + </option> </screen> </plugin> </compiz> |