fork download
  1. // works
  2. glCullFace(GL_BACK);
  3. glStencilOp(GL_KEEP, GL_KEEP, GL_INCR);
  4. glDrawArraysInstanced(GL_TRIANGLES, 0, 36, houses);
  5. glCullFace(GL_FRONT);
  6. glStencilOp(GL_KEEP, GL_KEEP, GL_DECR);
  7. glDrawArraysInstanced(GL_TRIANGLES, 0, 36, houses);
  8.  
  9.  
  10. // doesn't
  11. glDisable(GL_CULL_FACE);
  12. glStencilOpSeparate(GL_BACK, GL_KEEP, GL_KEEP, GL_INCR);
  13. glStencilOpSeparate(GL_FRONT, GL_KEEP, GL_KEEP, GL_DECR);
  14. glDrawArraysInstanced(GL_TRIANGLES, 0, 36, houses);
  15. glEnable(GL_CULL_FACE);
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.c:2:13: error: data definition has no type or storage class [-Werror]
             glCullFace(GL_BACK);
             ^
prog.c:2:13: error: type defaults to ‘int’ in declaration of ‘glCullFace’ [-Werror]
prog.c:2:13: error: parameter names (without types) in function declaration [-Werror]
prog.c:3:13: error: data definition has no type or storage class [-Werror]
             glStencilOp(GL_KEEP, GL_KEEP, GL_INCR);
             ^
prog.c:3:13: error: type defaults to ‘int’ in declaration of ‘glStencilOp’ [-Werror]
prog.c:3:13: error: parameter names (without types) in function declaration [-Werror]
prog.c:4:49: error: expected ‘)’ before numeric constant
             glDrawArraysInstanced(GL_TRIANGLES, 0, 36, houses);
                                                 ^
prog.c:5:13: error: data definition has no type or storage class [-Werror]
             glCullFace(GL_FRONT);
             ^
prog.c:5:13: error: type defaults to ‘int’ in declaration of ‘glCullFace’ [-Werror]
prog.c:5:13: error: parameter names (without types) in function declaration [-Werror]
prog.c:6:13: error: data definition has no type or storage class [-Werror]
             glStencilOp(GL_KEEP, GL_KEEP, GL_DECR);
             ^
prog.c:6:13: error: type defaults to ‘int’ in declaration of ‘glStencilOp’ [-Werror]
prog.c:6:13: error: parameter names (without types) in function declaration [-Werror]
prog.c:7:49: error: expected ‘)’ before numeric constant
             glDrawArraysInstanced(GL_TRIANGLES, 0, 36, houses);
                                                 ^
prog.c:11:13: error: data definition has no type or storage class [-Werror]
             glDisable(GL_CULL_FACE);
             ^
prog.c:11:13: error: type defaults to ‘int’ in declaration of ‘glDisable’ [-Werror]
prog.c:11:13: error: parameter names (without types) in function declaration [-Werror]
prog.c:12:13: error: data definition has no type or storage class [-Werror]
             glStencilOpSeparate(GL_BACK, GL_KEEP, GL_KEEP, GL_INCR);
             ^
prog.c:12:13: error: type defaults to ‘int’ in declaration of ‘glStencilOpSeparate’ [-Werror]
prog.c:12:13: error: parameter names (without types) in function declaration [-Werror]
prog.c:13:13: error: data definition has no type or storage class [-Werror]
             glStencilOpSeparate(GL_FRONT, GL_KEEP, GL_KEEP, GL_DECR);
             ^
prog.c:13:13: error: type defaults to ‘int’ in declaration of ‘glStencilOpSeparate’ [-Werror]
prog.c:13:13: error: parameter names (without types) in function declaration [-Werror]
prog.c:14:49: error: expected ‘)’ before numeric constant
             glDrawArraysInstanced(GL_TRIANGLES, 0, 36, houses);
                                                 ^
prog.c:15:13: error: data definition has no type or storage class [-Werror]
             glEnable(GL_CULL_FACE);
             ^
prog.c:15:13: error: type defaults to ‘int’ in declaration of ‘glEnable’ [-Werror]
prog.c:15:13: error: parameter names (without types) in function declaration [-Werror]
cc1: all warnings being treated as errors
stdout
Standard output is empty