POV-Ray : Newsgroups : povray.unix : X Windows display: disabled Server Time
15 May 2024 07:48:58 EDT (-0400)
  X Windows display: disabled (Message 14 to 23 of 48)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: jr
Subject: Re: X Windows display: disabled
Date: 2 Oct 2018 18:10:01
Message: <web.5bb3ec1b6c2a6a24b0d4fc1e0@news.povray.org>
hi,

dick balaska <dic### [at] buckosoftcom> wrote:
> On 10/02/2018 02:27 PM, jr wrote:
> > all I see is a (big) library aimed at games
> > developers, none of its provisions used, except for the creation of a single
> > window.  </rant>
>
> We could make povray beep and shake the mouse when it's done.

yes!  lol.


regards, jr.


Post a reply to this message

From: jr
Subject: Re: X Windows display: disabled
Date: 2 Oct 2018 18:20:01
Message: <web.5bb3ee266c2a6a24b0d4fc1e0@news.povray.org>
hi,

Le_Forgeron <jgr### [at] freefr> wrote:
> Le 02/10/2018 à 20:27, jr a écrit :
> > [*] why can that (Xlib) code not simply be ported?
> Because handling at Xlib level means dealing with every possible
> colour-depth and colour-system, nearly by hand.
> ...
> You can handle the X11 you have on your system, but for a distribution,
> it is painful to support all of them.

thanks for the background.

fwiw, I've downloaded/installed SDL2 (gone are the man pages.  </sigh>), so
if/when the "not a 5 minute" conversion job is done I'd be happy to test.

to make this (command-line option to embed POV-Ray in given window) an official
feature request, what need I do?


regards, jr.


Post a reply to this message

From: Le Forgeron
Subject: Re: X Windows display: disabled
Date: 3 Oct 2018 00:56:18
Message: <5bb44bf2$1@news.povray.org>
Le 03/10/2018 à 00:16, jr a écrit :

> to make this (command-line option to embed POV-Ray in given window) an official
> feature request, what need I do?
> 
> 
You could open an issue on github official povray page, with a
meaningful and short title and a good description.



> regards, jr.
> 
>


Post a reply to this message

From: William F Pokorny
Subject: Re: X Windows display: disabled
Date: 3 Oct 2018 14:19:59
Message: <5bb5084f$1@news.povray.org>
On 10/02/2018 11:53 AM, Le_Forgeron wrote:
> Le 02/10/2018 à 13:11, Le Forgeron a écrit :
>> Le 01/10/2018 à 20:29, jr a écrit :
>>> hi,
>>>
>>> clipka <ano### [at] anonymousorg> wrote:
>>>> Am 01.10.2018 um 18:36 schrieb jr:
>>>>> I think POV-Ray does not "do" X at all, the last version (I have
>>>>> access to)
>>>>> which does is 3.6.1.  from 3.7.x it uses the SDL instead.  a real
>>>>> pity because
>>>>> if POV-Ray output to an actual X window, knocking up front-ends a la
>>>>> 'qtpovray'
>>>>> would be  doable in a(ny) number of (scripting) languages, with a
>>>>> single
>>>>> supporting command line switch (cf 'xterm -into $id').
>>>>> (also, why SDL in the first place?  all the joystick and audio etc
>>>>> facilities,
>>>>> unused.  yet, no preview without)
>>>>
>>>> I'm pretty sure it was primarily a matter of maintainability. And with
>>>> SDL being able to drive Xlib, my naive assumption as a Windows jockey is
>>>> that it /should/ still work.
>>>
>>> I did have a look at the API (some time ago, not long after installing
>>> 3.7), as
>>> I recall there is no way of telling SDL to use a given window (id).
>>>
>>
>> what about SDL_CreateWindowFrom() ? (just googling libsdl)
>>
>> The main issue with SDL so far in povray is the lack of title for the
>> render window.
>>
>> I need to investigate SDL_SetWindowTitle()
>>
>> https://wiki.libsdl.org/SDL_SetWindowTitle
>>
>>
> 
> Ok, SDL2 has a migration guide and it will not be a five minutes patch
> for Povray.
> 
> https://wiki.libsdl.org/MigrationGuide?highlight=%28SDL_WM_SetCaption%29
> 
> Most calls made in Povray have been updated to new functions, so there
> might be a bit of change in logic too, and a
needhttps://github.com/POV-Ray/povray/issues/345 for detecting libsdl2
> along with libsdl1.2 (none, either or both might be present)
> 

Just a note another user already has a branch of POV-Ray running with 
SDL2. See the closed issue:

https://github.com/POV-Ray/povray/issues/345

and specifically the comments at the bottom for some details.


-------- Additional rambling
Prior to learning of the above implementation, I tried to get an SDL2 
option, still with SDL1.2 still as the default, compiling and running 
but failed. I wasn't going for a straight map though, but rather an 
update to newer functions both due the migration recommendations and 
also was trying to push today's *nix image window scaling completely 
into SDL2. To advertising anyway - such SDL2 scaling can be done so as 
to use available GPUs on a system over the CPU.

I also had in mind some beeping and stuff(1)... :-)

Aside: For a quick idea of the underlying complexity SDL1.2/2 today 
handles, issue the command:

sdl2-config --static-libs

Related: The POV-Ray static linking with SDL2 is something I could not 
get working (Ubuntu 16.04) because a few of the software package owners 
of SDL2 dependencies have decided providing static libraries is bad for 
security (truth there, but...). There are options to statically link 
what you can and dynamically the rest - but I couldn't get that working 
quickly either.

Bill P.

(1) - Mouse, pad or keyboard input to POV-Ray configured so as to run in 
an interactive loop isn't all that crazy an idea as a way to enable 
simple modeling capabilities that would be as portable as is 
POV-Ray/SDL2.


Post a reply to this message

From: Le Forgeron
Subject: Re: X Windows display: disabled
Date: 4 Oct 2018 13:11:15
Message: <5bb649b3$1@news.povray.org>
Le 03/10/2018 à 20:19, William F Pokorny a écrit :

> 
> Just a note another user already has a branch of POV-Ray running with
> SDL2. See the closed issue:
> 
> https://github.com/POV-Ray/povray/issues/345
> 
> and specifically the comments at the bottom for some details.
> 
> 

Thanks, I was able to find a branch with the SDL2 calls, and even
compiled, but there must be some black magic in running SDL2 because I'm
unable to get a window to show when doing "make check"


Post a reply to this message

From: William F Pokorny
Subject: Re: X Windows display: disabled
Date: 5 Oct 2018 08:11:21
Message: <5bb754e9$1@news.povray.org>
On 10/04/2018 01:11 PM, Le_Forgeron wrote:
> Le 03/10/2018 à 20:19, William F Pokorny a écrit :
> 
>>
>> Just a note another user already has a branch of POV-Ray running with
>> SDL2. See the closed issue:
>>
>> https://github.com/POV-Ray/povray/issues/345
>>
>> and specifically the comments at the bottom for some details.
>>
>>
> 
> Thanks, I was able to find a branch with the SDL2 calls, and even
> compiled, but there must be some black magic in running SDL2 because I'm
> unable to get a window to show when doing "make check"
>

Ah, it's never easy as I learn every time I think it will be... :-)

I'd not before tried a compile myself. Doing that just now I'm seeing 
the same thing with the lpub3d-raytracer-cui. Even running other scene 
files against the built code explicitly. Ubuntu 18.04.

Hmm, a shot in the dark but let me try clang. No go.

Unsure what the black magic might be and no time to dig at the moment. I 
don't think email via github works these days. I'll post a quick comment 
to the closed issue about getting the SDL2 window to work.

Bill P.


Post a reply to this message

From: Le Forgeron
Subject: Re: X Windows display: disabled
Date: 5 Oct 2018 10:28:31
Message: <5bb7750f$1@news.povray.org>
Le 05/10/2018 à 14:11, William F Pokorny a écrit :
> On 10/04/2018 01:11 PM, Le_Forgeron wrote:
>> Le 03/10/2018 à 20:19, William F Pokorny a écrit :
>>
>>>
>>> Just a note another user already has a branch of POV-Ray running with
>>> SDL2. See the closed issue:
>>>
>>> https://github.com/POV-Ray/povray/issues/345
>>>
>>> and specifically the comments at the bottom for some details.
>>>
>>>
>>
>> Thanks, I was able to find a branch with the SDL2 calls, and even
>> compiled, but there must be some black magic in running SDL2 because I'm
>> unable to get a window to show when doing "make check"
>>
> 
> Ah, it's never easy as I learn every time I think it will be... :-)
> 
> I'd not before tried a compile myself. Doing that just now I'm seeing 
> the same thing with the lpub3d-raytracer-cui. Even running other scene 
> files against the built code explicitly. Ubuntu 18.04.
> 
> Hmm, a shot in the dark but let me try clang. No go.
> 
> Unsure what the black magic might be and no time to dig at the moment. I 
> don't think email via github works these days. I'll post a quick comment 
> to the closed issue about getting the SDL2 window to work.
> 

Relax, last night (after midnight) was a bit of good, I should have a 
working prototype with SDL2 soon (I got the window to show, and even to 
update, but I had to resort to tutorial for that, and the original logic 
of the code seems at large)

I also had a look at X11 code of 3.1 and it seems the SDL code (1.2 & 2) 
get a lot of inherited complexity from the old render pattern (3.1: one 
pixel at a time, on the same line, then next line): for instance the 
"optimisation" of rectangle to update is totally wrong now (rectangle is 
never reset, so the whole picture is updated every block, but it is even 
more complex, If I get it correctly, the update of pixels is done by a 
thread and the update of the window is done by another thread (good: the 
update of the window can be slow, so better do it in the front end thread).

It was nice to see the title bar with the "paused" text when rendering 
"make check".

On the sad news, I tried animation and it crashed (but there is comment 
already in official sdl 1.2 disp_sdl.cpp about that kind).


Post a reply to this message

From: clipka
Subject: Re: X Windows display: disabled
Date: 5 Oct 2018 14:43:02
Message: <5bb7b0b6$1@news.povray.org>
Am 02.10.2018 um 20:27 schrieb jr:

> frankly, I'm not convinced it's worth the dependency.  previous versions had a
> "proper" X window[*], and I do not understand how abandoning that made
> "maintainability" easier.  all I see is a (big) library aimed at games
> developers, none of its provisions used, except for the creation of a single
> window.  </rant>
> 
> 
> [*] why can that (Xlib) code not simply be ported?

I'm not an expert on this - neither do I have experience in working with
Xlib or SDL, nor do I know the historic background - but I assume it's
as simple as this:

(1) The code interfacing with Xlib was difficult to maintain.

(2) Something cropped up that made maintenance virtually inevitable.


My bet for (2) is on the transition from the single-threaded POV-Ray
v3.6 to the multi-threaded POV-Ray v3.7, either directly or via the
architectural changes required.

An alternative candidate reason would be a newly discovered severe bug
or limitation; or an existing moderately severe bug or limitation that
had been deemed impossible to fix with Xlib, but had been accepted due
to a lack of alternative before the advent of SDL.


Post a reply to this message

From: William F Pokorny
Subject: Re: X Windows display: disabled
Date: 6 Oct 2018 06:04:59
Message: <5bb888cb$1@news.povray.org>
On 10/05/2018 10:28 AM, Le Forgeron wrote:
> Le 05/10/2018 à 14:11, William F Pokorny a écrit :
>> On 10/04/2018 01:11 PM, Le_Forgeron wrote:
>>> Le 03/10/2018 à 20:19, William F Pokorny a écrit :
>>>
....
>>
>> Unsure what the black magic might be and no time to dig at the moment. 
>> I don't think email via github works these days. I'll post a quick 
>> comment to the closed issue about getting the SDL2 window to work.
>>
> 
> Relax, last night (after midnight) was a bit of good, I should have a 
> working prototype with SDL2 soon (I got the window to show, and even to 
> update, but I had to resort to tutorial for that, and the original logic 
> of the code seems at large)
> 
> I also had a look at X11 code of 3.1 and it seems the SDL code (1.2 & 2) 
> get a lot of inherited complexity from the old render pattern (3.1: one 
> pixel at a time, on the same line, then next line): for instance the 
> "optimisation" of rectangle to update is totally wrong now (rectangle is 
> never reset, so the whole picture is updated every block, but it is even 
> more complex, If I get it correctly, the update of pixels is done by a 
> thread and the update of the window is done by another thread (good: the 
> update of the window can be slow, so better do it in the front end thread).
> 
> It was nice to see the title bar with the "paused" text when rendering 
> "make check".
> 
> On the sad news, I tried animation and it crashed (but there is comment 
> already in official sdl 1.2 disp_sdl.cpp about that kind).

Glad to hear you are making progress.

---
We have too this lockup issue I stumbled across while looking at an 
earlier one:

https://github.com/POV-Ray/povray/issues/142

Not SDL1.2/2 really I guess, but suppose related some to pausing and how 
the code is set up. Looks like I should have posted a follow up to that 
issue in that I didn't have success in creating version of code that 
locked up more routinely. I put my effort to fix it on the shelf for 
later.

So many of my grand POV-Ray ideas fall to the reality I'm still lousy at 
C++, autotools, et al - even after significant study. :-( Ten year rule 
to really get good at anything I guess. Good news is I have only 7 or 8 
years to go...

Sadly, I'm now too old for this route to quick C++ proficiency:

https://abstrusegoose.com/249

Bill P.


Post a reply to this message

From: Le Forgeron
Subject: Re: X Windows display: disabled
Date: 6 Oct 2018 13:39:05
Message: <5bb8f339$1@news.povray.org>
Le 06/10/2018 à 12:04, William F Pokorny a écrit :

> Glad to hear you are making progress.
> 

And at the current state, I learn that libsdl (1.2 and 2) is not thread
friendly, it wants (nah, requires) that the thread that make the display
and pull event to be the MAIN thread (and not another child, even if
alone to make the calls)...

But it's working with libsdl2. As a kludge so far.


> ---
> We have too this lockup issue I stumbled across while looking at an
> earlier one:
> 
> https://github.com/POV-Ray/povray/issues/142
> 
> Not SDL1.2/2 really I guess, but suppose related some to pausing and how
> the code is set up. Looks like I should have posted a follow up to that
> issue in that I didn't have success in creating version of code that
> locked up more routinely. I put my effort to fix it on the shelf for later.

Well hidden in libsdl2 forum, the constraint on thread for video and
event (the internal pump is only run by main thread, no pump, no event
to get out).

> 
> So many of my grand POV-Ray ideas fall to the reality I'm still lousy at
> C++, autotools, et al - even after significant study. :-( Ten year rule
> to really get good at anything I guess. Good news is I have only 7 or 8
> years to go...

People spend 3 years in school and think they can program... until they
find a real job and it shows them they do not know yet how to program.

> 
> Sadly, I'm now too old for this route to quick C++ proficiency:
> 
> https://abstrusegoose.com/249

Which C++ ? 03, 11, 14, 17 and I believe 20 is already on the road.

> 
> Bill P.


Post a reply to this message

<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.