OpenGL (porting)

Programming, for all ages and all languages.
Post Reply
User avatar
lukem95
Member
Member
Posts: 536
Joined: Fri Aug 03, 2007 6:03 am
Location: Cambridge, UK

OpenGL (porting)

Post by lukem95 »

I've been looking through the sources of OpenGL and TinyGL today, and apart from the memory requirements (malloc, calloc and free etc) in memory.c, i cannot find anything else that i would need to port. Obviously i am missing something, as there must be routines for printing pixels and so forth, but i cannot find them. Can anybody help?

+ i was also wondering if anybody had OpenGL working with their operating systems here, did you have any difficulties? find it easy/hard/impossible? im interested really, as it's something that's been in my design goals the whole time.
~ Lukem95 [ Cake ]
Release: 0.08b
Image
User avatar
Jeko
Member
Member
Posts: 500
Joined: Fri Mar 17, 2006 12:00 am
Location: Napoli, Italy

Re: OpenGL (porting)

Post by Jeko »

lukem95 wrote:I've been looking through the sources of OpenGL and TinyGL today, and apart from the memory requirements (malloc, calloc and free etc) in memory.c, i cannot find anything else that i would need to port. Obviously i am missing something, as there must be routines for printing pixels and so forth, but i cannot find them. Can anybody help?

+ i was also wondering if anybody had OpenGL working with their operating systems here, did you have any difficulties? find it easy/hard/impossible? im interested really, as it's something that's been in my design goals the whole time.
I think you must write drivers for graphics cards.

However TinyGL is a software only implementation, so you need only to change video modes and to give the framebuffer address to TinyGL

And...I recommend to see Gallium3D
Rewriting virtual memory manager - Working on ELF support - Working on Device Drivers Handling

http://sourceforge.net/projects/jeko - Jeko Operating System
cyr1x
Member
Member
Posts: 207
Joined: Tue Aug 21, 2007 1:41 am
Location: Germany

Re: OpenGL (porting)

Post by cyr1x »

lukem95 wrote:I've been looking through the sources of OpenGL
Huh? OpenGL is a specification and thus has no source code. Do you mean GLUT?
User avatar
Alboin
Member
Member
Posts: 1466
Joined: Thu Jan 04, 2007 3:29 pm
Location: Noricum and Pannonia

Re: OpenGL (porting)

Post by Alboin »

GLUT provides most of the 'system level IO', so that's where you're gonna want to look for that. It's a separate library, by the way. ;)
C8H10N4O2 | #446691 | Trust the nodes.
User avatar
Jeko
Member
Member
Posts: 500
Joined: Fri Mar 17, 2006 12:00 am
Location: Napoli, Italy

Re: OpenGL (porting)

Post by Jeko »

cyr1x wrote:
lukem95 wrote:I've been looking through the sources of OpenGL
Huh? OpenGL is a specification and thus has no source code. Do you mean GLUT?
I think he's talking of sources of the simple implementation of OpenGL
http://oss.sgi.com/projects/ogl-sample/
Rewriting virtual memory manager - Working on ELF support - Working on Device Drivers Handling

http://sourceforge.net/projects/jeko - Jeko Operating System
User avatar
Brynet-Inc
Member
Member
Posts: 2426
Joined: Tue Oct 17, 2006 9:29 pm
Libera.chat IRC: brynet
Location: Canada
Contact:

Re: OpenGL (porting)

Post by Brynet-Inc »

Why not look at http://mesa3d.org/ ?

It has ports to several architectures/operating systems.. and it does software rendering.
Image
Twitter: @canadianbryan. Award by smcerm, I stole it. Original was larger.
User avatar
Jeko
Member
Member
Posts: 500
Joined: Fri Mar 17, 2006 12:00 am
Location: Napoli, Italy

Re: OpenGL (porting)

Post by Jeko »

Brynet-Inc wrote:Why not look at http://mesa3d.org/ ?

It has ports to several architectures/operating systems.. and it does software rendering.
Gallium3D is the best implementation. In fact Gallium3D will support several architectures/operating systems and several APIs (yes, also Direct3D :D )

Gallium3D will be the standard for Linux graphics.
Rewriting virtual memory manager - Working on ELF support - Working on Device Drivers Handling

http://sourceforge.net/projects/jeko - Jeko Operating System
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 (porting)

Post by Combuster »

*will support* implies *does not support* :roll:
I have yet to see what this actually becomes.
"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
Jeko
Member
Member
Posts: 500
Joined: Fri Mar 17, 2006 12:00 am
Location: Napoli, Italy

Re: OpenGL (porting)

Post by Jeko »

Combuster wrote:*will support* implies *does not support* :roll:
I have yet to see what this actually becomes.
Yes, but I think Gallium3D will really be a standard.
It's the new branch of Mesa. There are yet drivers that support the new API.

Gallium3D will be a small layer than Mesa, so it will be simpler to port to other platforms or other graphics API.
It supports the new DRI2 (Direct Rendering Interface 2).

I think Gallium3D could be the right choice within many OpenGL and Graphics Libraries implementations.

However Gallium3D will be the new Mesa3D.
If he must port an OpenGL library now, he must choose Mesa3D (or other).
But, seeing that (at least I think) lukem will port OpenGL to his OS not now, he can choose the new Gallium3D.
Rewriting virtual memory manager - Working on ELF support - Working on Device Drivers Handling

http://sourceforge.net/projects/jeko - Jeko Operating System
User avatar
lukem95
Member
Member
Posts: 536
Joined: Fri Aug 03, 2007 6:03 am
Location: Cambridge, UK

Re: OpenGL (porting)

Post by lukem95 »

Jeko wrote:
cyr1x wrote:
lukem95 wrote:I've been looking through the sources of OpenGL
Huh? OpenGL is a specification and thus has no source code. Do you mean GLUT?
I think he's talking of sources of the simple implementation of OpenGL
http://oss.sgi.com/projects/ogl-sample/
yeah sorry, i was talking about that. so basically i need to look into FreeGLUT, ok well that's a start :)

EDIT: freeGLUT sucked, but the proper source for GLUT seems quite nice, although it's going to take a while to port. My TODO list for functions is already on about 40
~ Lukem95 [ Cake ]
Release: 0.08b
Image
Post Reply