Thanks Igor, I will ask our local OpenGL expert 

Cheers,
Alexandre


On Jun 27, 2013, at 7:00 AM, Igor Stasenko <[email protected]> wrote:

> On 26 June 2013 21:06, Alexandre Bergel <[email protected]> wrote:
>> Hi!
>> 
>> Apparently, it happens that we get an error "Frame buffer status: Unknown 
>> error". The error comes from the method checkStatus:
>> 
>> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>> NBGLFrameBuffer>>checkStatus
>>        | status |
>>        self bind.
>>        status := gl checkFramebufferStatusEXT: GL_FRAMEBUFFER.
>> 
>>        status = GL_FRAMEBUFFER_COMPLETE ifFalse: [
>>                #(
>>                        #GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT
>>                        #GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT
>>                        #GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER
>>                        #GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER
>>                        #GL_FRAMEBUFFER_UNSUPPORTED
>>                        #GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE
>>                        #GL_FRAMEBUFFER_UNDEFINED
>>                ) do: [:sym |
>>                        (self class bindingOf: sym) ifNotNil: [:b |
>>                                status = b value ifTrue: [ ^ self error: 
>> 'Frame buffer is incomplete: ', b key ]        ].
>>                ].
>>                ^ self error: 'Frame buffer status: Unknown error'.
>>        ].
>>        ^ true "ok"
>> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>> 
>> Any idea what's going on?
>> 
>> We took a Pharo 2.0, loaded Athens, NBOpenGL, SourceCity, and roassal3d. 
>> Running the test of roassal3d shows this.
>> I suspect this error comes from some interaction between the tests. Closing 
>> an opengl window is enough to desallocate the opengl resources?
>> 
> 
> If i remember , you should close and force GC.
> But of course, it would be preferable , if on window close event you
> explicitly deallocate things immediately,
> then you don't have to wait for GC to clean it for you.
> 
> The problem, i think, is interference between two different opengl contexts.
> OpenGL is built so, that you need to actiave different context
> (glMakeCurrent) between using any functions for it
> (otherwise you would need to pass extra argument - a context handle,
> to each function)..
> Now i think the code that allocates/deallocates things in opengl
> assumes that a valid context is currently selected (or only single
> context )..
> because apparently, if current context is different than where you did
> allocated the resources , you will get an error.
> 
>> Cheers,
>> Alexandre
>> --
>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>> Alexandre Bergel  http://www.bergel.eu
>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>> 
> 
> 
> -- 
> Best regards,
> Igor Stasenko.
> 

-- 
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.




Reply via email to