Fix gpu timer array;

This commit is contained in:
bjorn 2019-06-20 14:44:28 -07:00
parent 4611b1c9a3
commit 5881bdd5b1
1 changed files with 3 additions and 0 deletions

View File

@ -1049,6 +1049,8 @@ void lovrGpuInit(getProcAddressProc getProcAddress) {
arr_init(&state.incoherents[i]);
}
arr_init(&state.stats.timers);
TextureData* textureData = lovrTextureDataCreate(1, 1, 0xff, FORMAT_RGBA);
state.defaultTexture = lovrTextureCreate(TEXTURE_2D, &textureData, 1, true, false, 0);
lovrTextureSetFilter(state.defaultTexture, (TextureFilter) { .mode = FILTER_NEAREST });
@ -1067,6 +1069,7 @@ void lovrGpuDestroy() {
for (int i = 0; i < MAX_BARRIERS; i++) {
arr_free(&state.incoherents[i]);
}
arr_free(&state.stats.timers);
memset(&state, 0, sizeof(state));
}