Page 1 of 1

GUI Dev? Need Opion!

Posted: Sat Apr 29, 2006 11:00 pm
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?

Re: GUI Dev? Need Opion!

Posted: Sun Apr 30, 2006 11:00 pm
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.)

Re: GUI Dev? Need Opion!

Posted: Sun Apr 30, 2006 11:00 pm
by hauntmisery
hmm right.. so i need to code in VGA mode.. hmm ok.. any other tips?

Re: GUI Dev? Need Opion!

Posted: Mon May 01, 2006 11:00 pm
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

Re: GUI Dev? Need Opion!

Posted: Mon May 01, 2006 11:00 pm
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

Re: GUI Dev? Need Opion!

Posted: Mon May 01, 2006 11:00 pm
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!

Re: GUI Dev? Need Opion!

Posted: Mon May 01, 2006 11:00 pm
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

Re: GUI Dev? Need Opion!

Posted: Tue May 02, 2006 11:00 pm
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 :-)

Re: GUI Dev? Need Opion!

Posted: Wed May 03, 2006 11:00 pm
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.

Re: GUI Dev? Need Opion!

Posted: Wed May 10, 2006 11:00 pm
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.