A very small addition to minigl...

This forum is for general developer support questions.
Spirantho
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 34
Joined: Thu Jan 26, 2012 10:54 am

A very small addition to minigl...

Post by Spirantho »

Hi everybody,
I've been recompiling MAME (again), and this time - rather than hacking MAME - I thought I'd actually fix the minigl instead to make it work properly.

Is there any way we can get my change into the minigl.library and distributed? It's a VERY small change.

This is all I did:

I added:

Code: Select all

void unpack_argb_b(void *context, GLubyte *from, GLubyte *to, GLsizei num)
{
	GLsizei i;

	for (i = 0; i < num; i++)
	{
		to[A_COMPONENT] = *from++;
		to[R_COMPONENT] = *from++;
		to[G_COMPONENT] = *from++;
		to[B_COMPONENT] = *from++;

		to += 4;
	}
}
and inserted

Code: Select all

	{GL_BGRA,				GL_UNSIGNED_INT_8_8_8_8_REV,unpack_argb_b,		4},
to the FormatTypeToUnpack[] table.

I had to do this because MAME uses the GL_UNSIGNED_INT_8_8_8_8_REV form of packing, but the normal minigl doesn't understand this and so can't unpack the texture, resulting in a white blob.

I realise minigl is obsolete for developers anyway now, but for normal mortals, we're still using the old minigl.library which means my MAME and MESS won't work unless people get a new minigl.library.

Can anyone help with this?

Thanks!

(Incidentally, the OpenGL support gives a considerable speed-up to larger screen resolutions as the scaling is all in hardware. It makes my little 600MHz Sam440ep much more capable at emulating)
User avatar
samo79
Posts: 572
Joined: Fri Jun 17, 2011 11:13 pm
Location: Italy

Re: A very small addition to minigl...

Post by samo79 »

Good news, if i remember correctly there were also some other third party fixes to be merged, now i don't know who is involved but you might try to contact Steven Solie to obtain the access to the MiniGL SVN :)
User avatar
samo79
Posts: 572
Joined: Fri Jun 17, 2011 11:13 pm
Location: Italy

Re: A very small addition to minigl...

Post by samo79 »

About the access I sent a quick message to Hans, let's see what he say :-)
Spirantho
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 34
Joined: Thu Jan 26, 2012 10:54 am

Re: A very small addition to minigl...

Post by Spirantho »

Thanks!
As soon as the minigl is updated everyone can have nicely scaled MAME 0.152 :)
User avatar
samo79
Posts: 572
Joined: Fri Jun 17, 2011 11:13 pm
Location: Italy

Re: A very small addition to minigl...

Post by samo79 »

Spirantho wrote:Thanks!
As soon as the minigl is updated everyone can have nicely scaled MAME 0.152 :)
No luck with Hans (it seems he doesn't have the access for the MiniGL SVN) so i wrote a direct message to Karlos, let's see how it goes ..
But strange that nobody reply here, ok that MiniGL is obsolete but giving the access for a couple of fix wasn't too mutch stressing ..

Aniway in the worse scenario i think you should release your Mame port and also a new official version of MiniGL that include your fixes aswell (maybe calling it as 2.5.1 or similar) so without committing any of your changes into the repository.

Eventually you may include the full source with your eventual MiniGL 2.5.1 release, so less problems for others too ..
User avatar
Karlos
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 84
Joined: Sun Jun 19, 2011 11:42 am
Location: United Kingdom of England and anybody else that wishes to remain.

Re: A very small addition to minigl...

Post by Karlos »

Hi,

Posting from my phone so I'll have to keep it short. I can't do it just now but I'll try to make sure the changes are added to the repository as soon as I can. I need to make sure all my changes are properly reintegrated too.
kas1e
Beta Tester
Beta Tester
Posts: 542
Joined: Sat Jun 18, 2011 7:56 am
Contact:

Re: A very small addition to minigl...

Post by kas1e »

@Karlos
Maybe you will be able to add also few new functions to mgl ?:) glBindBuffers(), glGenBuffers() and glDeleteBuffers(). I know they use those VBOs which minigl does not support, but we can emulate it via switching inside to vertex arrays, so there will be no needs to implement the wheel in all codes which use it. As Hans says, its should be pretty easy. If you in interest, there is relevant topic about: http://www.amigans.net/modules/xforum/v ... 3&forum=25
User avatar
Karlos
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 84
Joined: Sun Jun 19, 2011 11:42 am
Location: United Kingdom of England and anybody else that wishes to remain.

Re: A very small addition to minigl...

Post by Karlos »

kas1e wrote:@Karlos
Maybe you will be able to add also few new functions to mgl ?:) glBindBuffers(), glGenBuffers() and glDeleteBuffers(). I know they use those VBOs which minigl does not support, but we can emulate it via switching inside to vertex arrays, so there will be no needs to implement the wheel in all codes which use it. As Hans says, its should be pretty easy. If you in interest, there is relevant topic about: http://www.amigans.net/modules/xforum/v ... 3&forum=25
I can't promise anything there. It's not that I regard MiniGL as obsolete and not worth the effort, the simple fact is that I recently got married and even more recently bought a house that we're in the process of renovating. I already have a full time job that almost every day involves working late and there's simply no time left at the end of the day to do any work on Amiga projects. Add to that the fact that I still didn't get the A1 fixed and my only working OS4 machine is an A1200. You get the idea.
User avatar
Karlos
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 84
Joined: Sun Jun 19, 2011 11:42 am
Location: United Kingdom of England and anybody else that wishes to remain.

Re: A very small addition to minigl...

Post by Karlos »

So,

I'm having some SVN issues with the repo at the moment that are preventing me reintegrating my branch (note, not your typical text/tree conflict, this is something else). It may take a while to sort out, so I will add the texture code to the branch. That way I can get an update out sooner rather than later.

As for the vertex buffer object stuff, I'm afraid I just don't have time right now.
Spirantho
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 34
Joined: Thu Jan 26, 2012 10:54 am

Re: A very small addition to minigl...

Post by Spirantho »

On behalf of all MAME fans, may I say "Thank you" :)
Post Reply