[squeak-dev] Re:NativeBoost and NBOpenGL on Mac?

Igor Stasenko siguctua at gmail.com
Wed Jan 11 22:39:47 UTC 2012


On 11 January 2012 20:10, Lawson English <lenglish5 at cox.net> wrote:
> [pharo list added back in for real this time]
>
> Would it be best to have a VM primitive that actually gives this info in a
> cross-platform way since it is going to be more and more useful as time goes
> on?
>

one big issue with such primitive is lack of options which i able to
contol for context i creating.
As you may know there's a lot of different options , like
 - depth buffer bits, color buffer bits, alpha bits number of back
buffers, subpixel antialiazing,
 auxuliarry buffers etc

as i said before in other posts.. it is really hard to create a
primitive which will allow
you to control all those options, especially a cross-platform one.

I know that for most users you could take 1 pixel format, 1 back
buffer and you free to go,
but it just doesn't feels right to me, why we should lose all the
variety of control and put constrains at context creation stage.
That's why i striving for controlling context creation at image side,
and if that requires writing a platform-specific code
in image, so be it. But then i could make sure that you could access
all OpenGL capabilities similar to C/C++ code,
without limitations.
For beginners, these options may mean nothing, but for those who
dealing with OpenGL at more advanced levels, trust me,
they simply cannot live without it. Many advanced opengl examples and
rendering techniques requiring fine control on context creation.



> On 1/11/12 11:56 AM, Hans-Martin Mosner wrote:
>>
>> Am 11.01.2012 19:18, schrieb Bert Freudenberg:
>>>
>>> ...
>>> This primitive encapsulates the platform-dependent part of creating an
>>> OpenGL rendering context. OpenGL itself is platform-independent, but
>>> creating a window is not. The plugin has code for Mac, Windows, and Unix.
>>>
>>> So this creates a new borderless window that gets embedded in the "big"
>>> main window. It also creates an OpenGL context for that window and makes it
>>> current. After calling the primitive you can use any OpenGL commands to draw
>>> directly into it using the hardware renderer. I don't see a good reason why
>>> you would not want to use it.
>>>
>>> - Bert -
>>>
>> I'm currently also experimenting with this (under Linux) and it looks like
>> this does not fully work on my system - the
>> OpenGL output seems to be displayed for a very short moment, and then only
>> teh Squeak desktop is visible again.
>> Of course, it's nice to have the platform-dependent part within the
>> primitive, but at least for Windows and Linux/X11
>> creating an OpenGL context is not really difficult, so since we already
>> have platform-dependent OpenGL subclasses
>> anyway, there is no strong reason to keep the context creation stuff in
>> primitive code.
>>
>> Cheers,
>> Hans-Martin
>>
>>
>
>



-- 
Best regards,
Igor Stasenko.



More information about the Squeak-dev mailing list