OpenGL, Mesa3D and stuff

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
Mrk
Posts: 3
Joined: Mon Oct 25, 2010 7:31 am

OpenGL, Mesa3D and stuff

Post 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?
User avatar
JamesM
Member
Member
Posts: 2935
Joined: Tue Jul 10, 2007 5:27 am
Location: York, United Kingdom
Contact:

Re: OpenGL, Mesa3D and stuff

Post 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.
User avatar
lemonyii
Member
Member
Posts: 153
Joined: Thu Mar 25, 2010 11:28 pm
Location: China

Re: OpenGL, Mesa3D and stuff

Post 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!
Enjoy my life!------A fish with a tattooed retina
TylerH
Member
Member
Posts: 285
Joined: Tue Apr 13, 2010 8:00 pm
Contact:

Re: OpenGL, Mesa3D and stuff

Post 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/
User avatar
salil_bhagurkar
Member
Member
Posts: 261
Joined: Mon Feb 19, 2007 10:40 am
Location: India

Re: OpenGL, Mesa3D and stuff

Post 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.
User avatar
Asper
Member
Member
Posts: 43
Joined: Fri Jan 22, 2010 7:37 am
Location: Kyrgyzstan, Bishkek

Re: OpenGL, Mesa3D and stuff

Post 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
User avatar
Combuster
Member
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: OpenGL, Mesa3D and stuff

Post 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.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
User avatar
salil_bhagurkar
Member
Member
Posts: 261
Joined: Mon Feb 19, 2007 10:40 am
Location: India

Re: OpenGL, Mesa3D and stuff

Post 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. :roll:
Post Reply