Jump to content

Draw Calls


tham_kathy
 Share

Recommended Posts

I need to apply a texture to the customMesh. But it's showing me an error message saying "Vertex buffer is not big enough for the draw call"

The code I wrote is below.

var wall_color = new BABYLON.StandardMaterial("wall_color", scene);
wall_color.diffuseTexture = new BABYLON.Texture("http://i.imgur.com/Vw4fzwq.jpg", scene);
build.material = wall_color;

The code I apply the above lines is;

http://www.babylonjs-playground.com/#4GBWI5

Need help to solve this problem. Appreciate your help. 

Link to comment
Share on other sites

I tried with different uv values but the texture is not appearing as it is.

The way I calculated uv values is;

var uvs = [];
for(var p = 0; p < positions.length / 3; p++) 
{
	uvs.push((positions[3 * p] - (-4)) / 6, (positions[3 * p + 1] - (-4)) / 8);
}

Can you please suggest me a way to apply the texture as it is for both outer walls and inner walls separately? 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...