Hey can you rate this theory for GUI design
An array of arrays that theoretically repesesnt a 2D grid. Each Array-Array-Int contains a color RGB for that pixel on screen. Then wipe the screen and output the color pixels of this array on screen, repeat about 10x1 second.
It could then be expanded to Array-Array-Array-Int for 3D display/3D gameing?
How does this compair to other GUI styles and what other GUI styles are there? I just thought of this my self, havent researched properly yet. And how performance taxing do you think this would be,
e.g. would have to update lots of ints to move a window = very slow?
Thanks
GUI Theory
- Love4Boobies
- Member
- Posts: 2111
- Joined: Fri Mar 07, 2008 5:36 pm
- Location: Bucharest, Romania
Re: GUI Theory
Not sure where you came up with that "Int" from. Either way, specifically settling on RGB is kind of silly; consider devices that natively use indexed colors or different color spaces such as CIE XZY. Your GUI should either have some sort of abstraction or use a broader color space.jammmie999 wrote:Each Array-Array-Int contains a color RGB for that pixel on screen.
That sounds terrible.jammmie999 wrote:Then wipe the screen and output the color pixels of this array on screen, repeat about 10x1 second.
- Why would you wipe the screen before drawing to it instead of overriding pixels?
- Where did the 10 FPS thing come from?
No, that sounds like a terrible voxel-based engine.jammmie999 wrote:It could then be expanded to Array-Array-Array-Int for 3D display/3D gameing?
I didn't bother answering the rest. I suggest that you write some applications in user space to get more familiar with the programmer mindset before you start considering studying OSes. It will help you a great deal.
"Computers in the future may weigh no more than 1.5 tons.", Popular Mechanics (1949)
[ Project UDI ]
[ Project UDI ]
-
- Member
- Posts: 68
- Joined: Thu May 28, 2009 11:46 pm
Re: GUI Theory
Aka a matrix.An array of arrays that theoretically repesesnt a 2D grid
No way, you don't want to do that. A good FPS value would be 60, not 10. And you DON'T want to write the whole screen every time, just the portion that was modified.Then wipe the screen and output the color pixels of this array on screen, repeat about 10x1 second.
For 2D, a RGB matrix is okay.It could then be expanded to Array-Array-Array-Int for 3D display/3D gameing?
For 3D it is impossible, that would take enormous amounts of space, and it is very impractical. For example, to draw a cube that's 500x500x500px in size, you would use about 500MB of memory (500 * 500 * 500 * 4, where 4 is the size of an ARGB pixel). Also, you didn't take perspective into account, the second plane would need more pixels to fill the screen. What game have you ever seen to have a 'cube' model that uses 500 MB of disk space?
Drawing 3D objects is done through polygons, not pixels.
Memory access is pretty fast, but writing to hardware is awfully slow.How does this compair to other GUI styles and what other GUI styles are there? I just thought of this my self, havent researched properly yet. And how performance taxing do you think this would be,
e.g. would have to update lots of ints to move a window = very slow?
That is why existing GUIs use double (even triple) buffering. And only draw an area if it was modified. There is a VGA tutorial which shows how to create some basic graphics: www.brackeen.com/vga
Tibi,
Currently working on the Lux Operating System
Currently working on the Lux Operating System
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: GUI Theory
That behaviour will not bring any goodwill at your address. Actually, it's one of the most frequent cause of bans here.havent researched properly yet
Have you tried any development with DirectX 7/SDL (for 2D) and DirectX8+/OpenGL (3D), because it seems quite likely that you haven't. Knowing how things work from the user side will provide insights in how to make things work from the OS side.
-
- Posts: 13
- Joined: Sun Feb 06, 2011 4:54 am
Re: GUI Theory
Thanks for the feedback, can anyone reccomend any links for further research except search engens and wiki?
Thanks again
Thanks again
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: GUI Theory
Learn to read?
DirectX 7/SDL (for 2D) and DirectX8+/OpenGL (3D)
www.brackeen.com/vga
Re: GUI Theory
I'm not sure the OP is even asking the right questions. Firstly, a GUI is a method of displaying information to a user. You are talking about rasterizing, which is a method for putting color information to a display. A gui is more like, a window + buttons, or a menu system, with a method of getting user inputs (aka, mouse, keyboard, kinect, w/e you want to use). Yes, a screen can be thought of a 2d array of pixels, however it's typically a 1D array in practice (aka, contigous memory). Please clarify the question, because from what you've written, it doesn't make a lot of sense.
Also, 3D displays typically just display 2 2D images, with the pixels offset based on the Z axis. It's how our eyes function, each eye see's a slightly different view and our brain merges the two images to get depth information.
3D tech. reproduces this by generating two vantage points (aka, you're eyes), and setting a focal point (aka, what you're looking at) and renders both images. These images get to your eye's by different methods depending on the method used.
The most common methods, anaglyphic - red/blue glasses, each lense filters out the colors from the other, allowing each eye to see it's own pictures. Bad side is colors are washed out.
There is the typical method for PC's which use active shutters, in which it opens/closes a shutter on each eye at a specific rate so each eye only see's the picture that is intended for it. Bad parts are, you lose about 1/2 brightness, and it can cause headaches for lots of people, and requires high refresh rates, extra hardware, and typically glasses are bulky and require batteries.
Third is polarized lenses. There are two sets of lense, one horizontally polarized (left/right), and another vertical (up/down). By projecting two seperate pictures, opposite poloraized, and wearing polarized glasses, each eye can only see one image. Downside is, if you tilt your head the two images get blurred (because you're no longer vertical/horizontal).
The fix was to use circularly polarized lenses, one is polarized clockwise, the other counterclockwise. This allows you to be able to view it from any angle and still see the correct image. Downsides, costs more, typically only used with projectors (since you can literally put the lenses in front of each projector). Upside is you get 100% brightness, minimize chance of headaches, glasses are much lighter and cheaper (almost throw away at your local movie theatre).
There are other technologies that are in use, like the no glasses nintendo 3ds (and the new android based 3d phone) which use a slightly different method, think of the screen as small waves, instead of flat. If you look at the screen from one direction, you see one side of the wave, if you look from the other, you see the other side. So, for small devices with a pretty established distance from viewer, they can send a specific picture to each eye.
Ok, this turned from a gui vs. rasterize explanation to an entire 3d primer, but hey
* Edit *
Added paragraphs as requested below
Also, 3D displays typically just display 2 2D images, with the pixels offset based on the Z axis. It's how our eyes function, each eye see's a slightly different view and our brain merges the two images to get depth information.
3D tech. reproduces this by generating two vantage points (aka, you're eyes), and setting a focal point (aka, what you're looking at) and renders both images. These images get to your eye's by different methods depending on the method used.
The most common methods, anaglyphic - red/blue glasses, each lense filters out the colors from the other, allowing each eye to see it's own pictures. Bad side is colors are washed out.
There is the typical method for PC's which use active shutters, in which it opens/closes a shutter on each eye at a specific rate so each eye only see's the picture that is intended for it. Bad parts are, you lose about 1/2 brightness, and it can cause headaches for lots of people, and requires high refresh rates, extra hardware, and typically glasses are bulky and require batteries.
Third is polarized lenses. There are two sets of lense, one horizontally polarized (left/right), and another vertical (up/down). By projecting two seperate pictures, opposite poloraized, and wearing polarized glasses, each eye can only see one image. Downside is, if you tilt your head the two images get blurred (because you're no longer vertical/horizontal).
The fix was to use circularly polarized lenses, one is polarized clockwise, the other counterclockwise. This allows you to be able to view it from any angle and still see the correct image. Downsides, costs more, typically only used with projectors (since you can literally put the lenses in front of each projector). Upside is you get 100% brightness, minimize chance of headaches, glasses are much lighter and cheaper (almost throw away at your local movie theatre).
There are other technologies that are in use, like the no glasses nintendo 3ds (and the new android based 3d phone) which use a slightly different method, think of the screen as small waves, instead of flat. If you look at the screen from one direction, you see one side of the wave, if you look from the other, you see the other side. So, for small devices with a pretty established distance from viewer, they can send a specific picture to each eye.
Ok, this turned from a gui vs. rasterize explanation to an entire 3d primer, but hey
* Edit *
Added paragraphs as requested below
Last edited by Ready4Dis on Thu Sep 08, 2011 8:07 am, edited 1 time in total.
- Brynet-Inc
- Member
- Posts: 2426
- Joined: Tue Oct 17, 2006 9:29 pm
- Libera.chat IRC: brynet
- Location: Canada
- Contact:
Re: GUI Theory
Paragraphs. Use them.