mirror of
https://github.com/azahar-emu/azahar.git
synced 2026-06-06 02:33:44 -04:00
fixed rfrag_tex_coord y axis, prototyping cursor position
This commit is contained in:
parent
ff127ce517
commit
2dfab0ac69
3 changed files with 5 additions and 2 deletions
|
|
@ -17,7 +17,7 @@ uniform int layer;
|
||||||
in vec2 pixelUnit;
|
in vec2 pixelUnit;
|
||||||
void main() {
|
void main() {
|
||||||
vec4 pixel = texture(color_texture, frag_tex_coord);
|
vec4 pixel = texture(color_texture, frag_tex_coord);
|
||||||
vec2 rfrag_tex_coord = vec2(frag_tex_coord.yx);
|
vec2 rfrag_tex_coord = vec2(frag_tex_coord.y, 1.0 - frag_tex_coord.x);
|
||||||
//Cursor
|
//Cursor
|
||||||
if (cursor_enable){
|
if (cursor_enable){
|
||||||
//Black Outline
|
//Black Outline
|
||||||
|
|
|
||||||
|
|
@ -568,7 +568,7 @@ void RendererOpenGL::DrawSingleScreen(const ScreenInfo& screen_info, float x, fl
|
||||||
} else {
|
} else {
|
||||||
glUniform1i(uniform_cursor_enable, 0);
|
glUniform1i(uniform_cursor_enable, 0);
|
||||||
}
|
}
|
||||||
glUniform2f(uniform_cursor_pos, 159.0f/320.0f, 119.0f/240.0f);
|
glUniform2f(uniform_cursor_pos, cursor_pos[0]/320.0f, cursor_pos[1]/240.0f);
|
||||||
state.texture_units[0].texture_2d = screen_info.display_texture;
|
state.texture_units[0].texture_2d = screen_info.display_texture;
|
||||||
state.texture_units[0].sampler = sampler;
|
state.texture_units[0].sampler = sampler;
|
||||||
state.Apply();
|
state.Apply();
|
||||||
|
|
@ -700,6 +700,8 @@ void RendererOpenGL::DrawScreens(const Layout::FramebufferLayout& layout, bool f
|
||||||
}
|
}
|
||||||
|
|
||||||
glUniform1i(uniform_layer, 0);
|
glUniform1i(uniform_layer, 0);
|
||||||
|
cursor_pos[0] += 1;
|
||||||
|
cursor_pos[1] += 1;
|
||||||
if (!Settings::values.swap_screen.GetValue()) {
|
if (!Settings::values.swap_screen.GetValue()) {
|
||||||
DrawTopScreen(layout, top_screen);
|
DrawTopScreen(layout, top_screen);
|
||||||
glUniform1i(uniform_layer, 0);
|
glUniform1i(uniform_layer, 0);
|
||||||
|
|
|
||||||
|
|
@ -114,6 +114,7 @@ private:
|
||||||
GLuint attrib_position;
|
GLuint attrib_position;
|
||||||
GLuint attrib_tex_coord;
|
GLuint attrib_tex_coord;
|
||||||
int currScreenDraw; // 0 is Top, 1 is Bottom
|
int currScreenDraw; // 0 is Top, 1 is Bottom
|
||||||
|
std::array<int, 2> cursor_pos = {0,0};
|
||||||
|
|
||||||
FrameDumperOpenGL frame_dumper;
|
FrameDumperOpenGL frame_dumper;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue