Jump to content

  • Log In with Google      Sign In   
  • Create Account

OpenGL mesh with light


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
3 replies to this topic

#1 Dark Engineer   Members   -  Reputation: 132

Like
0Likes
Like

Posted 02 April 2013 - 09:46 AM

I wrote code for mesh and light but when i'm trying to see this things they don't show. On the screen i see only black color nothing else

My code is here https://github.com/DarkEngineer/Crion-World



Sponsor:

#2 EarthBanana   Members   -  Reputation: 902

Like
0Likes
Like

Posted 02 April 2013 - 10:54 AM

I'm assuming that you had your scene and meshes and textures and all that stuff working and displayed on the screen before you tried to insert a light - if this is the case did you make sure that your shaders compiled? I noticed that you used two different extensions for your lighting shader and regular shaders - you have .glsl and .fragmentShader and .vertexShader

 

Other than that your lighting verttex and fragment shaders look okay to me as long as your setting the uniforms correctly in your code and they are compiling and linking together they should work. I've been wrong before though.



#3 Dark Engineer   Members   -  Reputation: 132

Like
0Likes
Like

Posted 02 April 2013 - 11:16 AM

My mesh wasn't work properly so i was thinking that is because i don't have lights


Edited by Dark Engineer, 02 April 2013 - 12:27 PM.


#4 BGB   Crossbones+   -  Reputation: 1554

Like
1Likes
Like

Posted 02 April 2013 - 02:33 PM

assuming relevant:

maybe verify that the mesh draws as intended without using lighting (fullbright);

maybe verify (if applicable) that things like vertex normals are correct;

maybe try to verify if any calculations should behave as intended;

...






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS