Sign in to follow this  
Game Developer

Why in lessons 5 to 13 and 15 of WebGL tutorial the canvas is entirely black in my google chrome internet browser?

Recommended Posts

I downloaded 16 lessons to learn WebGL programming of this WebGL tutorial from GitHub, the first four lessons are fine and in the canvas HTML5 element I see what I should see, but in lessons 5 to 13, the canvas is entirely black and I don't see any colorful shape on it.

In lesson 14, I only see in the center of the canvas the white text "Loading world...", the canvas in lesson 15 is again entirely black and in the last lesson number 16, I do see in the canvas a moving and turning white shaded box from left to right during few seconds and then it disappears and after that the canvas is entirely black again.

According to his/her WebGL tutorial, the canvas in each lesson should show me nice colorful shaded and textured 3D shapes transforming in real time on the canvas, not everything black, but this is not happening for me.

Why? I am using the latest version of Google Chrome internet browser.

What can possibly cause this?

In addition to the 16 lessons, there are also 3 examples, the first two examples are fine, i.e. in the canvas I see what I should see, but in the third example the canvas is entirely black again and I guess that this should not be happening.

 

Edited by samme
Removed zip file

Share this post


Link to post
Share on other sites

Lesson 5 is the first lesson with a texture, so my guess is this is a CORS issue.

You're probably using the file:/// protocol to view the tutorial HTML files? Try using a simple HTTP server to access them via http://localhost instead.

Check your browser's developer console for error messages.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.