Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

OpenGL Implementation

76 views
Skip to first unread message

Joe

unread,
Jun 5, 2012, 6:34:31 AM6/5/12
to
I'm Building an Operating System from Scatch, How would I go about
Implementing OpenGL?

Peter Cheung

unread,
Jun 14, 2012, 9:55:51 AM6/14/12
to
在 2012年6月5日星期二UTC+8下午6时34分31秒,Joe写道:
> I'm Building an Operating System from Scatch, How would I go about
> Implementing OpenGL?

OpenGL library is big and i believe some functions in it are hardware dependent. Tell me when you know the answer. thanks

fma...@gmail.com

unread,
Jun 14, 2012, 10:08:41 AM6/14/12
to
Obvious troll.
If you are in the need of implementing OpenGL in your OS you would not ask anything ;-)
Ciao!

Rod Pemberton

unread,
Jun 14, 2012, 8:32:21 PM6/14/12
to
<fma...@gmail.com> wrote in message
news:62acb329-1697-41e3...@googlegroups.com...
On Thursday, June 14, 2012 3:55:51 PM UTC+2, Peter Cheung wrote:
> ? 2012?6?5????UTC+8??6?34?31?,Joe??:
> > > I'm Building an Operating System from Scatch, How would
> > > I go about Implementing OpenGL?
>
> > OpenGL library is big and i believe some functions in it are
> > hardware dependent. Tell me when you know the answer. thanks
>
> Obvious troll.
> If you are in the need of implementing OpenGL in your OS
> you would not ask anything ;-)
> Ciao!

I agree with Peter. Likely, there is much video card and hardware dependent
programming.

a) I.e., it seems like a large task to start with, so why would Joe want to
do this?

I'd think at the start of writing an OS one would use the BIOS video calls.
Get a copy of RBIL (Ralf Brown's Interrupt List) for the interrupts.

b) But, why wouldn't Joe ask? Maybe, he just needs an idea of where to
start. Or, maybe his skill set is quite advanced and he can do it with some
help.

I took his question to mean he wants to implement his own OpenGL, and not
use OpenGL's OpenGL. He'd start by getting a video card that he can
program, i.e., that has an open hardware interface specification. Or, he'd
use VGA since it's well documented. Or, he'd call VESA/SVGA video BIOS
functions and their trap I/O ports using v86 mode. That would allow him to
determine the video card register set and/or create his own routines. Then,
he'd get a list of the functions in various OpenGL specifications. Then,
he'd start writing those functions, from the earliest specification to the
current specification, one function at a time. IMO, starting with VGA is
probably a good idea. He can update to SVGA or specific hardware later.
This task seems astronomical for just starting an OS

http://en.wikipedia.org/wiki/OpenGl


http://aodfaq.wikispaces.com/rbil
http://aodfaq.wikispaces.com/
http://forum.osdev.org/
http://wiki.osdev.org/Main_Page


Rod Pemberton



BGB

unread,
Jun 14, 2012, 9:44:20 PM6/14/12
to
the thing is, the best a person can really do with VESA / SVGA / ...
stuff would essentially amount to a software-renderer implementation of
OpenGL, which would be very slow (even with good code).

for a more "proper" OpenGL variety (IOW: one which isn't dead slow),
this would get very involved with the particular piece of video hardware
(targeting the particular HW ISA used by the GPU, ...), and modern video
HW drivers actually have a fair amount in common with compilers (both
for compiling the shader programs, and for mapping much of OpenGL
functionality itself to the GPU's ISA).

similarly, the (modern) OpenGL library often isn't really a library in
the traditional sense (at least on Windows), but more of a wrapper
interface which passes most of this stuff over to the video-card driver
(which implements the OpenGL API), which may then put it into GPU
memory, pass control of it over to shader programs, ...


granted, yes, one can implement a software renderer based driver, and
then use VESA or similar to put it on screen, just the performance wont
be very good.

Peter Cheung

unread,
Jun 15, 2012, 12:44:16 PM6/15/12
to

Peter Cheung

unread,
Jun 15, 2012, 12:42:14 PM6/15/12
to
you can try http://www.svgalib.org/ , if you just want a graphic layer

!!! haven't seen any hobby os developer ported opengl successfully, aren't they

wolfgang kern

unread,
Jun 15, 2012, 1:37:02 PM6/15/12
to

Peter Cheung mentioned:
Ok so far, but absolutely useless for me, because I sell my OS
since many decades without any depencies on GPLed or similar...

OpenGL, PDF, and many more will ask to pay a licence fee before
you even think about using such 'porting to M$'-shit.

An alternative way may be to direct contact the Hw-manufactor
to get enough info for creating your own 'driver'-modules...
But I often see me redirected to the 'official' M$-shit.

The other opportunity (sure not a legal methode) is to re-enginier
existing drivers which are offered for use with M$- or Loonix-OS.

OTOH, this for own usage required GPU-codes are found in the
firmware-hubs anyway, the problem just seem to be the lack on
information about all this (directX is just another HAL-element).

__
wolfgang
still working since a while on a disassembler for AMD/ATI-based GPUs.


0 new messages