MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16486.3368.360946.884242 at soggy.deldotd.com> Date: Sat, 27 Mar 2004 15:24:24 -0800 To: lablgtk at kaba.or.jp Subject: glenable and gllogicop working ? From: briand at aracnet.com Here is the code in question : let draw_segment_xor p0 p1 = GlDraw.line_width 1.0; (* GlDraw.color (0.0, 0.0, 1.0); *) Gl.enable `logic_op; GlFunc.logic_op `xor; do_draw_segment p0 p1; (* Gl.disable `logic_op;*) The line draw works correctly, but the logcal operation is ignored. Regardless of what I make it, the lines are drawn the same, e.g. if I use clear, I still get a line of the chosen color and the result should be black (or white?). There are several possibilities: strange bug in my code which is turning off the operation (notice that I commented out disable) a strange bug in my code because I am new to ocaml (at one point swap_buffers wouldn't work because I did area#swap_buffers instead of area#swap_buffers() !) for some reason glenable and logic_op are not implemented or not implemented properly in lablgl (I will fix). However my persusal of the source code makes me think it IS implemented properly. I have an initialization problem which for some reason disables logical operation, i.e. this is an open GL setup problem. Any advice appreciated. Thanks Brian P.S. This code is based on mzscheme/sgl code which is known to work.