From: LockedLunatic Date: Sun, 26 Apr 2015 01:19:27 +0000 (+0200) Subject: point light moved X-Git-Url: https://git.leopard-lacewing.eu/?a=commitdiff_plain;h=9d3e765d065cab825562781563d7a89eae04502e;p=cgue_weave.git point light moved --- diff --git a/Weave/Graphix/Graphix.cpp b/Weave/Graphix/Graphix.cpp index 0692d32..df52a9d 100644 --- a/Weave/Graphix/Graphix.cpp +++ b/Weave/Graphix/Graphix.cpp @@ -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); diff --git a/Weave/Graphix/Scene.cpp b/Weave/Graphix/Scene.cpp index de193a8..18cefb4 100644 --- a/Weave/Graphix/Scene.cpp +++ b/Weave/Graphix/Scene.cpp @@ -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); } diff --git a/shader/basicTexture_VS.hlsl b/shader/basicTexture_VS.hlsl index bd3bd42..be82fbd 100644 --- a/shader/basicTexture_VS.hlsl +++ b/shader/basicTexture_VS.hlsl @@ -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));