gl.text2d with automatic 0 ignores layer?

bohemian.surrealist@gmail.com's icon

Hey folks,

I'm using text2d to place some text in various spots per frame.. the issue is that the text is always drawing first and all other objects/sketches/slabs are covering it up. It's almost as though automatic 0 makes the layer 0 as well. Any thoughts on this?

Peace,
Drew

Rob Ramirez's icon

best way we can help is to see a stripped down patch illustrating the problem.

bohemian.surrealist@gmail.com's icon

Nevermind... I resolved it... human error. I'll be sure to always post patches from now on.

EDIT: Actually not; I tested it with gl.sketch and it works fine, but gl.gridshape (the original perp) doesn't work...

bohemian.surrealist@gmail.com's icon

Actually, I was mistaken. The bug continues and I am unable to resolve it. I'm about to pull my hair out on this one.

Here's a simple patch that demonstrates the strange bug. I assume that setting the text to layer 99 and the gridshape to layer 0 will make the text draw in front of the gridshape, however, it draws behind it.

Max Patch
Copy patch and select New From Clipboard in Max.

Any help would be greatly, greatly appreciated!

Thanks!

Peace,
Drew

oli larkin's icon

AFAIK the layer attribute is only relevant when automatic is 1 . When automatic is 0 you have to explicitly draw each object in order. I think automatic 0 is only useful when you set all of your gl objects to automatic 0.

i think this is what you want:

Max Patch
Copy patch and select New From Clipboard in Max.

bohemian.surrealist@gmail.com's icon

Bingo!

Thanks a billion!