small medium large xlarge

23 Feb 2014, 16:55
ilian zapryanov (1 post)

Hello, I am following your book in WebGL. Everything works as expected. The problem is that I cant get to understand the colors. The example in the book prints the table with white gradient but here in the browser is almost black with red/green gradients. Ill get a hosting soon so I will upload it to share the problem. Here is a screenshot by following the example - I am in chapter 3 the 3rd dimension:

03 Mar 2014, 20:45
Kevin Brothaler (41 posts)

Hi Ilian, perhaps you mean chapter 6, and just to confirm, you’re following “OpenGL ES 2 for Android”, but adapting it to the browser with WebGL? My first guess would be something wrong with the calls to glVertexAttribPointer in relation to the colour attribute. You might be able to catch it by working backwards from the code which can be downloaded here:

  You must be logged in to comment