Author Topic: OxyScheme (Scheme Interpreter in O2)  (Read 21788 times)

0 Members and 3 Guests are viewing this topic.

JRS

  • Guest
Re: OxyScheme (Scheme Interpreter in O2)
« Reply #30 on: January 08, 2015, 12:57:32 PM »
Quote from: Mike
P.S. And by the way, can you provide any feedback on the subject matter of my graphical "console" proposition? Even if MS Windows is not your preferred environment.

I would love to but ...
  • I'm putting my (free time) efforts at the moment towards the BASM Windows & Linux versions.
  • I'm involved with a major effort getting my business going on the right foot for 2015.
  • I have been neglecting SB and and its long overdue  2.2 release.
  • My daughter's care team ended up being abusers and she got tossed into a group home for Christmas. (How I spent my holiday)

Other than the above, I do try to visit the O2 forum and maybe post something if I have time.

Charles Pegge

  • Guest
Re: OxyScheme (Scheme Interpreter in O2)
« Reply #31 on: January 08, 2015, 01:17:50 PM »
Thanks Mike,

Your previous interpretation is what I had in mind.

I have found that it is possible to run Opengl in at least 2 child windows. The trick is to use a single rendering context (hRC) and then for each child window, select the device context  (wglMakeCurrent hDC, hRC ), render it, and SwapBuffers. This may not work for all video cards, but certainly for NVidia.

There are 2 rather old examples in examples/OpenGl/other/
OpenGlChildWins1.o2bas
OpenGlChildWins2.o2bas


Mike Lobanovsky

  • Guest
Re: OxyScheme (Scheme Interpreter in O2)
« Reply #32 on: January 08, 2015, 01:25:34 PM »
I'm really sorry to hear all that, John, and especially about that misfortunate incident with your daughter. Let me still wish you luck and prosperity in your business matters, and all the best to your small family in the New Year 2015. We must always hope for the better and never lose heart before the obstacles. I can hardly be of any more help to both of you than just some verbal support like that but I promise to keep my fingers crossed for my wishes to come true.

Mike Lobanovsky

  • Guest
Re: OxyScheme (Scheme Interpreter in O2)
« Reply #33 on: January 08, 2015, 01:46:44 PM »
I have found that it is possible to run Opengl in at least 2 child windows. The trick is to use a single rendering context (hRC) and then for each child window, select the device context  (wglMakeCurrent hDC, hRC ), render it, and SwapBuffers. This may not work for all video cards, but certainly for NVidia.

Yes Charles,

I'm aware of this technique but thanks anyway for pointing it out once again. Splitting the render frame period between two contexts and especially allowing two or more SwapBuffer() calls can be unbearable for OpenGL if at least one render is heavily populated with objects. In any case, relying on this technique as the basis for one's project means going far beyond the borderline set forth in the OpenGL Specs. It may set up a physical limit to how complex an OpenGL task may be for an off-"console" render target and of course there will always be a slim chance that some proprietary video driver other than nVidia will not support that just because that's not required in, or is directly discouraged by, the Specs.

Talking about general feasibility of a graphics console emulation, I'm still in favor of GDI/GDI+ solutions to have my hands absolutely free and allow OpenGL tasks of any complexity on the user side of OxyScheme's programming environment.

Charles Pegge

  • Guest
Re: OxyScheme (Scheme Interpreter in O2)
« Reply #34 on: January 09, 2015, 12:36:04 PM »
Hi Mike,

I have not yet found a need to use multiple Opengl windows, but the potential restriction seems a little strange when multiple processes, using Opengl, operate without mutual hindrance.

Anyway, I look forward to seeing your crystal console :)


Mike Lobanovsky

  • Guest
Re: OxyScheme (Scheme Interpreter in O2)
« Reply #35 on: January 11, 2015, 01:53:14 PM »
Thanks for encouragement, Charles! :)

Scared as I am to proceed with the printing engine proper (reimplementing the genuine console's screen buffer is supposed to be one hell of a job), here are a few more bells and whistles for the window.

Just found a cheap down-/upsampling trick that yields some nice visual effects without the elaborate per-pixel stack blur algo. Also button and menu controls implemented (ugly coompared to Patrice's art but will do for the moment).

The tiles are actually down-/upsampled images of the icons beneath the window on my right-side monitor. Reflection works only on the main (central) monitor that's why it isn't seen even though enabled.

.

Mike Lobanovsky

  • Guest
Re: OxyScheme (Scheme Interpreter in O2)
« Reply #36 on: January 13, 2015, 11:10:36 AM »
Hi all,

I'm done with bells and whistles. Now I would like to know very much if restored and maximized windows can be dragged smoothly enough on your screens. On my PC, unblurred maximized windows and blurred restored windows slide absolutely smoothly without any visible lag of image within the window. Blurred maximized windows do lag a little bit but no more than a large MDI window would, such as e.g. a Code::Blocks or MS Studio IDE. So I think that's about it as far as prettifying the "console" goes.

Note that blur is still disabled automatically in genuine Aero modes but I think I've found a way to make it compatible. However a little more experimentation will be needed to (dis)prove it.

Please let me know what you see on your screens.

Thanks!

.

Aurel

  • Guest
Re: OxyScheme (Scheme Interpreter in O2)
« Reply #37 on: January 13, 2015, 02:32:32 PM »
Hi Mike
it work fine on my old comp but little bit slow, i mean there is a delay in moving window
and again i cannot get screen capture with my image viewer...

Mike Lobanovsky

  • Guest
Re: OxyScheme (Scheme Interpreter in O2)
« Reply #38 on: January 13, 2015, 09:41:15 PM »
Hi Aurel,

Thanks for your feedback. When focus is on this window, use Alt + PrtScr to capture its image into the clipboard, and then Ctrl + V or Shift + Ins to insert it into MS Paint or any other image viewer or editor. It is a layered window and perhaps your viewer just isn't designed to capture them.

Do you mean there is a delay in moving the window even when it's small? Is it still slow even when blur amount is zero (when the blur button is in its leftmost position)?

Charles Pegge

  • Guest
Re: OxyScheme (Scheme Interpreter in O2)
« Reply #39 on: January 14, 2015, 04:08:49 AM »
Hi Mike,

The expanded window, with its default settings, can be moved around the screen with about 5 -7 refreshes per second, which seems perfectly acceptable to me.

(system : 2 gig quad-core  Vista 64, XP mode)

Charles

Mike Lobanovsky

  • Guest
Re: OxyScheme (Scheme Interpreter in O2)
« Reply #40 on: January 14, 2015, 05:33:03 AM »
Hi Charles,

Thanks, that's good news. I've checked it on a 2.2GHz Core2 Duo and found out that unblurred windows, both expanded and smaller ones, move smoothly like ordinary layered windows should. Same for smaller blurred windows where there's practically no tear. Expanded blurred ones do show some bearable tear. I'll add an option to pin the expanded windows to the screen top left/right corners to discourage dragging them around on slower computers.

I could've also made the window resizable by its borders/corners but the visual effect isn't very nice, so I subsided to just two fixed sizes for the moment. In future, I can also add per-line resizing by the lower border like in the original console. But that will be done later when the time to design text scrolling comes and the client area metric parameters are worked out.

Tomorrow I'm starting to move to a new residence, which is going to take some time. I'll be keeping an eye on the forum but I won't be fully functional until after this weekend.

Charles Pegge

  • Guest
Re: OxyScheme (Scheme Interpreter in O2)
« Reply #41 on: January 14, 2015, 09:29:25 AM »
Good luck with your move!



Aurel

  • Guest
Re: OxyScheme (Scheme Interpreter in O2)
« Reply #42 on: January 14, 2015, 11:07:17 AM »
Yes Mike when is blur on minimum then there is no delay ..interesting..
oh man i never liked this openGL stuff ::)

Mike Lobanovsky

  • Guest
Re: OxyScheme (Scheme Interpreter in O2)
« Reply #43 on: January 14, 2015, 12:08:01 PM »
Aurel, this is not OpenGL, this is entirely GDI+ stuff. Good quality blur is a very computationally intensive task even for modern fast CPUs. It would probably be more reasonable to have it disabled (set to 0) on slower PCs. A crystal-clear/colored layered window also seems to be looking quite nice without blur.

Mike Lobanovsky

  • Guest
Re: OxyScheme (Scheme Interpreter in O2)
« Reply #44 on: January 14, 2015, 12:26:19 PM »
Thanks, Charles!

There are no mountains, nor horses, nor sledges, nor even snow here at the moment. :)

After living for over 6 years in the city of Brest that's situated on the Belarusian-Polish border, I'm finally moving back to Minsk, the country's capital 300 miles farther into the continent, where I'd used to reside for over 35 years before I came to Brest.

The red arrow in the picture below shows the apartment house I'm going to live in, and this link will show you how beautiful my home town really is. :)

.