stencil buffer is added, but not working for invert

This commit is contained in:
2019-09-18 18:53:45 -07:00
parent 038eedeb97
commit 54fff9a4e9
4 changed files with 104 additions and 19 deletions

View File

@@ -24,6 +24,7 @@ use crate::compu_kernel::CompuKernel;
use crate::compu_buffer::CompuBuffers;
use crate::util::load_raw;
use crate::canvas_frame::CanvasFrame;
use crate::sprite::Poly;
pub mod util;
@@ -101,7 +102,9 @@ pub fn main() {
let sfml_handle = processor.get_texture_handle(String::from("sfml.png")).unwrap();
let funky_sprite = Sprite::new_with_texture((0.0, -0.5), (0.5, 0.5), 0, funky_handle.clone());
let sfml_sprite = Sprite::new_with_texture((0.0, -0.5), (0.5, 0.5), 0, sfml_handle.clone());
let sfml_sprite = Sprite::new_with_texture((0.0, -0.5), (0.5, 0.5), 1, sfml_handle.clone());
let test_polygon = Poly::new_with_color((-0.5, -0.5), (0.5, 0.5), 1, (1.0,0.0,0.0,0.0));
drop(q2);
@@ -111,7 +114,6 @@ pub fn main() {
let mut exit = false;
let mut count = 0;
while let Some(p) = window.get_position() {
@@ -172,6 +174,8 @@ pub fn main() {
canvas.draw(&sfml_sprite);
canvas.draw(&compu_sprite1);
canvas.draw(&test_polygon);
{
let g = hprof::enter("Run");
processor.run(&surface,