X11 options on Ubuntu VM / Athens rendering problems

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
34 messages Options
12
Reply | Threaded
Open this post in threaded view
|

X11 options on Ubuntu VM / Athens rendering problems

jrick
I'm running a fullscreen Pharo application on Ubuntu and I've noticed that Athens rendering gets way worse (maybe 10 updates per second) when I switch to fullscreen mode from inside Pharo. Ideally, I'd love for that to be fixed.

In lieu of that, it would be cool if I could just maximize Pharo to the size of the screen to achieve good performance. Two things stop that: the Unity application bar and the title-bar. For the former, I can configure Unity to hide it. I noticed a '-notitle' X11 option when I execute pharo -help. I've tried using these X11 options and neither -notitle or -fullscreen seem to have any effect. Here's the command I run:

./bin/pharo --encoding utf8 -vm-display-X11 -fullscreen PATH_TO_IMAGE &

Pharo starts fine but neither option seems to have any effect. I've also tried this in GNOME, thinking that Unity was the problem. Again, no effect.

Any suggestions?

Jeff


Reply | Threaded
Open this post in threaded view
|

Re: X11 options on Ubuntu VM / Athens rendering problems

Stephane Ducasse-3
Hi Jeff

Nice to see you. I do not know anybody running on X11. Esteban is
working on better SDL20 integration.
Did you try having a native window? I asked clement if he could
release the Wizard Battle Arena because it was a game he did in a
couple of days (yes he is good this guy) and that use cairo athens
based for drawing on native window.

stef

On Fri, Sep 22, 2017 at 3:11 PM, J.F. Rick <[hidden email]> wrote:

> I'm running a fullscreen Pharo application on Ubuntu and I've noticed that
> Athens rendering gets way worse (maybe 10 updates per second) when I switch
> to fullscreen mode from inside Pharo. Ideally, I'd love for that to be
> fixed.
>
> In lieu of that, it would be cool if I could just maximize Pharo to the size
> of the screen to achieve good performance. Two things stop that: the Unity
> application bar and the title-bar. For the former, I can configure Unity to
> hide it. I noticed a '-notitle' X11 option when I execute pharo -help. I've
> tried using these X11 options and neither -notitle or -fullscreen seem to
> have any effect. Here's the command I run:
>
> ./bin/pharo --encoding utf8 -vm-display-X11 -fullscreen PATH_TO_IMAGE &
>
> Pharo starts fine but neither option seems to have any effect. I've also
> tried this in GNOME, thinking that Unity was the problem. Again, no effect.
>
> Any suggestions?
>
> Jeff
>
>

Reply | Threaded
Open this post in threaded view
|

Re: X11 options on Ubuntu VM / Athens rendering problems

jrick
Hi Stef,

since I'm only doing Athens rendering, it might be possible to do a native window implementation. That said, I don't know how to get started with that. Documentation seems to be hard to find. The last time I saw any work on that it was too early to be usable. I'm also not sure if it solves my "it needs to run in fullscreen at full speed" problem. If someone like Clement could get me started, that would be awesome.

Cheers,

Jeff

On Fri, Sep 22, 2017 at 12:27 PM Stephane Ducasse <[hidden email]> wrote:
Hi Jeff

Nice to see you. I do not know anybody running on X11. Esteban is
working on better SDL20 integration.
Did you try having a native window? I asked clement if he could
release the Wizard Battle Arena because it was a game he did in a
couple of days (yes he is good this guy) and that use cairo athens
based for drawing on native window.

stef

On Fri, Sep 22, 2017 at 3:11 PM, J.F. Rick <[hidden email]> wrote:
> I'm running a fullscreen Pharo application on Ubuntu and I've noticed that
> Athens rendering gets way worse (maybe 10 updates per second) when I switch
> to fullscreen mode from inside Pharo. Ideally, I'd love for that to be
> fixed.
>
> In lieu of that, it would be cool if I could just maximize Pharo to the size
> of the screen to achieve good performance. Two things stop that: the Unity
> application bar and the title-bar. For the former, I can configure Unity to
> hide it. I noticed a '-notitle' X11 option when I execute pharo -help. I've
> tried using these X11 options and neither -notitle or -fullscreen seem to
> have any effect. Here's the command I run:
>
> ./bin/pharo --encoding utf8 -vm-display-X11 -fullscreen PATH_TO_IMAGE &
>
> Pharo starts fine but neither option seems to have any effect. I've also
> tried this in GNOME, thinking that Unity was the problem. Again, no effect.
>
> Any suggestions?
>
> Jeff
>
>

Reply | Threaded
Open this post in threaded view
|

Re: X11 options on Ubuntu VM / Athens rendering problems

Stephane Ducasse-3
Yes I will share a dropbox with you for now.

On Sat, Sep 23, 2017 at 9:44 PM, J.F. Rick <[hidden email]> wrote:

> Hi Stef,
>
> since I'm only doing Athens rendering, it might be possible to do a native
> window implementation. That said, I don't know how to get started with that.
> Documentation seems to be hard to find. The last time I saw any work on that
> it was too early to be usable. I'm also not sure if it solves my "it needs
> to run in fullscreen at full speed" problem. If someone like Clement could
> get me started, that would be awesome.
>
> Cheers,
>
> Jeff
>
> On Fri, Sep 22, 2017 at 12:27 PM Stephane Ducasse <[hidden email]>
> wrote:
>>
>> Hi Jeff
>>
>> Nice to see you. I do not know anybody running on X11. Esteban is
>> working on better SDL20 integration.
>> Did you try having a native window? I asked clement if he could
>> release the Wizard Battle Arena because it was a game he did in a
>> couple of days (yes he is good this guy) and that use cairo athens
>> based for drawing on native window.
>>
>> stef
>>
>> On Fri, Sep 22, 2017 at 3:11 PM, J.F. Rick <[hidden email]> wrote:
>> > I'm running a fullscreen Pharo application on Ubuntu and I've noticed
>> > that
>> > Athens rendering gets way worse (maybe 10 updates per second) when I
>> > switch
>> > to fullscreen mode from inside Pharo. Ideally, I'd love for that to be
>> > fixed.
>> >
>> > In lieu of that, it would be cool if I could just maximize Pharo to the
>> > size
>> > of the screen to achieve good performance. Two things stop that: the
>> > Unity
>> > application bar and the title-bar. For the former, I can configure Unity
>> > to
>> > hide it. I noticed a '-notitle' X11 option when I execute pharo -help.
>> > I've
>> > tried using these X11 options and neither -notitle or -fullscreen seem
>> > to
>> > have any effect. Here's the command I run:
>> >
>> > ./bin/pharo --encoding utf8 -vm-display-X11 -fullscreen PATH_TO_IMAGE &
>> >
>> > Pharo starts fine but neither option seems to have any effect. I've also
>> > tried this in GNOME, thinking that Unity was the problem. Again, no
>> > effect.
>> >
>> > Any suggestions?
>> >
>> > Jeff
>> >
>> >
>>
>

Reply | Threaded
Open this post in threaded view
|

Re: X11 options on Ubuntu VM / Athens rendering problems

Stephane Ducasse-3
Hi jeff

let us know if this is working. the start.sh script is not working on
my machine. but clement made it worked on his machine and he should
publish a zip.

Stef



On Sun, Sep 24, 2017 at 9:39 AM, Stephane Ducasse
<[hidden email]> wrote:

> Yes I will share a dropbox with you for now.
>
> On Sat, Sep 23, 2017 at 9:44 PM, J.F. Rick <[hidden email]> wrote:
>> Hi Stef,
>>
>> since I'm only doing Athens rendering, it might be possible to do a native
>> window implementation. That said, I don't know how to get started with that.
>> Documentation seems to be hard to find. The last time I saw any work on that
>> it was too early to be usable. I'm also not sure if it solves my "it needs
>> to run in fullscreen at full speed" problem. If someone like Clement could
>> get me started, that would be awesome.
>>
>> Cheers,
>>
>> Jeff
>>
>> On Fri, Sep 22, 2017 at 12:27 PM Stephane Ducasse <[hidden email]>
>> wrote:
>>>
>>> Hi Jeff
>>>
>>> Nice to see you. I do not know anybody running on X11. Esteban is
>>> working on better SDL20 integration.
>>> Did you try having a native window? I asked clement if he could
>>> release the Wizard Battle Arena because it was a game he did in a
>>> couple of days (yes he is good this guy) and that use cairo athens
>>> based for drawing on native window.
>>>
>>> stef
>>>
>>> On Fri, Sep 22, 2017 at 3:11 PM, J.F. Rick <[hidden email]> wrote:
>>> > I'm running a fullscreen Pharo application on Ubuntu and I've noticed
>>> > that
>>> > Athens rendering gets way worse (maybe 10 updates per second) when I
>>> > switch
>>> > to fullscreen mode from inside Pharo. Ideally, I'd love for that to be
>>> > fixed.
>>> >
>>> > In lieu of that, it would be cool if I could just maximize Pharo to the
>>> > size
>>> > of the screen to achieve good performance. Two things stop that: the
>>> > Unity
>>> > application bar and the title-bar. For the former, I can configure Unity
>>> > to
>>> > hide it. I noticed a '-notitle' X11 option when I execute pharo -help.
>>> > I've
>>> > tried using these X11 options and neither -notitle or -fullscreen seem
>>> > to
>>> > have any effect. Here's the command I run:
>>> >
>>> > ./bin/pharo --encoding utf8 -vm-display-X11 -fullscreen PATH_TO_IMAGE &
>>> >
>>> > Pharo starts fine but neither option seems to have any effect. I've also
>>> > tried this in GNOME, thinking that Unity was the problem. Again, no
>>> > effect.
>>> >
>>> > Any suggestions?
>>> >
>>> > Jeff
>>> >
>>> >
>>>
>>

Reply | Threaded
Open this post in threaded view
|

Re: X11 options on Ubuntu VM / Athens rendering problems

Clément Béra
Hi,

I describe in the next paragraphs what I do to build application with Pharo at 50 fps. Now I am using a SDL2 window with OSWindow and not the default Pharo window for rendering. There is a fullscreen option with OSWindow, I don't use it but I've just tried it works fine.

To use Athens/Cairo I start the VM headless and I open from the code a window using the SDL2 binding (OSWindow), then I extract the window surface as a cairo surface to draw on it using Athens and I use SDL2 to manage events (mouse, keyboard). That way I don't even start morphic/WorldMorph which wastes cpu ressources.

I built this video game that way:

The game is running in Pharo 4 (pre-Spur). I configured it to run at 50 fps but from time to time some frames are dropped for performance so I would say it is running at around 48-49 fps in practice. I think it should work on the latest Pharo but you need to ask on pharo-dev how to use OSWindow. Some APIs have changed since Pharo 4. Since the latest Pharo version is now using Spur I expect the performance to be way better and I think 50 fps is definitely manageable on a laptop.

Note that this is still Pharo so if you want something which looks real-time you need to be careful about you object allocation rate in-between frame rendering.

I hope this can help. 

Regards



On Sun, Sep 24, 2017 at 9:43 AM, Stephane Ducasse <[hidden email]> wrote:
Hi jeff

let us know if this is working. the start.sh script is not working on
my machine. but clement made it worked on his machine and he should
publish a zip.

Stef



On Sun, Sep 24, 2017 at 9:39 AM, Stephane Ducasse
<[hidden email]> wrote:
> Yes I will share a dropbox with you for now.
>
> On Sat, Sep 23, 2017 at 9:44 PM, J.F. Rick <[hidden email]> wrote:
>> Hi Stef,
>>
>> since I'm only doing Athens rendering, it might be possible to do a native
>> window implementation. That said, I don't know how to get started with that.
>> Documentation seems to be hard to find. The last time I saw any work on that
>> it was too early to be usable. I'm also not sure if it solves my "it needs
>> to run in fullscreen at full speed" problem. If someone like Clement could
>> get me started, that would be awesome.
>>
>> Cheers,
>>
>> Jeff
>>
>> On Fri, Sep 22, 2017 at 12:27 PM Stephane Ducasse <[hidden email]>
>> wrote:
>>>
>>> Hi Jeff
>>>
>>> Nice to see you. I do not know anybody running on X11. Esteban is
>>> working on better SDL20 integration.
>>> Did you try having a native window? I asked clement if he could
>>> release the Wizard Battle Arena because it was a game he did in a
>>> couple of days (yes he is good this guy) and that use cairo athens
>>> based for drawing on native window.
>>>
>>> stef
>>>
>>> On Fri, Sep 22, 2017 at 3:11 PM, J.F. Rick <[hidden email]> wrote:
>>> > I'm running a fullscreen Pharo application on Ubuntu and I've noticed
>>> > that
>>> > Athens rendering gets way worse (maybe 10 updates per second) when I
>>> > switch
>>> > to fullscreen mode from inside Pharo. Ideally, I'd love for that to be
>>> > fixed.
>>> >
>>> > In lieu of that, it would be cool if I could just maximize Pharo to the
>>> > size
>>> > of the screen to achieve good performance. Two things stop that: the
>>> > Unity
>>> > application bar and the title-bar. For the former, I can configure Unity
>>> > to
>>> > hide it. I noticed a '-notitle' X11 option when I execute pharo -help.
>>> > I've
>>> > tried using these X11 options and neither -notitle or -fullscreen seem
>>> > to
>>> > have any effect. Here's the command I run:
>>> >
>>> > ./bin/pharo --encoding utf8 -vm-display-X11 -fullscreen PATH_TO_IMAGE &
>>> >
>>> > Pharo starts fine but neither option seems to have any effect. I've also
>>> > tried this in GNOME, thinking that Unity was the problem. Again, no
>>> > effect.
>>> >
>>> > Any suggestions?
>>> >
>>> > Jeff
>>> >
>>> >
>>>
>>


Reply | Threaded
Open this post in threaded view
|

Re: X11 options on Ubuntu VM / Athens rendering problems

jrick
Hi Clement and and Stef,

thanks for sharing. The video looks cool and it seems like a high-performance approach. Unfortunately, it doesn't seem to be working in Linux. I'm attaching the Pharo debug file, but it seems like the Handler being OSNullWindowHandle indicates a problem. I'm also not sure that this approach would allow me to do fullscreen apps. I noticed that your video shows a title bar in MacOS.

Cheers,

Jeff





On Sun, Sep 24, 2017 at 7:53 AM Clément Bera <[hidden email]> wrote:
Hi,

I describe in the next paragraphs what I do to build application with Pharo at 50 fps. Now I am using a SDL2 window with OSWindow and not the default Pharo window for rendering. There is a fullscreen option with OSWindow, I don't use it but I've just tried it works fine.

To use Athens/Cairo I start the VM headless and I open from the code a window using the SDL2 binding (OSWindow), then I extract the window surface as a cairo surface to draw on it using Athens and I use SDL2 to manage events (mouse, keyboard). That way I don't even start morphic/WorldMorph which wastes cpu ressources.

I built this video game that way:

The game is running in Pharo 4 (pre-Spur). I configured it to run at 50 fps but from time to time some frames are dropped for performance so I would say it is running at around 48-49 fps in practice. I think it should work on the latest Pharo but you need to ask on pharo-dev how to use OSWindow. Some APIs have changed since Pharo 4. Since the latest Pharo version is now using Spur I expect the performance to be way better and I think 50 fps is definitely manageable on a laptop.

Note that this is still Pharo so if you want something which looks real-time you need to be careful about you object allocation rate in-between frame rendering.

I hope this can help. 

Regards



On Sun, Sep 24, 2017 at 9:43 AM, Stephane Ducasse <[hidden email]> wrote:
Hi jeff

let us know if this is working. the start.sh script is not working on
my machine. but clement made it worked on his machine and he should
publish a zip.

Stef



On Sun, Sep 24, 2017 at 9:39 AM, Stephane Ducasse
<[hidden email]> wrote:
> Yes I will share a dropbox with you for now.
>
> On Sat, Sep 23, 2017 at 9:44 PM, J.F. Rick <[hidden email]> wrote:
>> Hi Stef,
>>
>> since I'm only doing Athens rendering, it might be possible to do a native
>> window implementation. That said, I don't know how to get started with that.
>> Documentation seems to be hard to find. The last time I saw any work on that
>> it was too early to be usable. I'm also not sure if it solves my "it needs
>> to run in fullscreen at full speed" problem. If someone like Clement could
>> get me started, that would be awesome.
>>
>> Cheers,
>>
>> Jeff
>>
>> On Fri, Sep 22, 2017 at 12:27 PM Stephane Ducasse <[hidden email]>
>> wrote:
>>>
>>> Hi Jeff
>>>
>>> Nice to see you. I do not know anybody running on X11. Esteban is
>>> working on better SDL20 integration.
>>> Did you try having a native window? I asked clement if he could
>>> release the Wizard Battle Arena because it was a game he did in a
>>> couple of days (yes he is good this guy) and that use cairo athens
>>> based for drawing on native window.
>>>
>>> stef
>>>
>>> On Fri, Sep 22, 2017 at 3:11 PM, J.F. Rick <[hidden email]> wrote:
>>> > I'm running a fullscreen Pharo application on Ubuntu and I've noticed
>>> > that
>>> > Athens rendering gets way worse (maybe 10 updates per second) when I
>>> > switch
>>> > to fullscreen mode from inside Pharo. Ideally, I'd love for that to be
>>> > fixed.
>>> >
>>> > In lieu of that, it would be cool if I could just maximize Pharo to the
>>> > size
>>> > of the screen to achieve good performance. Two things stop that: the
>>> > Unity
>>> > application bar and the title-bar. For the former, I can configure Unity
>>> > to
>>> > hide it. I noticed a '-notitle' X11 option when I execute pharo -help.
>>> > I've
>>> > tried using these X11 options and neither -notitle or -fullscreen seem
>>> > to
>>> > have any effect. Here's the command I run:
>>> >
>>> > ./bin/pharo --encoding utf8 -vm-display-X11 -fullscreen PATH_TO_IMAGE &
>>> >
>>> > Pharo starts fine but neither option seems to have any effect. I've also
>>> > tried this in GNOME, thinking that Unity was the problem. Again, no
>>> > effect.
>>> >
>>> > Any suggestions?
>>> >
>>> > Jeff
>>> >
>>> >
>>>
>>



PharoDebug.log (92K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: X11 options on Ubuntu VM / Athens rendering problems

Clément Béra


On Mon, Sep 25, 2017 at 2:33 AM, J.F. Rick <[hidden email]> wrote:
Hi Clement and and Stef,

thanks for sharing. The video looks cool and it seems like a high-performance approach. Unfortunately, it doesn't seem to be working in Linux. I'm attaching the Pharo debug file, but it seems like the Handler being OSNullWindowHandle indicates a problem. I'm also not sure that this approach would allow me to do fullscreen apps. I noticed that your video shows a title bar in MacOS.


I've never made the demo work on linux, I am not surprised it doesn't work. This demo is based on the Pharo 4 OSWindow version, and more recent versions are working fine on linux.

About fullscreen as I said in the previous mail it is possible to enable it, I tried it worked, but I did not do it as I don't think it make sense with this game.

I will consider in the future making it work on the latest Pharo version on multiple OS if it makes sense to show people how to do it. I'm busy with other concerns right now.

Anyway, it's just one approach, you can use another one. 
 
Cheers,

Jeff





On Sun, Sep 24, 2017 at 7:53 AM Clément Bera <[hidden email]> wrote:
Hi,

I describe in the next paragraphs what I do to build application with Pharo at 50 fps. Now I am using a SDL2 window with OSWindow and not the default Pharo window for rendering. There is a fullscreen option with OSWindow, I don't use it but I've just tried it works fine.

To use Athens/Cairo I start the VM headless and I open from the code a window using the SDL2 binding (OSWindow), then I extract the window surface as a cairo surface to draw on it using Athens and I use SDL2 to manage events (mouse, keyboard). That way I don't even start morphic/WorldMorph which wastes cpu ressources.

I built this video game that way:

The game is running in Pharo 4 (pre-Spur). I configured it to run at 50 fps but from time to time some frames are dropped for performance so I would say it is running at around 48-49 fps in practice. I think it should work on the latest Pharo but you need to ask on pharo-dev how to use OSWindow. Some APIs have changed since Pharo 4. Since the latest Pharo version is now using Spur I expect the performance to be way better and I think 50 fps is definitely manageable on a laptop.

Note that this is still Pharo so if you want something which looks real-time you need to be careful about you object allocation rate in-between frame rendering.

I hope this can help. 

Regards



On Sun, Sep 24, 2017 at 9:43 AM, Stephane Ducasse <[hidden email]> wrote:
Hi jeff

let us know if this is working. the start.sh script is not working on
my machine. but clement made it worked on his machine and he should
publish a zip.

Stef



On Sun, Sep 24, 2017 at 9:39 AM, Stephane Ducasse
<[hidden email]> wrote:
> Yes I will share a dropbox with you for now.
>
> On Sat, Sep 23, 2017 at 9:44 PM, J.F. Rick <[hidden email]> wrote:
>> Hi Stef,
>>
>> since I'm only doing Athens rendering, it might be possible to do a native
>> window implementation. That said, I don't know how to get started with that.
>> Documentation seems to be hard to find. The last time I saw any work on that
>> it was too early to be usable. I'm also not sure if it solves my "it needs
>> to run in fullscreen at full speed" problem. If someone like Clement could
>> get me started, that would be awesome.
>>
>> Cheers,
>>
>> Jeff
>>
>> On Fri, Sep 22, 2017 at 12:27 PM Stephane Ducasse <[hidden email]>
>> wrote:
>>>
>>> Hi Jeff
>>>
>>> Nice to see you. I do not know anybody running on X11. Esteban is
>>> working on better SDL20 integration.
>>> Did you try having a native window? I asked clement if he could
>>> release the Wizard Battle Arena because it was a game he did in a
>>> couple of days (yes he is good this guy) and that use cairo athens
>>> based for drawing on native window.
>>>
>>> stef
>>>
>>> On Fri, Sep 22, 2017 at 3:11 PM, J.F. Rick <[hidden email]> wrote:
>>> > I'm running a fullscreen Pharo application on Ubuntu and I've noticed
>>> > that
>>> > Athens rendering gets way worse (maybe 10 updates per second) when I
>>> > switch
>>> > to fullscreen mode from inside Pharo. Ideally, I'd love for that to be
>>> > fixed.
>>> >
>>> > In lieu of that, it would be cool if I could just maximize Pharo to the
>>> > size
>>> > of the screen to achieve good performance. Two things stop that: the
>>> > Unity
>>> > application bar and the title-bar. For the former, I can configure Unity
>>> > to
>>> > hide it. I noticed a '-notitle' X11 option when I execute pharo -help.
>>> > I've
>>> > tried using these X11 options and neither -notitle or -fullscreen seem
>>> > to
>>> > have any effect. Here's the command I run:
>>> >
>>> > ./bin/pharo --encoding utf8 -vm-display-X11 -fullscreen PATH_TO_IMAGE &
>>> >
>>> > Pharo starts fine but neither option seems to have any effect. I've also
>>> > tried this in GNOME, thinking that Unity was the problem. Again, no
>>> > effect.
>>> >
>>> > Any suggestions?
>>> >
>>> > Jeff
>>> >
>>> >
>>>
>>



Reply | Threaded
Open this post in threaded view
|

Re: X11 options on Ubuntu VM / Athens rendering problems

Stephane Ducasse-3
Hi jeff

you should give a try so that you can push esteban in his fight for a
free host and strong SDL2.0

Stef

On Mon, Sep 25, 2017 at 7:51 AM, Clément Bera <[hidden email]> wrote:

>
>
> On Mon, Sep 25, 2017 at 2:33 AM, J.F. Rick <[hidden email]> wrote:
>>
>> Hi Clement and and Stef,
>>
>> thanks for sharing. The video looks cool and it seems like a
>> high-performance approach. Unfortunately, it doesn't seem to be working in
>> Linux. I'm attaching the Pharo debug file, but it seems like the Handler
>> being OSNullWindowHandle indicates a problem. I'm also not sure that this
>> approach would allow me to do fullscreen apps. I noticed that your video
>> shows a title bar in MacOS.
>>
>
> I've never made the demo work on linux, I am not surprised it doesn't work.
> This demo is based on the Pharo 4 OSWindow version, and more recent versions
> are working fine on linux.
>
> About fullscreen as I said in the previous mail it is possible to enable it,
> I tried it worked, but I did not do it as I don't think it make sense with
> this game.
>
> I will consider in the future making it work on the latest Pharo version on
> multiple OS if it makes sense to show people how to do it. I'm busy with
> other concerns right now.
>
> Anyway, it's just one approach, you can use another one.
>
>>
>> Cheers,
>>
>> Jeff
>>
>>
>>
>>
>>
>> On Sun, Sep 24, 2017 at 7:53 AM Clément Bera <[hidden email]>
>> wrote:
>>>
>>> Hi,
>>>
>>> I describe in the next paragraphs what I do to build application with
>>> Pharo at 50 fps. Now I am using a SDL2 window with OSWindow and not the
>>> default Pharo window for rendering. There is a fullscreen option with
>>> OSWindow, I don't use it but I've just tried it works fine.
>>>
>>> To use Athens/Cairo I start the VM headless and I open from the code a
>>> window using the SDL2 binding (OSWindow), then I extract the window surface
>>> as a cairo surface to draw on it using Athens and I use SDL2 to manage
>>> events (mouse, keyboard). That way I don't even start morphic/WorldMorph
>>> which wastes cpu ressources.
>>>
>>> I built this video game that way:
>>>
>>> https://clementbera.wordpress.com/2016/08/29/sdl2-cairo-headless-for-realtime-native-applications/
>>> https://www.youtube.com/watch?v=srPdFgbyS6s
>>>
>>> The game is running in Pharo 4 (pre-Spur). I configured it to run at 50
>>> fps but from time to time some frames are dropped for performance so I would
>>> say it is running at around 48-49 fps in practice. I think it should work on
>>> the latest Pharo but you need to ask on pharo-dev how to use OSWindow. Some
>>> APIs have changed since Pharo 4. Since the latest Pharo version is now using
>>> Spur I expect the performance to be way better and I think 50 fps is
>>> definitely manageable on a laptop.
>>>
>>> Note that this is still Pharo so if you want something which looks
>>> real-time you need to be careful about you object allocation rate in-between
>>> frame rendering.
>>>
>>> I hope this can help.
>>>
>>> Regards
>>>
>>>
>>>
>>> On Sun, Sep 24, 2017 at 9:43 AM, Stephane Ducasse
>>> <[hidden email]> wrote:
>>>>
>>>> Hi jeff
>>>>
>>>> let us know if this is working. the start.sh script is not working on
>>>> my machine. but clement made it worked on his machine and he should
>>>> publish a zip.
>>>>
>>>> Stef
>>>>
>>>>
>>>>
>>>> On Sun, Sep 24, 2017 at 9:39 AM, Stephane Ducasse
>>>> <[hidden email]> wrote:
>>>> > Yes I will share a dropbox with you for now.
>>>> >
>>>> > On Sat, Sep 23, 2017 at 9:44 PM, J.F. Rick <[hidden email]> wrote:
>>>> >> Hi Stef,
>>>> >>
>>>> >> since I'm only doing Athens rendering, it might be possible to do a
>>>> >> native
>>>> >> window implementation. That said, I don't know how to get started
>>>> >> with that.
>>>> >> Documentation seems to be hard to find. The last time I saw any work
>>>> >> on that
>>>> >> it was too early to be usable. I'm also not sure if it solves my "it
>>>> >> needs
>>>> >> to run in fullscreen at full speed" problem. If someone like Clement
>>>> >> could
>>>> >> get me started, that would be awesome.
>>>> >>
>>>> >> Cheers,
>>>> >>
>>>> >> Jeff
>>>> >>
>>>> >> On Fri, Sep 22, 2017 at 12:27 PM Stephane Ducasse
>>>> >> <[hidden email]>
>>>> >> wrote:
>>>> >>>
>>>> >>> Hi Jeff
>>>> >>>
>>>> >>> Nice to see you. I do not know anybody running on X11. Esteban is
>>>> >>> working on better SDL20 integration.
>>>> >>> Did you try having a native window? I asked clement if he could
>>>> >>> release the Wizard Battle Arena because it was a game he did in a
>>>> >>> couple of days (yes he is good this guy) and that use cairo athens
>>>> >>> based for drawing on native window.
>>>> >>>
>>>> >>> stef
>>>> >>>
>>>> >>> On Fri, Sep 22, 2017 at 3:11 PM, J.F. Rick <[hidden email]> wrote:
>>>> >>> > I'm running a fullscreen Pharo application on Ubuntu and I've
>>>> >>> > noticed
>>>> >>> > that
>>>> >>> > Athens rendering gets way worse (maybe 10 updates per second) when
>>>> >>> > I
>>>> >>> > switch
>>>> >>> > to fullscreen mode from inside Pharo. Ideally, I'd love for that
>>>> >>> > to be
>>>> >>> > fixed.
>>>> >>> >
>>>> >>> > In lieu of that, it would be cool if I could just maximize Pharo
>>>> >>> > to the
>>>> >>> > size
>>>> >>> > of the screen to achieve good performance. Two things stop that:
>>>> >>> > the
>>>> >>> > Unity
>>>> >>> > application bar and the title-bar. For the former, I can configure
>>>> >>> > Unity
>>>> >>> > to
>>>> >>> > hide it. I noticed a '-notitle' X11 option when I execute pharo
>>>> >>> > -help.
>>>> >>> > I've
>>>> >>> > tried using these X11 options and neither -notitle or -fullscreen
>>>> >>> > seem
>>>> >>> > to
>>>> >>> > have any effect. Here's the command I run:
>>>> >>> >
>>>> >>> > ./bin/pharo --encoding utf8 -vm-display-X11 -fullscreen
>>>> >>> > PATH_TO_IMAGE &
>>>> >>> >
>>>> >>> > Pharo starts fine but neither option seems to have any effect.
>>>> >>> > I've also
>>>> >>> > tried this in GNOME, thinking that Unity was the problem. Again,
>>>> >>> > no
>>>> >>> > effect.
>>>> >>> >
>>>> >>> > Any suggestions?
>>>> >>> >
>>>> >>> > Jeff
>>>> >>> >
>>>> >>> >
>>>> >>>
>>>> >>
>>>>
>>>
>

Reply | Threaded
Open this post in threaded view
|

Re: X11 options on Ubuntu VM / Athens rendering problems

Igor Stasenko
i'm on ubuntu right now, so i could help with trying & testing things and/or diagnosing problems. Just tell me what to do


--
Best regards,
Igor Stasenko.
Reply | Threaded
Open this post in threaded view
|

Re: X11 options on Ubuntu VM / Athens rendering problems

Stephane Ducasse-3
Igor I will share the dropbox for you.
What would be great is to port the code of clement to Pharo 6.1 or
even 70 to check SDL20
Esteban was integrating some of the code of ronie.

Stef


On Wed, Sep 27, 2017 at 1:05 PM, Igor Stasenko <[hidden email]> wrote:
> i'm on ubuntu right now, so i could help with trying & testing things and/or
> diagnosing problems. Just tell me what to do
>
>
> --
> Best regards,
> Igor Stasenko.

Reply | Threaded
Open this post in threaded view
|

Re: X11 options on Ubuntu VM / Athens rendering problems

Igor Stasenko


On 27 September 2017 at 22:54, Stephane Ducasse <[hidden email]> wrote:
Igor I will share the dropbox for you.
What would be great is to port the code of clement to Pharo 6.1 or
even 70 to check SDL20
Esteban was integrating some of the code of ronie.

Downloading..
Would be nice, if someone could give me short directions how to test it , what to run and what to expect. Because i am clearly was out of context for too long.
 
Stef


On Wed, Sep 27, 2017 at 1:05 PM, Igor Stasenko <[hidden email]> wrote:
> i'm on ubuntu right now, so i could help with trying & testing things and/or
> diagnosing problems. Just tell me what to do
>
>
> --
> Best regards,
> Igor Stasenko.




--
Best regards,
Igor Stasenko.
Reply | Threaded
Open this post in threaded view
|

Re: X11 options on Ubuntu VM / Athens rendering problems

Igor Stasenko
okay, first, i have to change the path to SDL2 library, because on my machine it's in
/usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0
but there's another trouble:
browsing is incredibly slooow...
First, i used finder to look for 'libSDL2-2.0.so.0' in sources. it took like 2 minutes to go through first few classes with starting A letter in their name.
Then i lost temper, interrupted it and decided to browse into SDL bindings manually - clicked on OSWindow-SDL2 package... and its still 100% CPU and didn't opened
while i typing this whole message.

What is going on? Are .sources file corrupted or what?



On 28 September 2017 at 01:27, Igor Stasenko <[hidden email]> wrote:


On 27 September 2017 at 22:54, Stephane Ducasse <[hidden email]> wrote:
Igor I will share the dropbox for you.
What would be great is to port the code of clement to Pharo 6.1 or
even 70 to check SDL20
Esteban was integrating some of the code of ronie.

Downloading..
Would be nice, if someone could give me short directions how to test it , what to run and what to expect. Because i am clearly was out of context for too long.
 
Stef


On Wed, Sep 27, 2017 at 1:05 PM, Igor Stasenko <[hidden email]> wrote:
> i'm on ubuntu right now, so i could help with trying & testing things and/or
> diagnosing problems. Just tell me what to do
>
>
> --
> Best regards,
> Igor Stasenko.




--
Best regards,
Igor Stasenko.



--
Best regards,
Igor Stasenko.
Reply | Threaded
Open this post in threaded view
|

Re: X11 options on Ubuntu VM / Athens rendering problems

Igor Stasenko
apparently the SDL2 library is not in LD search path

ldd libSDL2DisplayPlugin.so 
linux-gate.so.1 =>  (0xf77e9000)
libSDL2-2.0.so.0 => not found
^^^^
libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xf75dd000)
/lib/ld-linux.so.2 (0x56573000)

so it simply doesn't starts,

so i installed 
sudo apt-get install libsdl2-2.0-0:i386

but then i found that i need to install 32-bit version of cairo as well..
but alas.. here is where i stuck:
----
sudo apt-get install libcairo2:i386
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libtheora0 : Depends: libcairo2 (>= 1.2.4) but it is not going to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
 ----

something in my installation are in conflict with 32-bit version of cairo.. that's weird..
but unmet dependencies/dependency conflict resolution of linux .deb packages is not my strong side.
So, it would be nice if someone could help how to proceed with that.




On 28 September 2017 at 01:41, Igor Stasenko <[hidden email]> wrote:
okay, first, i have to change the path to SDL2 library, because on my machine it's in
/usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0
but there's another trouble:
browsing is incredibly slooow...
First, i used finder to look for 'libSDL2-2.0.so.0' in sources. it took like 2 minutes to go through first few classes with starting A letter in their name.
Then i lost temper, interrupted it and decided to browse into SDL bindings manually - clicked on OSWindow-SDL2 package... and its still 100% CPU and didn't opened
while i typing this whole message.

What is going on? Are .sources file corrupted or what?



On 28 September 2017 at 01:27, Igor Stasenko <[hidden email]> wrote:


On 27 September 2017 at 22:54, Stephane Ducasse <[hidden email]> wrote:
Igor I will share the dropbox for you.
What would be great is to port the code of clement to Pharo 6.1 or
even 70 to check SDL20
Esteban was integrating some of the code of ronie.

Downloading..
Would be nice, if someone could give me short directions how to test it , what to run and what to expect. Because i am clearly was out of context for too long.
 
Stef


On Wed, Sep 27, 2017 at 1:05 PM, Igor Stasenko <[hidden email]> wrote:
> i'm on ubuntu right now, so i could help with trying & testing things and/or
> diagnosing problems. Just tell me what to do
>
>
> --
> Best regards,
> Igor Stasenko.




--
Best regards,
Igor Stasenko.



--
Best regards,
Igor Stasenko.



--
Best regards,
Igor Stasenko.
Reply | Threaded
Open this post in threaded view
|

Re: X11 options on Ubuntu VM / Athens rendering problems

Igor Stasenko
imo, best what could be done is to forget about 32-bit version and use 64-bit VM & libs, to avoid
problems like above.
but for that, i need a 64-bit VM/image pair for a start,
because one that you gave me is 32-bit.. and hence drags all the trouble with all this .so dependency zoo..

--
Best regards,
Igor Stasenko.
Reply | Threaded
Open this post in threaded view
|

Re: X11 options on Ubuntu VM / Athens rendering problems

HilaireFernandes
In reply to this post by Igor Stasenko
Hi Igor,

I got libsdl and libcairo 32bits installed fine on 64bits Ubuntu 17.04.

What is your ubuntu system?

Hilaire


Le 28/09/2017 à 01:22, Igor Stasenko a écrit :
> something in my installation are in conflict with 32-bit version of
> cairo.. that's weird..
> but unmet dependencies/dependency conflict resolution of linux .deb
> packages is not my strong side.
> So, it would be nice if someone could help how to proceed with that.

--
Dr. Geo
http://drgeo.eu



Reply | Threaded
Open this post in threaded view
|

Re: X11 options on Ubuntu VM / Athens rendering problems

HilaireFernandes
In reply to this post by Igor Stasenko
Have you tried a full update cycle of your system?

apt-get update
apt-get dist-upgrade

Hilaire

Le 28/09/2017 à 01:22, Igor Stasenko a écrit :
> So, it would be nice if someone could help how to proceed with that.

--
Dr. Geo
http://drgeo.eu



Reply | Threaded
Open this post in threaded view
|

Re: X11 options on Ubuntu VM / Athens rendering problems

Igor Stasenko
In reply to this post by HilaireFernandes


On 28 September 2017 at 12:43, Hilaire <[hidden email]> wrote:
Hi Igor,

I got libsdl and libcairo 32bits installed fine on 64bits Ubuntu 17.04.

weird..
 
What is your ubuntu system?

 cat /etc/lsb-release 
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=17.04
DISTRIB_CODENAME=zesty
DISTRIB_DESCRIPTION="Ubuntu 17.04"

 
Hilaire



Le 28/09/2017 à 01:22, Igor Stasenko a écrit :
something in my installation are in conflict with 32-bit version of cairo.. that's weird..
but unmet dependencies/dependency conflict resolution of linux .deb packages is not my strong side.
So, it would be nice if someone could help how to proceed with that.

--
Dr. Geo
http://drgeo.eu






--
Best regards,
Igor Stasenko.
Reply | Threaded
Open this post in threaded view
|

Re: X11 options on Ubuntu VM / Athens rendering problems

HilaireFernandes
Beside the official ones, are you using alternate repositories? It can
become a hell.

In your posting, a Thoera dependency appeared...

Hilaire

Le 28/09/2017 à 19:51, Igor Stasenko a écrit :
>
>     I got libsdl and libcairo 32bits installed fine on 64bits Ubuntu
>     17.04.
>
> weird..

--
Dr. Geo
http://drgeo.eu



Reply | Threaded
Open this post in threaded view
|

Re: X11 options on Ubuntu VM / Athens rendering problems

Igor Stasenko

On 29 September 2017 at 11:23, Hilaire <[hidden email]> wrote:
Beside the official ones, are you using alternate repositories? It can become a hell.

In your posting, a Thoera dependency appeared...


it looks like there's an error in dependency spec. 
because i have 64-bit cairo installed, and uninstalling theora drags half of the desktop stuff after itself..

oh.. looks like i found why:
sudo dpkg -i libcairo2_1.14.8-1_i386.deb 
Selecting previously unselected package libcairo2:i386.
(Reading database ... 541684 files and directories currently installed.)
Preparing to unpack libcairo2_1.14.8-1_i386.deb ...
De-configuring libcairo2:amd64 (1.15.2-0intel1) ...
Unpacking libcairo2:i386 (1.14.8-1) ...
dpkg: error processing package libcairo2:i386 (--install):
 package libcairo2:i386 1.14.8-1 cannot be configured because libcairo2:amd64 is at a different version (1.15.2-0intel1)
dpkg: error processing package libcairo2:amd64 (--install):
 package libcairo2:amd64 1.15.2-0intel1 cannot be configured because libcairo2:i386 is at a different version (1.14.8-1)
Processing triggers for libc-bin (2.24-9ubuntu2.2) ...
Errors were encountered while processing:


now where the heck i can find binary of appropriate version libcairo2:i386 1.15.2 (googling doesn't helps)
 
Hilaire

Le 28/09/2017 à 19:51, Igor Stasenko a écrit :

    I got libsdl and libcairo 32bits installed fine on 64bits Ubuntu
    17.04.

weird..

--
Dr. Geo
http://drgeo.eu




--
Best regards,
Igor Stasenko.
12