Bricksmith and Allen Smith


RE: Bricksmith and Allen Smith
#22
(2019-02-13, 4:55)Travis Cobbs Wrote: I pulled, built, and ran, and the debug build got an assertion failure on line 232 of LDrawGLRender.m:

Code:
    assert(glIsEnabled(GL_VERTEX_ARRAY));

A release build ran fine, but didn't show the model (not surprisingly, given the above assert).

I did play around a bit with the code and it turned out, that the LDrawGLRenderer is not initialized at this point. To fix it, I moved the creation of the renderer before the setup of the Open GL Context: 

Code:
renderer = [[LDrawGLRenderer alloc] initWithBounds:NSSizeToSize2([self bounds].size)];
[renderer setDelegate:self withScroller:self];
[renderer setLDrawColor:[[ColorLibrary sharedColorLibrary] colorForCode:LDrawCurrentColor]];
   
// Set up our OpenGL context. We need to base it on a shared context so that
...
 
Also, as Travis Cobbs wrote, OverlayHelperWindow needs a clear background color. 

With this, I see a model, although the aspect ratio is not correct.
Reply
« Next Oldest | Next Newest »



Messages In This Thread
Bricksmith and Allen Smith - by Ben Supnik - 2018-03-17, 14:48
RE: Bricksmith and Allen Smith - by Petrasich - 2018-12-09, 19:09
RE: Bricksmith and Allen Smith - by Oli Hahn - 2020-05-05, 22:14

Forum Jump:


Users browsing this thread: 1 Guest(s)