static grid

fsk's picture

i thought id try and make a consumer patch. since i never programed any open gl it had to be something simple but hopefully useful. so here it is. it something like the glsl grid but faster. it uses a display list to store the grid on the graphics card. because it uses a display list animating any of the inputs (apart from line width) is not a good idea since it regenerates the display list when you change them. im also not sure if its something that should be used inside the iterator. but these issues apart i think i succeeded in doing what i wanted. its a grid and its faster then the built in glsl grid:). if you have it make more than one grid, the x coordinate of the second texture coordinates (gl_MultiTexCoord1) is the index of the grid. dunno how useful that is but i remembered the 3D medical scans toneburst was doing.

give it a whirl.

PreviewAttachmentSize
Static Grid.plugin.zip26.32 KB

volkerk's picture
Re: static grid

not working on my machine. SL, macbook pro.

0x8511e933: -[QCContext renderPatch:time:arguments:]
0x8511e615: -[QCGraphicsContext renderPatch:time:arguments:]
0x8511d763: -[QCOpenGLContext renderPatch:time:arguments:]
0x0000d873
0x85159ecf: -[QCView render:arguments:]
0x8791afae: -[NSView _drawRect:clip:]
0x87919c21: -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:]
0x87919f8b: -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:]
0x879182f3: -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]
0x879191bf: -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]
0x879191bf: -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]
0x87917e17: -[NSThemeFrame _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]
0x879146bf: -[NSView _displayRectIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:]
0x8788df37: -[NSView displayIfNeeded]
0x87888dde: _handleWindowNeedsDisplay
0x80072427: __CFRunLoopDoObservers
0x8004e2d4: __CFRunLoopRun
0x8004dc2f: CFRunLoopRunSpecific
0x838e8a4e: RunCurrentEventLoopInMode
0x838e8853: ReceiveNextEventCommon
0x838e870c: BlockUntilNextEventMatchingListInMode
0x8785e1f2: _DPSNextEvent
0x8785db41: -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:]
0x87823747: -[NSApplication run]

fsk's picture
Re: static grid

hmmm. havent tested it much in SL but it did seem to work (it would render and i didnt get any errors). what graphics card do you have? and can you also tell me what the error was please. what you pasted only talks of where it happened but not what happened.

anyone else have this problem?

smokris's picture
Re: static grid

If I set Line Width to zero, I get a bunch of GL error messages (Nvidia GeForce 8600M GT). Otherwise this seems to work fine so far on 10.6.