浏览代码

Remove some superfluous calls to check_gl_errors

Johannes Hofmann 7 年前
父节点
当前提交
4b7f8419c0
共有 4 个文件被更改,包括 1 次插入8 次删除
  1. 0
    2
      src/atmos_layer.rs
  2. 0
    1
      src/marker_layer.rs
  3. 1
    3
      src/mercator_tile_layer.rs
  4. 0
    2
      src/ortho_tile_layer.rs

+ 0
- 2
src/atmos_layer.rs 查看文件

51
 
51
 
52
         let scale_uniform = program.get_uniform_id(cx, CStr::from_bytes_with_nul(b"scale\0").unwrap()).unwrap();
52
         let scale_uniform = program.get_uniform_id(cx, CStr::from_bytes_with_nul(b"scale\0").unwrap()).unwrap();
53
 
53
 
54
-        check_gl_errors!(cx);
55
-
56
         AtmosLayer {
54
         AtmosLayer {
57
             buffer,
55
             buffer,
58
             program,
56
             program,

+ 0
- 1
src/marker_layer.rs 查看文件

31
             include_bytes!("../shader/marker.vert"),
31
             include_bytes!("../shader/marker.vert"),
32
             include_bytes!("../shader/marker.frag"),
32
             include_bytes!("../shader/marker.frag"),
33
         ).unwrap();
33
         ).unwrap();
34
-        check_gl_errors!(cx);
35
 
34
 
36
         //TODO Create textures for higher DPI factors / use mipmaps
35
         //TODO Create textures for higher DPI factors / use mipmaps
37
         let texture = {
36
         let texture = {

+ 1
- 3
src/mercator_tile_layer.rs 查看文件

25
     ) -> MercatorTileLayer
25
     ) -> MercatorTileLayer
26
     {
26
     {
27
         let buffer = Buffer::new(cx, &[], 0);
27
         let buffer = Buffer::new(cx, &[], 0);
28
-        check_gl_errors!(cx);
29
         cx.bind_buffer(buffer.id());
28
         cx.bind_buffer(buffer.id());
29
+        check_gl_errors!(cx);
30
 
30
 
31
         let mut program = Program::new(
31
         let mut program = Program::new(
32
             cx,
32
             cx,
52
             &VertexAttribParams::new(4, 8, 4)
52
             &VertexAttribParams::new(4, 8, 4)
53
         );
53
         );
54
 
54
 
55
-        check_gl_errors!(cx);
56
-
57
         MercatorTileLayer {
55
         MercatorTileLayer {
58
             program,
56
             program,
59
             buffer,
57
             buffer,

+ 0
- 2
src/ortho_tile_layer.rs 查看文件

75
             &VertexAttribParams::new(4, 9, 5)
75
             &VertexAttribParams::new(4, 9, 5)
76
         );
76
         );
77
 
77
 
78
-        check_gl_errors!(cx);
79
-
80
         OrthoTileLayer {
78
         OrthoTileLayer {
81
             program,
79
             program,
82
             buffer,
80
             buffer,