mirror of
https://github.com/bjornbytes/lovr.git
synced 2024-07-05 13:53:38 +00:00
Don't generate mipmaps for Canvases;
This commit is contained in:
parent
a0ebf25e7d
commit
f3ac875ceb
|
@ -21,7 +21,7 @@ bool lovrCanvasSupportsFormat(TextureFormat format) {
|
||||||
|
|
||||||
Canvas* lovrCanvasCreate(int width, int height, TextureFormat format, int msaa, bool depth, bool stencil) {
|
Canvas* lovrCanvasCreate(int width, int height, TextureFormat format, int msaa, bool depth, bool stencil) {
|
||||||
TextureData* textureData = lovrTextureDataGetEmpty(width, height, format);
|
TextureData* textureData = lovrTextureDataGetEmpty(width, height, format);
|
||||||
Texture* texture = lovrTextureCreate(TEXTURE_2D, &textureData, 1, true, true);
|
Texture* texture = lovrTextureCreate(TEXTURE_2D, &textureData, 1, true, false);
|
||||||
if (!texture) return NULL;
|
if (!texture) return NULL;
|
||||||
|
|
||||||
Canvas* canvas = lovrAlloc(sizeof(Canvas), lovrCanvasDestroy);
|
Canvas* canvas = lovrAlloc(sizeof(Canvas), lovrCanvasDestroy);
|
||||||
|
|
|
@ -760,7 +760,7 @@ static void openvrRenderTo(headsetRenderCallback callback, void* userdata) {
|
||||||
|
|
||||||
// Render
|
// Render
|
||||||
int viewport[4] = { 0, 0, state.canvas->texture.width, state.canvas->texture.height };
|
int viewport[4] = { 0, 0, state.canvas->texture.width, state.canvas->texture.height };
|
||||||
lovrGraphicsPushDisplay(state.canvas->texture.id, projection, viewport);
|
lovrGraphicsPushDisplay(state.canvas->framebuffer, projection, viewport);
|
||||||
lovrGraphicsPush();
|
lovrGraphicsPush();
|
||||||
lovrGraphicsMatrixTransform(MATRIX_VIEW, transform);
|
lovrGraphicsMatrixTransform(MATRIX_VIEW, transform);
|
||||||
lovrGraphicsClear(true, true, false, lovrGraphicsGetBackgroundColor(), 1., 0);
|
lovrGraphicsClear(true, true, false, lovrGraphicsGetBackgroundColor(), 1., 0);
|
||||||
|
|
Loading…
Reference in a new issue