p3nGu1nZz commited on
Commit
f15ce4c
·
1 Parent(s): 0391f6c

update GenerateVertexDataAndTexture

Browse files
Files changed (2) hide show
  1. index.js +2 -2
  2. wgpu-texture.js +0 -0
index.js CHANGED
@@ -51,7 +51,7 @@ async function InitializeResources(presentationFormat) {
51
  CreateBuffers();
52
 
53
  // Generate vertex buffer data and texture
54
- GenerateVertexDataAndTexture(glyphCanvas);
55
  }
56
 
57
  // Function to create vertex and index buffers
@@ -83,7 +83,7 @@ function GenerateIndices(maxGlyphs) {
83
  }
84
 
85
  // Function to generate vertex data and texture
86
- function GenerateVertexDataAndTexture(glyphCanvas) {
87
  const glyphData = generateGlyphVerticesForText('Hello\nworld!\nText in\nWebGPU!', COLORS, config, glyphCanvas);
88
  state.device.queue.writeBuffer(state.vertexBuffer, 0, glyphData.vertexData);
89
 
 
51
  CreateBuffers();
52
 
53
  // Generate vertex buffer data and texture
54
+ GenerateVertexDataAndTexture(state, glyphCanvas, generateGlyphVerticesForText, COLORS, config, createTextureFromSource);
55
  }
56
 
57
  // Function to create vertex and index buffers
 
83
  }
84
 
85
  // Function to generate vertex data and texture
86
+ function GenerateVertexDataAndTexture(state, glyphCanvas, generateGlyphVerticesForText, COLORS, config, createTextureFromSource) {
87
  const glyphData = generateGlyphVerticesForText('Hello\nworld!\nText in\nWebGPU!', COLORS, config, glyphCanvas);
88
  state.device.queue.writeBuffer(state.vertexBuffer, 0, glyphData.vertexData);
89
 
wgpu-texture.js ADDED
File without changes