]> git.leopard-lacewing.eu Git - cgue_weave.git/commitdiff
point light moved
authorLockedLunatic <locked.lunatic@aon.at>
Sun, 26 Apr 2015 01:19:27 +0000 (03:19 +0200)
committerLockedLunatic <locked.lunatic@aon.at>
Sun, 26 Apr 2015 01:19:27 +0000 (03:19 +0200)
Weave/Graphix/Graphix.cpp
Weave/Graphix/Scene.cpp
shader/basicTexture_VS.hlsl

index 0692d32d072b98580b5a51842a88d63dc3a43669..df52a9d6ff4eb16b911efd5de2b89e53e8c2cf9c 100644 (file)
@@ -64,8 +64,8 @@ void Graphix::init()
        //SDL_ShowCursor(SDL_DISABLE);
        glEnable(GL_COLOR_MATERIAL);
        //glEnable(GL_TEXTURE_CUBE_MAP);
-       glEnable(GL_LIGHTING);
-       glEnable(GL_LIGHT0);
+       //glEnable(GL_LIGHTING);
+       //glEnable(GL_LIGHT0);
        glEnable(GL_CULL_FACE);
        glShadeModel(GL_SMOOTH);
 
index de193a84266f04483a48c34b91450cea2d78bb5c..18cefb46557c01067606692c590200ee073caa4c 100644 (file)
@@ -167,14 +167,14 @@ void Scene::draw() const
 
                //don't know if this is really the right place to set the lighting
                //add ambient light
-               GLfloat ambientcolor[] = { 0.5f, 0.5f, 0.5f, 1.0f };
-               glLightModelfv(GL_LIGHT_MODEL_AMBIENT, ambientcolor);
+               //GLfloat ambientcolor[] = { 0.5f, 0.5f, 0.5f, 1.0f };
+               //glLightModelfv(GL_LIGHT_MODEL_AMBIENT, ambientcolor);
 
                //add positioned light
-               GLfloat lightcolor0[] = { 1.5f, 1.5f, 1.5f, 1.0f };
-               GLfloat lightposition0[] = { 1.0f, 1.0f, 1.0f, 1.0f };
-               glLightfv(GL_LIGHT0, GL_DIFFUSE, lightcolor0);
-               glLightfv(GL_LIGHT0, GL_POSITION, lightposition0);
+               //GLfloat lightcolor0[] = { 1.5f, 1.5f, 1.5f, 1.0f };
+               //GLfloat lightposition0[] = { 1.0f, 1.0f, 1.0f, 1.0f };
+               //glLightfv(GL_LIGHT0, GL_DIFFUSE, lightcolor0);
+               //glLightfv(GL_LIGHT0, GL_POSITION, lightposition0);
        }
        
 
index bd3bd421fd2a3bff5c96c532120c350e47ed39b6..be82fbd5dc5bddb4f1599e1033269a2c7d4d9408 100644 (file)
@@ -20,7 +20,7 @@ void main()
        //for every directional light source define Direction and SpecularCos
        //everything else is in the Fragment Shader
 
-       vec3 PointLightPosition1 = vec3(0.0f, 0.0f, 0.0f);
+       vec3 PointLightPosition1 = vec3(0.0f, 5.0f, 0.0f);
        vec3 DirectionalLightDirection1 = normalize(vec3(-2.0f, -2.0f, -2.0f));