mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-22 13:37:22 +00:00
[client] egl: set a default scale for textures without filters
This commit is contained in:
parent
6882e5c59f
commit
57a74c156b
@ -25,6 +25,8 @@ make_object(
|
|||||||
shader/splash_bg.frag
|
shader/splash_bg.frag
|
||||||
shader/splash_logo.vert
|
shader/splash_logo.vert
|
||||||
shader/splash_logo.frag
|
shader/splash_logo.frag
|
||||||
|
shader/null.vert
|
||||||
|
shader/null.frag
|
||||||
)
|
)
|
||||||
|
|
||||||
make_defines(
|
make_defines(
|
||||||
|
@ -34,6 +34,9 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
// these headers are auto generated by cmake
|
// these headers are auto generated by cmake
|
||||||
|
#include "null.vert.h"
|
||||||
|
#include "null.frag.h"
|
||||||
|
|
||||||
#include "desktop.vert.h"
|
#include "desktop.vert.h"
|
||||||
#include "desktop_rgb.frag.h"
|
#include "desktop_rgb.frag.h"
|
||||||
#include "desktop_rgb.def.h"
|
#include "desktop_rgb.def.h"
|
||||||
@ -75,6 +78,8 @@ struct EGL_Desktop
|
|||||||
|
|
||||||
bool useDMA;
|
bool useDMA;
|
||||||
LG_RendererFormat format;
|
LG_RendererFormat format;
|
||||||
|
|
||||||
|
EGL_Shader * nullShader;
|
||||||
};
|
};
|
||||||
|
|
||||||
// forwards
|
// forwards
|
||||||
@ -156,6 +161,11 @@ bool egl_desktopInit(EGL * egl, EGL_Desktop ** desktop, EGLDisplay * display,
|
|||||||
(*desktop)->scaleAlgo = option_get_int("egl", "scale" );
|
(*desktop)->scaleAlgo = option_get_int("egl", "scale" );
|
||||||
(*desktop)->useDMA = useDMA;
|
(*desktop)->useDMA = useDMA;
|
||||||
|
|
||||||
|
egl_shaderInit(&(*desktop)->nullShader);
|
||||||
|
egl_shaderCompile((*desktop)->nullShader,
|
||||||
|
b_shader_null_vert, b_shader_null_vert_size,
|
||||||
|
b_shader_null_frag, b_shader_null_frag_size);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -190,6 +200,7 @@ void egl_desktopFree(EGL_Desktop ** desktop)
|
|||||||
egl_shaderFree (&(*desktop)->shader.shader);
|
egl_shaderFree (&(*desktop)->shader.shader);
|
||||||
egl_desktopRectsFree(&(*desktop)->mesh );
|
egl_desktopRectsFree(&(*desktop)->mesh );
|
||||||
countedBufferRelease(&(*desktop)->matrix );
|
countedBufferRelease(&(*desktop)->matrix );
|
||||||
|
egl_shaderFree(&(*desktop)->nullShader);
|
||||||
|
|
||||||
free(*desktop);
|
free(*desktop);
|
||||||
*desktop = NULL;
|
*desktop = NULL;
|
||||||
@ -299,6 +310,8 @@ bool egl_desktop_update(EGL_Desktop * desktop, const FrameBuffer * frame, int dm
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
egl_textureAddShader(desktop->texture, desktop->nullShader, 4.0f);
|
||||||
|
|
||||||
if (!egl_desktopSetup(desktop, desktop->format))
|
if (!egl_desktopSetup(desktop, desktop->format))
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -88,6 +88,7 @@ bool egl_textureInit(EGL * egl, EGL_Texture ** texture_,
|
|||||||
glSamplerParameteri(this->sampler, GL_TEXTURE_WRAP_T , GL_CLAMP_TO_EDGE);
|
glSamplerParameteri(this->sampler, GL_TEXTURE_WRAP_T , GL_CLAMP_TO_EDGE);
|
||||||
|
|
||||||
this->textures = ringbuffer_new(8, sizeof(GLuint));
|
this->textures = ringbuffer_new(8, sizeof(GLuint));
|
||||||
|
this->scale = 1.0f;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user