1

I have put a question up in html as I think it helps to have images to ask the question. http://www.jamestrusler.co.uk/files/webglquestion/question1.html

Here is the covering question that can be seen within the html page too:

  1. Can you rotate/scale normals without Rotating/Scaling the vertices (Which have already had translations made) - as this may be the answer to one problem.
  2. Any ideas as to why the normals, indices and vertices that are given to me by Blender (x3d export) do not seem to be rendering multicoloured objects properly. (please refer to site question)
Jimmyt1988
  • 20,466
  • 41
  • 133
  • 233
  • I have done another example to show the problem and it can be found here: http://jamestrusler.co.uk/games/adventure6/ The single plane has all the same data as the top side of the cube and yet the plane draws and the cube top face does not. This is regardless of the rest of the cube, that one side should atleast draw because it has all the correct definitions and same definitions as the plane that draws. You can see what i mean by reading through the bottom left textbox which Is a log of all the buffer details being plopped in. – Jimmyt1988 Feb 22 '12 at 23:40

1 Answers1

0

I fixed the problem with this:

obj[a].Transform.Group.Shape[b].vertexIndexBuffer = gl.createBuffer();
gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, obj[a].vertexIndexBuffer);
Nick is tired
  • 6,860
  • 20
  • 39
  • 51
Jimmyt1988
  • 20,466
  • 41
  • 133
  • 233