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

  • 4 years later...

Draw calls are an essential part of computer graphics rendering. They represent commands sent to the graphics hardware to render objects or meshes on the screen. Each draw call specifies the necessary information, such as vertices, textures, and shaders, for the graphics pipeline to process and display the object. Multiple draw calls are typically executed for each frame to render all the objects in a scene, making it possible to create complex and visually appealing 3D graphics, check help from alzheimer phone . Efficiently managing draw calls is crucial for optimizing performance in real-time rendering applications.

Edited by Jackmine11
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...