Skip to content

Instantly share code, notes, and snippets.

View vade's full-sized avatar

Anton Marini vade

View GitHub Profile
glIsEnabled(GL_FRAGMENT_SHADER); returns: GL_FALSE
Error: GL_INVALID_ENUM
Context: 0x7fbb5b0dae00
Virtual Screen: 0/1
kCGLCPCurrentRendererID: 16918311 (0x01022727)
GL_RENDERER: NVIDIA GeForce GT 650M OpenGL Engine
GL_VENDOR: NVIDIA Corporation
GL_VERSION: 2.1 NVIDIA-8.24.9 310.40.25f01
kCGLCPGPUFragmentProcessing: GL_TRUE
kCGLCPGPUVertexProcessing: GL_TRUE
Sampling process 35307 for 3 seconds with 1 millisecond of run time between samples
Sampling completed, processing symbols...
Analysis of sampling v002 (pid 35307) every 1 millisecond
Process: v002 [35307]
Path: /Users/vade/Library/Developer/Xcode/DerivedData/v002-Application-dbsnoasduzazavejagpmldzzulko/Build/Products/Debug/v002.app/Contents/MacOS/v002
Load Address: 0x100000000
Identifier: info.v002.v002
Version: 1.0
Code Type: X86-64
Parent Process: debugserver [35308]
glIsEnabled(GL_FRAGMENT_SHADER); returns: GL_FALSE
Error: GL_INVALID_ENUM
Context: 0x1018ad400
Virtual Screen: 0/1
kCGLCPCurrentRendererID: 16918311 (0x01022727)
GL_RENDERER: NVIDIA GeForce GT 650M OpenGL Engine
GL_VENDOR: NVIDIA Corporation
GL_VERSION: 2.1 NVIDIA-8.26.21 310.40.35f08
kCGLCPGPUFragmentProcessing: GL_TRUE
kCGLCPGPUVertexProcessing: GL_TRUE
Hi Toyos. Thanks for taking the time to read this.
Basically, I have a SCNNode 'Agent' which contain child nodes (maybe a hundred or so) which are simple textured planes which respond to a physics field (or 4).
Every frame, I want to draw a connection between the nodes.
My thought was to :
In the "Agent" node - parent to all the child nodes - override the custom rendering. I would:
// then we need to hit OpenGL and draw them
NSUInteger count = self.childNodes.count;
// We need to get a list an array of all child nodes, and their positions in the parent nodes coordinate system
__block SCNVector4 positions[count];
__block int indexes[count];
__block int i = 0;
[self enumerateChildNodesUsingBlock:^(SCNNode *child, BOOL *stop)
{
libobjc.A.dylib`objc_msgSend:
0x372cdb60: cbz r0, 0x372cdb9e ; objc_msgSend + 62
0x372cdb62: ldr.w r9, [r0]
0x372cdb66: ldrh.w r12, [r9, #12]
0x372cdb6a: ldr.w r9, [r9, #8]
0x372cdb6e: and.w r12, r12, r1
0x372cdb72: add.w r9, r9, r12, lsl #3
0x372cdb76: ldr.w r12, [r9]
0x372cdb7a: teq.w r12, r1
0x372cdb7e: bne 0x372cdb86 ; objc_msgSend + 38
lldb) bt
* thread #1: tid = 0x4e261, 0x372cdb76 libobjc.A.dylib`objc_msgSend + 22, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x4013a1f1)
* frame #0: 0x372cdb76 libobjc.A.dylib`objc_msgSend + 22
frame #1: 0x000143a2 Intention2`__34-[GameViewController endRecording]_block_invoke193(.block_descriptor=<unavailable>) + 554 at GameViewController.m:366
frame #2: 0x00383926 libdispatch.dylib`_dispatch_client_callout + 22
frame #3: 0x0039214c libdispatch.dylib`_dispatch_source_latch_and_call + 556
frame #4: 0x003852de libdispatch.dylib`_dispatch_source_invoke + 190
frame #5: 0x00386a36 libdispatch.dylib`_dispatch_main_queue_callback_4CF + 354
frame #6: 0x2a125ba0 CoreFoundation`__CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 8
frame #7: 0x2a1242c0 CoreFoundation`__CFRunLoopRun + 1512
- (void) endRecording
{
NSLog(@"End Recording");
if(self.recording)
{
self.recording = NO;
self.recordPlaybackIndex = 0;
// Now we need to start an internal timer to handle playing back our recording
@vade
vade / gist:c63f37f7a8c22413a7d9
Last active August 29, 2015 14:04
A question for you:
Painters, illustrators, and those who work with pen and brush, conducting
music, and physical gestures in general, I have a question or two for you:
What language/terminology do you use to describe the brush and pen strokes, in
your work and work of others, and brush techniques in general? Do you ever
talk about these gestures? How do you talk about them?
What constitutes a "bold" brush stroke versus a mild delicate one? Pressure,
color, contrast from the background? the speed with which it is applied? How
is boldness manifested?
- (id) initWithFrame:(CGRect)frame
{
self = [super initWithFrame:frame];
if(self)
{
[self sharedInit];
}
return self;