-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CosmosOS RenderSurface Developing #31
Comments
some issues on Cosmos that relate to this eg... |
32 bits color blending pic 5: Yellow polygon with alpha channel = 180, Cosmos OS, SVGAII pic 5: Yellow polygon with alpha channel = 180, Cosmos OS, SVGAII What Next ? => |
Hello @valentinbreiz, I invite you to visit here :) This may help your Aura-Operating-System. I may ask some help from you too, about how to generate SSE from IL2CPU |
Our pure C# Software renderer (PixelFarm's MiniAgg) |
Excellent work! But are you using CGS (Cosmos Graphic Subsystem) as backend to do this? |
Yes, I will contribute back. Very Simple=> I just modify your code , and add another method called 'Blit(srcX,srcY,srcW,srcH, destX,destY). I use 32 bits int[] Bitmap buffer internally :) |
The PixelFarm render everything independently from the Host platform. so It render as it run on Win7. Then I just blits the output to screen buffer |
Excellent! It was exactly how I imagined this should have been done. |
Wow great work @prepare! |
I push the code of the example above to the github in 2 repo
Solution Explorer View pic 1: I add a reference to PixelFarm.Cosmos.One project (red boxes) Test with (latest) fresh build again. This is a result. Red and yellow polygons on left upper corner on black bg, 100x100px, is blitted from PixelFarm. The blue and green rects are render with original CGS. pic 2: red and yellow polygon on left upper corner, 100x100px, is blitted from PixelFarm |
Is it fast? |
In this version. It is not fast as I think. Below gif image shows my screen recording. Render each image (800 x 600 px) frame every 10 ms => I found some flickers... (the gif format lowers that actual image quality, but you can see color blend and antialias) pic 1: some flickers between each frame I think the bottle neck may be in 'Blit' step (from internal int[] buffer to screen buffer). I need to do some investigation about how can it be done faster. (eg. how to swap screen buffer by switching screen's frame-buffer memory pointer) |
I will add FPS info (text) on-screen soon |
A software-rendering part of the PixelFarm (MiniAgg) is not slow. The following gif is on Win7 This is a reference images pic 1: software-only, MiniAgg, win7, 800 x 600px (Each frame, starts from: Vectex list => scanline => internal-32-img-buffer =>Blit to Win7 Hdc) I think Cosmos render surface should be in the same speed level ? |
Access vmware-svga framebuffernew doc => http://vmware-svga.sourceforge.net/index.html (I have a clone of old doc) vmware-svga doc =>https://github.com/prepare/vmware-svga see also: https://github.com/mesa3d/mesa/tree/master/src/gallium/drivers/svga https://cgit.freedesktop.org/xorg/driver/xf86-video-vmware/ (fork https://github.com/prepare/xf86-video-vmware) https://cgit.freedesktop.org/mesa/mesa/tree/src/gallium/drivers/svga/ |
I ask you to create a Pull Request so we can comment your modifications on the official Cosmos repository. We had already predisposed a method similar to "blit" in Canvas: https://github.com/CosmosOS/Cosmos/blob/master/source/Cosmos.System2/Graphics/Canvas.cs#103 and this from that you have to start. You will have to overwrite this method in SVGAScreen and VBEScreen (Bochs GPU not real VBE), so if SVGA has hardware acceleration for this you can optimize for it... for VBE you surely have to use some sort of "memcpy" you can try to follow what I've done for Fill (memset) to optimize it with SSE. |
@fanoI , I sent the pull request => CosmosOS/Cosmos#1005 Thank you, I'm very new to the Cosmos and SVGA. so Feel free to edit/ comment until it fit what you need. Then I will pull it back. |
IL2CPU can't compile Typography. (not about Plug missing). I will report error later. |
Any news about your work on Cosmos ? :) |
Running on Cosmos is my dream! But these next 2-3 weeks are too busy. Then I will revisit this ...
again :) |
Cool :) |
OK in some way I've worked for you too these summer holidays, I've added a very fast MemoryOperation.Copy now VBE is able to show Bitmap very fast! DrawFilledRectangle has been optimized too... |
Any update on this? |
CosmosOS Render Surface
1st thing, Thank you to all developers of the CosmosOS for their C# OS.
2nd , It would be 'another way' to help its GUI system with our 'Rendering Tech'.
AIMS :
To Bring the PixelFarm (pure C# software part) + Typography + HtmlRenderer to the CosmosOS.
I create a project that track some problems to visit it again =>here
Hello @jp2masa, @fanoI
since I'm very new to the CosmosOS,
I may ask you something that look easy to you, but please help me too.
I create an issue here since this is in early development stage.
=> so this will not interrupt your Github issue panel.
(I have to modify some parts of current PixelFarm)
This is a snapshot with bugs
This is a red polygon that is 'painted' with a MiniAggPainter (pure C# software renderer).
(a blue rect is painted with original cosmos)
pic 1: a MiniAggPainter paints a red polygon on left-upper corner, Cosmos, SVGAII
Yes with Antialias side and another side still has bug (no AA)
pic 2: Zoom in,with AA and Bugs
Compare with PixelFarm on Win7
This is a reference img.
pic 3: same code, on Win7, and zoom pic
2 pictures (pic 1 and 3) are generated with the 'same' PixelFarm code.
I will analyze the bug later.
I think it may not too long way :)
The text was updated successfully, but these errors were encountered: