GL draw order differences on XP and OSX
i just tried my jitter js patch (made on my Mac) on my PC. I found that the drawing order in the sketch was reversed. Is there an easy way to remedy this? I am using ortho = 2 and the "painter’s algorhythm"(no z depth). Reversing the camera doesn’t work.
My mac is and ibook and I have an ATI radeon 9600 graphics card on my PC. Could this differ depending on what gfx card was used?
my plugins – http://www.oli.adbe.org
Everytime you save your patch, object order in the patcher is
reversed (for the curious reader, open as text and keep saving and
reloading to see how this is the case). This is a long time Max
In automatic mode, patcher order makes a difference without depth
buffering. When not using depth buffering, I would recommend turning
automatic off and draw each object explicitly using bangs. We might
add a "layer" attribute to jit.gl.* objects in a future version to
support ordering in automatic mode independent of patcher order, but
for the meantime the technique suggested is what you’ll need to do.
Well without seeing an example, I can’t offer more feedback. I would
like to encourage as often as possible that people present patch
examples with steps to reproduce behavior. Otherwise, there is less
of a chance that anyone will be able to offer insight.
here is the patch:
the file that contains the drawing code in question is
on windows XP everything is drawn in exactly the opposite order to on OS X. I have tried reversing the camera but it didn’t help.
sorry I can’t provide a smaller example file.
i found that by reversing the order of the drawing commands the interface will draw correctly. I’d rather not have to make to seperate js files for mac and windows tho, i’m sure there must be an easier way.
anyone got any ideas?
I haven’t had a problem drawing with OpenGL in jsui, using the same
code on both Windows and Mac. Are you talking about jsui or js
Probably best to post your code.
>Are you talking about jsui or js jitter objects?
- js jitter
What is shown below draws the black circles on top of the red circles on OSX and vice-versa on XP. Also, on OSX the red circles are semi transparent, on XP they are opaque. Am I using automatic mode in the wrong way?
I suppose I could include two different sets of drawing functions in the js but this seems a bit messy (there is a lot of drawing code).
#N vpatcher 313 284 913 684;
#P toggle 70 79 15 0;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 70 100 57 196617 qmetro 40;
#P newex 119 158 88 196617 js renderorder.js;
#P connect 2 0 1 0;
#P connect 1 0 0 0;
autowatch = 1;
// Jitter Stuff —————————-
var mywindow = new JitterObject("jit.window","space");
mywindow.depthbuffer = 0;
mywindow.fsmenubar = 0;
var myrender = new JitterObject("jit.gl.render","space");
myrender.ortho = 2;
myrender.erase_color = [1,1,1,1];
var mysketch = new JitterObject("jit.gl.sketch","space");
mysketch.blend_enable = 1;
mysketch.antialias = 1;
mysketch.automatic = 0;
for (i = 0;i < 5; i++)
//draw red circle
//draw black inner circle
very nice lib you’ve released, thanks!
you(we actually) were lucky with this one: the problem seems to be in
depth_enable beeing 1 by default, so adding mysketch.depth_enable = 0 solved
Forums > Jitter