|
|
|
|
181
|
|
181
|
|
182
|
DKLog("VertexFunction.VertexAttributes: %d", vertShaderFunction->VertexAttributes().Count());
|
182
|
DKLog("VertexFunction.VertexAttributes: %d", vertShaderFunction->VertexAttributes().Count());
|
183
|
for (int i = 0; i < vertShaderFunction->VertexAttributes().Count(); ++i)
|
183
|
for (int i = 0; i < vertShaderFunction->VertexAttributes().Count(); ++i)
|
184
|
- {
|
|
|
|
|
184
|
+ {
|
185
|
const DKVertexAttribute& attr = vertShaderFunction->VertexAttributes().Value(i);
|
185
|
const DKVertexAttribute& attr = vertShaderFunction->VertexAttributes().Value(i);
|
186
|
DKLog(" --> VertexAttribute[%d]: \"%ls\" (location:%u)", i, (const wchar_t*)attr.name, attr.location);
|
186
|
DKLog(" --> VertexAttribute[%d]: \"%ls\" (location:%u)", i, (const wchar_t*)attr.name, attr.location);
|
187
|
}
|
187
|
}
|
|
|
|
|
287
|
window->Resize({ 320, 240 });
|
287
|
window->Resize({ 320, 240 });
|
288
|
window->Activate();
|
288
|
window->Activate();
|
289
|
|
289
|
|
290
|
- window->AddEventHandler(this,
|
|
|
291
|
- DKFunction([this](const DKWindow::WindowEvent& e) {
|
|
|
|
|
290
|
+ window->AddEventHandler(this, DKFunction([this](const DKWindow::WindowEvent& e)
|
|
|
291
|
+ {
|
292
|
if (e.type == DKWindow::WindowEvent::WindowClosed)
|
292
|
if (e.type == DKWindow::WindowEvent::WindowClosed)
|
293
|
DKApplication::Instance()->Terminate(0);
|
293
|
DKApplication::Instance()->Terminate(0);
|
294
|
- }),
|
|
|
295
|
- NULL, NULL);
|
|
|
|
|
294
|
+ }), NULL, NULL);
|
296
|
|
295
|
|
297
|
runningRenderThread = 1;
|
296
|
runningRenderThread = 1;
|
298
|
renderThread = DKThread::Create(DKFunction(this, &TestApp1::RenderThread)->Invocation());
|
297
|
renderThread = DKThread::Create(DKFunction(this, &TestApp1::RenderThread)->Invocation());
|
|
|
|
|
316
|
if (buckets[i].totalChunks > 0)
|
315
|
if (buckets[i].totalChunks > 0)
|
317
|
{
|
316
|
{
|
318
|
DKLogI("--> %5lu: %5lu/%5lu, usage: %.1f%%, used: %.1fKB, total: %.1fKB",
|
317
|
DKLogI("--> %5lu: %5lu/%5lu, usage: %.1f%%, used: %.1fKB, total: %.1fKB",
|
319
|
- buckets[i].chunkSize,
|
|
|
320
|
- buckets[i].usedChunks, buckets[i].totalChunks,
|
|
|
321
|
- double(buckets[i].usedChunks) / double(buckets[i].totalChunks) * 100.0,
|
|
|
322
|
- double(buckets[i].chunkSize * buckets[i].usedChunks) / 1024.0,
|
|
|
323
|
- double(buckets[i].chunkSize * buckets[i].totalChunks) / 1024.0
|
|
|
|
|
318
|
+ buckets[i].chunkSize,
|
|
|
319
|
+ buckets[i].usedChunks, buckets[i].totalChunks,
|
|
|
320
|
+ double(buckets[i].usedChunks) / double(buckets[i].totalChunks) * 100.0,
|
|
|
321
|
+ double(buckets[i].chunkSize * buckets[i].usedChunks) / 1024.0,
|
|
|
322
|
+ double(buckets[i].chunkSize * buckets[i].totalChunks) / 1024.0
|
324
|
);
|
323
|
);
|
325
|
usedBytes += buckets[i].chunkSize * buckets[i].usedChunks;
|
324
|
usedBytes += buckets[i].chunkSize * buckets[i].usedChunks;
|
326
|
}
|
325
|
}
|
|
|
|
|
333
|
|
332
|
|
334
|
#ifdef _WIN32
|
333
|
#ifdef _WIN32
|
335
|
int APIENTRY wWinMain(_In_ HINSTANCE hInstance,
|
334
|
int APIENTRY wWinMain(_In_ HINSTANCE hInstance,
|
336
|
- _In_opt_ HINSTANCE hPrevInstance,
|
|
|
337
|
- _In_ LPWSTR lpCmdLine,
|
|
|
338
|
- _In_ int nCmdShow)
|
|
|
|
|
335
|
+ _In_opt_ HINSTANCE hPrevInstance,
|
|
|
336
|
+ _In_ LPWSTR lpCmdLine,
|
|
|
337
|
+ _In_ int nCmdShow)
|
339
|
#else
|
338
|
#else
|
340
|
int main(int argc, const char * argv[])
|
339
|
int main(int argc, const char * argv[])
|
341
|
#endif
|
340
|
#endif
|