Cosmos
Cosmos copied to clipboard
[CGS] New Features
This a list of my ideas of what is yet needed to complete CGS:
- [x] CGS should work in VmWare too
- [ ] Add to the Bochs driver the support for 4, 8, 16 and 24 bit color depths
- [x] Add to the Canvas abstract Class methods to draw more shapes for example DrawFilledRectangle(), DrawSquare() and so on
- [x] Add a method to draw an image on CGS for example DrawImage()
- [x] Add a method to draw a string on CGS
- [x] Double buffering (unsure if this must be done better in the Window Manager)
- [x] How to return to text mode (and is this really needed?)
If you have other ideas for now features please let me know in this issue.
return to text mode (is this really needed?)
Sure. Will not be superfluous~
Yes I tough this too but guys on OsDev made me think: one time that you have graphic mode working why returning to text mode? To show the Console? But the Console could be done better using GUI:
- You don't have the problem of hardcoded fonts (you can use true type fonts)
- You don't have the problem of codepages but you can use unicode directly
- You can show graphic elements directly (for example a PictureViewer application can show the image in the "Console" directly)
- You can have more than 16 colors for the text itself (but here the C# Console methods are limiting us)
- Easier to do bold, italic and so on...
If you run Linux and look well during the boot phase what happens after the boot loader give the control to Linux? Ever you noticed that the fonts changes? Linux "text mode" itself is NOT text mode :-)
You might want to return to text mode to save RAM and CPU and just have the GUI running then the user needs it.
Also I don't think "DrawSquare" would be useful as all a square is is a rectangle with all sides an equal length.
You could just do DrawRectangle(4,4,4,4) to draw a square at (4,4) with a size of (4x4) pixels, for example.
On Thu, Apr 6, 2017 at 11:32 PM, zarlo [email protected] wrote:
You might want to return to text mode to save RAM and CPU and just have the GUI running then the user needs it.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/CosmosOS/Cosmos/issues/601#issuecomment-292420352, or mute the thread https://github.com/notifications/unsubscribe-auth/ARf_UHMwK3LAK1Jhe-xtP0O8l-lVNQ_oks5rta5RgaJpZM4MajQ- .
Yes DrawSquare() would be only an utility method and obviously would call DrawRectangle()!
@zarlo I don't think that with modern PC being in GUI mode occupies so much CPU / RAM in particular if to emulate text mode you will use 640 x 480 @ 16 (or 256) colors.
I'd like to have a shell capable of doing this: http://www.mono-project.com/archived/images/7/75/GSharpPlot.png
or this: http://tirania.org/tmp/xpoyxg.png
if you have new features to propose let me know :+1:
Thank you!
Cosmos has an incredibly small memory footprint anyway, so saving RAM by switching to text mode isn't really applicable but if and when someone has got a Cosmos operating system running as a headless server, then switching back to a text mode would be good. I sometimes prefer text mode shells than all the fancy GUI stuff IMO :D
From what I've seen, I think X Window System does the double buffering instead of the specific window managers, but of course that's just a Linux example, and we're not Linux xD simple double buffering could be done at a driver level and then the advanced stuff like compositing could be left to the window managers. Depends on how each user wants to use graphical stuff :)
Would CGS be faster on VMWare than Bochs because its not full virtualisation or does it really make much of a difference :3 shouldn't be too hard getting it to work 'cause of the already existing driver. I'll take a look-see at it and see what I could do :)
I think X Window System is the example to take on how thing should not be done! I'd like the idea to have a "text" shell that at the when needed / wanted could show graphic elements, doing the shell in graphic mode will simplify the handling of unicode characters too.
Where to do double buffering (if should be done by the driver, by CGS or by the Widget Toolkit) it is one of my great doubts but I have to admit that GUI is not my field: I'm more a low level guy :-)
Regarding VmWare driver yes I think could be more fast it has methods "in hardware" to Clear the screen, draw rectangles and so on all things that in Bochs needed to be done in "software". If you need help to adapt VmWare driver to CGS ask me, this is the tracking issue for your convenience: https://github.com/CosmosOS/Cosmos/issues/602
I don't think double buffering should be done by the driver as that would be a lot more code, if its done in CGS then every one will have it out of the box and if its done by the Widget Toolkit a lot of new programmers will not do it as they may not know about it or know how to do it.
I think it should be done in CGS
Hmm... 32 bit color depth's is not possible?
Yes actually is the only color depth supported :-)
I might be able to work on a simple bmp image reader/displayer. (Starting with the simple 4-bit and 8-bit bit depths)
Everyone here is a contributor 😃
Yes @Project-Magenta anyone is a contributor here and I think this is great :-)
Regarding DrawImage() this a "mother" issue: https://github.com/CosmosOS/Cosmos/issues/606
I think double-buffering is a good idea. Canvas could have a method like myCanvas.DrawBuffer ();