GUI Dev? Need Opion!

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
hauntmisery
Posts: 3
Joined: Sat Apr 29, 2006 11:00 pm

GUI Dev? Need Opion!

Post by hauntmisery »

Hello, i was thinking to myself lastnight mabey i could use direct x to code my gui for my os! But than it came up i would need direct x to work on my os and if direct xc crashed than the os would be down and have to repiar or mabey reinstall a fresh os of it! What would be the best way to code a GUI for a OS do yall think?
User avatar
Daedalus
Member
Member
Posts: 74
Joined: Sun Oct 16, 2005 11:00 pm
Location: Australia
Contact:

Re: GUI Dev? Need Opion!

Post by Daedalus »

Well you WONT be using Direct X. Thats Windows only, and quite large what with all the different drivers and such.
You'll be using either straight VGA mode (eg 320x200x8Bit) or VESA modes (which are harder, as they need a VM86 if you're coding in protected mode.)
Myth OS is awaiting a revival ...
hauntmisery
Posts: 3
Joined: Sat Apr 29, 2006 11:00 pm

Re: GUI Dev? Need Opion!

Post by hauntmisery »

hmm right.. so i need to code in VGA mode.. hmm ok.. any other tips?
User avatar
JAAman
Member
Member
Posts: 879
Joined: Wed Oct 27, 2004 11:00 pm
Location: WA

Re: GUI Dev? Need Opion!

Post by JAAman »

no, daedalus, direct X is NOT windows only -- it is a freely open specification -- anyone is free to implement it anytime they choose
User avatar
carbonBased
Member
Member
Posts: 382
Joined: Sat Nov 20, 2004 12:00 am
Location: Wellesley, Ontario, Canada
Contact:

Re: GUI Dev? Need Opion!

Post by carbonBased »

That being said... there are windows-isms in it. I'd suggest OpenGL as a better choice, if you feel the need to reimplement an existing graphics library.

Also, if you use OpenGL, you can leverage several existing open source implementations as a good base.

--Jef
hauntmisery
Posts: 3
Joined: Sat Apr 29, 2006 11:00 pm

Re: GUI Dev? Need Opion!

Post by hauntmisery »

Open_GL ok.. ill look in to it! i know what it is and all!! lol.. but ill look in to it to see if what i need! thanks!
User avatar
carbonBased
Member
Member
Posts: 382
Joined: Sat Nov 20, 2004 12:00 am
Location: Wellesley, Ontario, Canada
Contact:

Re: GUI Dev? Need Opion!

Post by carbonBased »

MesaGL (I believe that's an improper name, but you'll probably be able to find it, based on a search of that keyword) has an open source (iirc) implementation of OpenGL (1.3, I believe) entirely in software.

I would think this would make an excellent start for a GUI. It would be the fallback that all cards which would use if an explicit hardware acceleration module was not found (hardware acceleration could be added to your OS, as you develop drivers for those specific cards).

--Jeff
Da_Maestro
Member
Member
Posts: 144
Joined: Tue Oct 26, 2004 11:00 pm
Location: Australia

Re: GUI Dev? Need Opion!

Post by Da_Maestro »

If you want to write a GUI using anything other than direct hardware interraction, you should consider writing your GUI ontop of another operating system. For example, code another version of explorer.exe or something :-)
Two things are infinite: The universe and human stupidity. But I'm not quite sure about the universe.
--- Albert Einstein
azcoder
Posts: 3
Joined: Wed May 03, 2006 11:00 pm

Re: GUI Dev? Need Opion!

Post by azcoder »

Building a GUI is a great idea.....but developing something like OpenGL is much,much more complex than building a simple os kernel.

Take mesa GL - it is an open-source implementation of OpenGL. It relies on X11. X11 is a window manager and is a monster. And it still relies on decent graphics drivers to render to the screen. The graphics drivers require specific hardware knowledge - especially to capitilize on hardware acceleration. To make it extra hard NVidia and ATI keep their hardware specs closed. There are decent hardware specs for some of the older ATI and matrox chips availible using DRI.

I don't want to temper your aspirations - I agree with you, developing an OpenGL interface for simple OS would be VERY cool - But it is also VERY hard.
a-priori
Posts: 3
Joined: Wed May 10, 2006 11:00 pm

Re: GUI Dev? Need Opion!

Post by a-priori »

Okay, I'll bite. azcoder, where do you get your information?
azcoder wrote: Take mesa GL - it is an open-source implementation of OpenGL. It relies on X11. X11 is a window manager and is a monster.
First, the correct name is simply Mesa. It it not technically an implementation of OpenGL, because of the legal implications of calling it that, but instead a graphics library that is essentially compatible with the OpenGL specifications.

Second, it does not "rely" on X11, although one of its possible targets is XLib. If you would check out the source code, you would see that it can render to one of several targets, including but not limited to Direct3D (i.e, the graphics component of DirectX), DRI (Direct Rendering Infrastructure -- i.e, hardware acceleration on Linux), FBDev, Windows (i.e, using the Win32 API), and, most interestingly to us, SVGA. I got this information from the web-based CVS for Mesa at http://webcvs.freedesktop.org/mesa/Mesa ... a/drivers/.

The reason SVGA is so interesting is that it writes directly to video memory. This driver could be easily modified to use a VESA linear framebuffer. With a reasonably complete kernel, or user-mode libc if you are doing a microkernel, Mesa could be integrated into an operating system as a graphics layer.
azcoder wrote: And it still relies on decent graphics drivers to render to the screen. The graphics drivers require specific hardware knowledge - especially to capitilize on hardware acceleration. To make it extra hard NVidia and ATI keep their hardware specs closed. There are decent hardware specs for some of the older ATI and matrox chips availible using DRI.
Yes, but if and only if you are doing hardware acceleration, which the OpenGL specification does not demand.
azcoder wrote: I don't want to temper your aspirations - I agree with you, developing an OpenGL interface for simple OS would be VERY cool - But it is also VERY hard.
Very cool, and not very hard. I'm actually investigating Mesa right now as a basis for my OS's GUI, whenever I get to that. Your post indicates a significant misunderstanding of OpenGL, Mesa, how they are related, and how they are related to the operating system they run in.
Post Reply