Page 1 of 1

A simple "plug-in" OpenGL for your OS

Posted: Thu Aug 23, 2012 4:07 pm
by mariuszp
I came up with an idea to create an OpenGL implementation that can be easily plugged into any environment. Therefore, you could use it in your OS, in kernel or in user mode (I've seen some OSes where everything was inside the kernel).

The only thing you would have to do is inform it about changes in screen width, screen height, etc. It will also have optional support for hardware drivers, which would be source-compatible across platforms, and if your OS is capable, it can load those drivers.

My question is, would you actually be interested in such a thing?

P.S. it would be called "MaddGL", after Madd, which is my game-dev team.
Also, if anyone is interested, I will appreciate any suggestions.

Re: A simple "plug-in" OpenGL for your OS

Posted: Thu Aug 23, 2012 4:08 pm
by JamesM
My question is, would you actually be interested in such a thing?
Yes.
P.S. it would be called "MaddGL"
Ugh...

Re: A simple "plug-in" OpenGL for your OS

Posted: Thu Aug 23, 2012 4:10 pm
by mariuszp
OK, naming maybe is the last problem to be solved, but that doesn't matter, as long as the system will work, right?

Re: A simple "plug-in" OpenGL for your OS

Posted: Thu Aug 23, 2012 5:01 pm
by Brynet-Inc
The Mesa project has been working on this for nearly 20 years now. It's been ported to a wide variety of platforms.

Re: A simple "plug-in" OpenGL for your OS

Posted: Thu Aug 23, 2012 5:10 pm
by mariuszp
Brynet-Inc wrote:The Mesa project has been working on this for nearly 20 years now. It's been ported to a wide variety of platforms.
As I said before, the point of MaddGL is that you could simply plug it into anything, even kernel mode. It uses no system libraries. I am building it specifically for hobby OSes. My game-dev team, Madd, has reasons for wanting relatively successful hobby OSes to develop further.

So basically, you need barely anything to run MaddGL.

Re: A simple "plug-in" OpenGL for your OS

Posted: Thu Aug 23, 2012 5:16 pm
by gerryg400
I'm interested, but I was thinking of using Mesa ?

[oops] Brynet-Inc beat me to it.

Re: A simple "plug-in" OpenGL for your OS

Posted: Thu Aug 23, 2012 5:20 pm
by mariuszp
OK, so how about a challenge for me, to test the capabilities of MaddGL?

I will make a super-tiny "OS" which:

1) will boot up using GRUB
2) will implement simple placement allocation
3) will have a BGA (Bochs Grpahics Adaptor) driver, and will switch into a graphics mode

And with this and nothing else, I'll port MaddGL to it.

Re: A simple "plug-in" OpenGL for your OS

Posted: Thu Aug 23, 2012 5:35 pm
by gerryg400
Why not create a Mesa driver for the Bochs Graphics Adaptor ? Or bare VBE ? It seems to make more sense.

(The reason may be "because I want to write my own OpenGL implementation". If that's the reason then of course it's okay.)

Re: A simple "plug-in" OpenGL for your OS

Posted: Thu Aug 23, 2012 5:39 pm
by gravaera
Yo:

@OP: Good luck, I hope this venture turns out to be as fruitful as you expect it to be :)

--Peace out
gravaera

Re: A simple "plug-in" OpenGL for your OS

Posted: Thu Aug 23, 2012 6:11 pm
by Brynet-Inc
mariuszp wrote:
Brynet-Inc wrote:The Mesa project has been working on this for nearly 20 years now. It's been ported to a wide variety of platforms.
So basically, you need barely anything to run MaddGL.
Mesa's written in C/C++ and has relatively few runtime dependencies.

Re: A simple "plug-in" OpenGL for your OS

Posted: Wed Sep 19, 2012 7:15 pm
by cb88
porting to bochs or vbe doesn't make much sense... since well it isn't accelerated.

Also.. it used to be possible to write a 3d driver fairly simply considering BeOS had reverse engineered Nvidia 3d support however.. its alot more complex now :/ so I would have to say writing something of a wrapper around Mesa to make it more porter friendly ... your goals aren't much different and the only real problem would be that mesa is mostly bolted onto Linux.

tinygl already exists for people that want a quick simple opengl like api.... its not very complete (MorhphOS fleshed it out alot with some hardware acceleration but I don't think they released source for thier work)

So though i don't agree with your plans .. it is an EXCELLENT initiative. If you do go ahead with your plans I hope you go far :D

Re: A simple "plug-in" OpenGL for your OS

Posted: Wed Sep 19, 2012 11:24 pm
by Combuster
cb88 wrote:porting to bochs or vbe doesn't make much sense... since well it isn't accelerated.
You're lagging behind :wink:
Volker Ruppert, on the bochs mailing list wrote:In Bochs SVN I have applied initial version of the 3dfx Voodoo Graphics
emulation. The Voodoo core is based on a patch originally designed for
DOSBox. Currently only the Voodoo1 adapter model can be emulated. The
emulation is currently slow, but we intend to clean up and optimize the
code. Running the 3D engine in a separate thread is also planned. To
compile with Voodoo support the configure option "--enable-voodoo" must
be used. Then the device can be activated with "plugin_ctrl: voodoo=1"
in bochsrc or on the command line. The device will be assigned
automatically to a PCI slot unless you do that manually. A specific
bochsrc option to select the adapter model will be added when the code
has support for it.

Testers and 3D programming experts are welcome to help us improving and
extending the Voodoo emulation.

Re: A simple "plug-in" OpenGL for your OS

Posted: Thu Sep 20, 2012 10:29 am
by cb88
clearly O.o thats actually rather impressive.

that said... voodoo isn't much useful beyond eduactional purposes so you'd still want to target newer more complex cards even if you started out on voodoo.