rt(gl): fix tests
This commit is contained in:
parent
849a749f1a
commit
2d98ebec1b
2 changed files with 36 additions and 36 deletions
|
@ -174,14 +174,14 @@ void main()
|
||||||
}";
|
}";
|
||||||
let shader_program = compile_program(VERT_SHADER, FRAG_SHADER);
|
let shader_program = compile_program(VERT_SHADER, FRAG_SHADER);
|
||||||
|
|
||||||
unsafe {
|
// unsafe {
|
||||||
gl::ObjectLabel(
|
// gl::ObjectLabel(
|
||||||
gl::SHADER,
|
// gl::SHADER,
|
||||||
shader_program,
|
// shader_program,
|
||||||
-1,
|
// -1,
|
||||||
b"color_shader\0".as_ptr().cast(),
|
// b"color_shader\0".as_ptr().cast(),
|
||||||
);
|
// );
|
||||||
}
|
// }
|
||||||
|
|
||||||
let vertices = &[
|
let vertices = &[
|
||||||
// positions // colors
|
// positions // colors
|
||||||
|
@ -192,7 +192,7 @@ void main()
|
||||||
let mut vbo: gl::types::GLuint = 0;
|
let mut vbo: gl::types::GLuint = 0;
|
||||||
unsafe {
|
unsafe {
|
||||||
gl::GenBuffers(1, &mut vbo);
|
gl::GenBuffers(1, &mut vbo);
|
||||||
gl::ObjectLabel(gl::BUFFER, vbo, -1, b"triangle_vbo\0".as_ptr().cast());
|
// gl::ObjectLabel(gl::BUFFER, vbo, -1, b"triangle_vbo\0".as_ptr().cast());
|
||||||
}
|
}
|
||||||
|
|
||||||
unsafe {
|
unsafe {
|
||||||
|
@ -211,7 +211,7 @@ void main()
|
||||||
let mut vao: gl::types::GLuint = 0;
|
let mut vao: gl::types::GLuint = 0;
|
||||||
unsafe {
|
unsafe {
|
||||||
gl::GenVertexArrays(1, &mut vao);
|
gl::GenVertexArrays(1, &mut vao);
|
||||||
gl::ObjectLabel(gl::VERTEX_ARRAY, vao, -1, b"triangle_vao\0".as_ptr().cast());
|
// gl::ObjectLabel(gl::VERTEX_ARRAY, vao, -1, b"triangle_vao\0".as_ptr().cast());
|
||||||
}
|
}
|
||||||
|
|
||||||
unsafe {
|
unsafe {
|
||||||
|
@ -280,23 +280,23 @@ pub fn do_loop(
|
||||||
gl::GenFramebuffers(1, &mut rendered_framebuffer);
|
gl::GenFramebuffers(1, &mut rendered_framebuffer);
|
||||||
gl::BindFramebuffer(gl::FRAMEBUFFER, rendered_framebuffer);
|
gl::BindFramebuffer(gl::FRAMEBUFFER, rendered_framebuffer);
|
||||||
|
|
||||||
gl::ObjectLabel(
|
// gl::ObjectLabel(
|
||||||
gl::FRAMEBUFFER,
|
// gl::FRAMEBUFFER,
|
||||||
rendered_framebuffer,
|
// rendered_framebuffer,
|
||||||
-1,
|
// -1,
|
||||||
b"rendered_framebuffer\0".as_ptr().cast(),
|
// b"rendered_framebuffer\0".as_ptr().cast(),
|
||||||
);
|
// );
|
||||||
|
|
||||||
// make tetxure
|
// make tetxure
|
||||||
gl::GenTextures(1, &mut rendered_texture);
|
gl::GenTextures(1, &mut rendered_texture);
|
||||||
gl::BindTexture(gl::TEXTURE_2D, rendered_texture);
|
gl::BindTexture(gl::TEXTURE_2D, rendered_texture);
|
||||||
|
|
||||||
gl::ObjectLabel(
|
// gl::ObjectLabel(
|
||||||
gl::TEXTURE,
|
// gl::TEXTURE,
|
||||||
rendered_texture,
|
// rendered_texture,
|
||||||
-1,
|
// -1,
|
||||||
b"rendered_texture\0".as_ptr().cast(),
|
// b"rendered_texture\0".as_ptr().cast(),
|
||||||
);
|
// );
|
||||||
|
|
||||||
// empty image
|
// empty image
|
||||||
gl::TexStorage2D(
|
gl::TexStorage2D(
|
||||||
|
@ -356,23 +356,23 @@ pub fn do_loop(
|
||||||
gl::GenFramebuffers(1, &mut output_framebuffer_handle);
|
gl::GenFramebuffers(1, &mut output_framebuffer_handle);
|
||||||
gl::BindFramebuffer(gl::FRAMEBUFFER, output_framebuffer_handle);
|
gl::BindFramebuffer(gl::FRAMEBUFFER, output_framebuffer_handle);
|
||||||
|
|
||||||
gl::ObjectLabel(
|
// gl::ObjectLabel(
|
||||||
gl::FRAMEBUFFER,
|
// gl::FRAMEBUFFER,
|
||||||
output_framebuffer_handle,
|
// output_framebuffer_handle,
|
||||||
-1,
|
// -1,
|
||||||
b"output_framebuffer\0".as_ptr().cast(),
|
// b"output_framebuffer\0".as_ptr().cast(),
|
||||||
);
|
// );
|
||||||
|
|
||||||
// make tetxure
|
// make tetxure
|
||||||
gl::GenTextures(1, &mut output_texture);
|
gl::GenTextures(1, &mut output_texture);
|
||||||
gl::BindTexture(gl::TEXTURE_2D, output_texture);
|
gl::BindTexture(gl::TEXTURE_2D, output_texture);
|
||||||
|
|
||||||
gl::ObjectLabel(
|
// gl::ObjectLabel(
|
||||||
gl::TEXTURE,
|
// gl::TEXTURE,
|
||||||
output_texture,
|
// output_texture,
|
||||||
-1,
|
// -1,
|
||||||
b"output_texture\0".as_ptr().cast(),
|
// b"output_texture\0".as_ptr().cast(),
|
||||||
);
|
// );
|
||||||
|
|
||||||
// empty image
|
// empty image
|
||||||
gl::TexStorage2D(
|
gl::TexStorage2D(
|
||||||
|
|
|
@ -9,7 +9,7 @@ fn triangle_gl() {
|
||||||
|
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut filter = FilterChainGL::load_from_path(
|
let mut filter = FilterChainGL::load_from_path(
|
||||||
"../test/slang-shaders/bezel/Mega_Bezel/Presets/MBZ__0__SMOOTH-ADV.slangp",
|
"../test/shaders_slang/crt/crt-royale.slangp",
|
||||||
Some(&FilterChainOptionsGL {
|
Some(&FilterChainOptionsGL {
|
||||||
glsl_version: 0,
|
glsl_version: 0,
|
||||||
use_dsa: false,
|
use_dsa: false,
|
||||||
|
@ -30,7 +30,7 @@ fn triangle_gl46() {
|
||||||
let mut filter = FilterChainGL::load_from_path(
|
let mut filter = FilterChainGL::load_from_path(
|
||||||
// "../test/slang-shaders/vhs/VHSPro.slangp",
|
// "../test/slang-shaders/vhs/VHSPro.slangp",
|
||||||
// "../test/slang-shaders/test/history.slangp",
|
// "../test/slang-shaders/test/history.slangp",
|
||||||
"../test/slang-shaders/bezel/Mega_Bezel/Presets/MBZ__0__SMOOTH-ADV.slangp",
|
"../test/shaders_slang/crt/crt-royale.slangp",
|
||||||
// "../test/shadersslang/bezel/Mega_Bezel/Presets/MBZ__0__SMOOTH-ADV.slangp",
|
// "../test/shadersslang/bezel/Mega_Bezel/Presets/MBZ__0__SMOOTH-ADV.slangp",
|
||||||
Some(&FilterChainOptionsGL {
|
Some(&FilterChainOptionsGL {
|
||||||
glsl_version: 0,
|
glsl_version: 0,
|
||||||
|
|
Loading…
Add table
Reference in a new issue