Page 1 of 1
OpenGL, Mesa3D and stuff
Posted: Mon Nov 22, 2010 7:39 am
by Mrk
I tried to look for this in the forum and the web out of the forum, but failed to find any thing useful. I want to use openGL in my OS, and as I understand it is possible, but I can't find how do I apply th openGL API in my OS.
If I have mesa's source for example, can I just compile it, move to the memory and use it from my kernel, or do I have to adjust it first?
And also,do I have to enter protected mode for this?
Re: OpenGL, Mesa3D and stuff
Posted: Mon Nov 22, 2010 8:50 am
by JamesM
Mrk wrote:I tried to look for this in the forum and the web out of the forum, but failed to find any thing useful. I want to use openGL in my OS, and as I understand it is possible, but I can't find how do I apply th openGL API in my OS.
If I have mesa's source for example, can I just compile it, move to the memory and use it from my kernel, or do I have to adjust it first?
And also,do I have to enter protected mode for this?
I think you need to answer a LOT more questions before you get on to OpenGL support.
Re: OpenGL, Mesa3D and stuff
Posted: Wed Nov 24, 2010 7:21 pm
by lemonyii
ohhh.... i think OpenGL need the support of a complete driver of your video card, which is so .... i just cannot find how can i writer a driver of my intergrated HD4200 of AMD 785G. i cannot find document on amd.com. if anyone know where it is, i would appreciate it!
Re: OpenGL, Mesa3D and stuff
Posted: Wed Nov 24, 2010 9:57 pm
by TylerH
Your best chance is to see if one of the docs at Xorg is relevant to your video card.
http://www.x.org/docs/
Re: OpenGL, Mesa3D and stuff
Posted: Wed Nov 24, 2010 10:47 pm
by salil_bhagurkar
As JamesM said, you need to understand a lot before thinking of "running OpenGL" in your OS.
http://www.opengl.org/documentation/implementations/
This link will give you some things you might find useful. There is this OpenGL sample (possibly barebones) implementation on that page in the Linux section (pointing to
http://oss.sgi.com/projects/ogl-sample/).
You may also check out the OpenGL ES (for embedded systems) section on the same page. ES implementations might be simpler to understand.
Re: OpenGL, Mesa3D and stuff
Posted: Thu Nov 25, 2010 12:55 am
by Asper
lemonyii
KolibriOS driver for all
ATI Radeon cards that supports 2D acceleration, hardware mouse pointer and kernel mode settings. Maybe it will be usefull for you.
http://redmine.kolibrios.org/projects/k ... /video/drm
Re: OpenGL, Mesa3D and stuff
Posted: Thu Nov 25, 2010 4:06 am
by Combuster
And Radeons are among the most complicated devices around ATM. And unless you have an idea how it should work, reading source code is like reading magic runes. If you really want hardware acceleration, start with writing a S3 Trio64 driver - you can even test that it in an emulator.
Also "borrowing" driver code requires that you can provide the same environment altogether. Do you want to be just another unix clone using the infamous drm interface and X? You may want to copy the remainder of the linux kernel while you're at it.
@OP: Since you don't even realize what protected mode is for, you are light-years away from doing any hardware acceleration. There's even a relevant
FAQ entry on it, if the beginner mistakes don't apply already.
@lemonyii: you don't need a full-fledged 3D driver to do OpenGL. You can do that in software, which also allows you to test 3D on stock emulators like Bochs and QEmu.
Re: OpenGL, Mesa3D and stuff
Posted: Thu Nov 25, 2010 7:17 am
by salil_bhagurkar
Combuster wrote:
@OP: Since you don't even realize what protected mode is for, you are light-years away from doing any hardware acceleration. There's even a relevant
FAQ entry on it, if the beginner mistakes don't apply already.
I think having an impractical aim can serve as a long-lived motivation even for learning assembly language.