Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
151 user(s) are online (145 user(s) are browsing Forums)

Members: 0
Guests: 151

more...

Support us!

Headlines

 
  Register To Post  

Porting OpenGL (SOLVED)
Quite a regular
Quite a regular


See User information
I think the SDL port(s) to Amiga are one of the finest steps made for our community. Thank you to those (he/she) involved in that.

But, how easy is it to port an application that uses OpenGL? I have not looked into Doom 3, but I think it uses OpenGL...

I know that there are a number of libraries/wrapper libraries, but is there a WIKI page, or a good source of information that demonstrates porting a simple open gl application over to AmigaOS?

Thanks.


Edited by rjd324 on 2022/7/11 23:05:18
If liberty means anything at all, it means the right to tell people what they do not want to hear.
George Orwell.
Go to top
Re: Porting OpenGL
Home away from home
Home away from home


See User information
For porting OpenGL stuff to os4 you have 2 ways:

--1--
First one its ols MiniGL way. MiniGL works over old Warp3D (do not confuse it with new Warp3DNova, it's different libraries), but MiniGL is OpenGL 1.3 (yes, that old one) and have some bugs which probabaly will be never fixed.

MiniGL works on almost everything, like Radeon9250, Voodoo cards, old Bvision/CyberVision cards on permedia2 chips which used for classics back in past, or anything of that sort. For RadeonHD there also a special Warp3D SI driver (so to have old Warp3D over which MiniGL will works), and for RadeonRX, there already finished Warp3DNova bridge driver which also give you old Warp3D support so to make old MiniGL works as well, but this is not released for public currently.

Anyway, main point for MiniGL is:

-- MiniGL works almost everywhere
-- MiniGL is slow
-- MiniGL have bugs which probabaly will stay there
-- MiniGL it's only OpenGL 1.3 standard, so only for very old OpenGL games/apps.


--2---

Second way to port OpenGL apps to amigaos4 is GL4ES. GL4ES is OpenGL 2.x , with some subset of 3.X support. It works through opengles2/warp3dnova combo (exactly Warp3DNova, do not confuse it with with classic old Warp3D).

On GL4ES port for os4 we spend few years already. While the main author of GL4ES is "ptitSeb", i spend few years of bug-hunting, bug-reporting, testing and porting stuff over it. Also Daniel and Hans spend quite a lot of time to imporve/fixing ogles2 and Warp3DNova to have it all works as expected. You can see what i port over by this links:

https://www.amigans.net/modules/news/article.php?storyid=2724
https://www.amigans.net/modules/news/article.php?storyid=2778
https://www.amigans.net/modules/news/article.php?storyid=2831
https://www.amigans.net/modules/news/article.php?storyid=2945


HunoPPC also use GL4ES to port his latest stuff, including new Doom3 port on which he works now.

The drawback of GL4ES, is that it works only on RadeonHD and RadeonRX, i.e. where Warp3DNova and ogles2.library works.


So main points of GL4ES:

-- GL4ES works only on RadeonHD and RadeonRX
-- GL4ES is fast, especially when no "old" glBegin/glEnd route used. In some games it 5-6 times faster. For example, NeverBall on MiniGL give in some level 30FPS on the same hardware, and the same versin of NeverBall compiled over GL4ES give 220 FPS. But usually speed difference is not _that_ big, but still at minimum the same, but if game is written modern enough in terms of opengl, and didnt' use oldschool glBegin/glEnd route, then it will be 2-3-4 times faster.
-- GL4ES is almost bug free (At least in compare with MiniGL), and all the bugs fixed very fast if found by ptitSeb.
-- GL4ES is OpenGL 2.x , with some 3.x support, and soon probabaly will be full OpenGL 3.x support.


If you have any other questions, just ask.

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: Porting OpenGL
Home away from home
Home away from home


See User information
@kas1e

Is there any technical reason why Warp3DNova Bridge will only works on RX cards and not on the HD one?
I believe some machines (f.e. Sam460) could not use such recent RX cards

Go to top
Re: Porting OpenGL
Just popping in
Just popping in


See User information
@samo79

All Cards that Run Warp3DNova will Automatically get a Working Warp3DNovaBridge, it's the same code for all Warp3DNova based Cards. It does not need a specifik driver to run Warp3DNovaBridge, the 'driver' is warp3dnova.

Go to top
Re: Porting OpenGL
Quite a regular
Quite a regular


See User information
@samo79

RX cards do work on the Sam460. I use a Yeston RX560 with no issues.

Others on this forum have reported other RX cards working fine on the Sam460.

Cheers

Go to top
Re: Porting OpenGL
Quite a regular
Quite a regular


See User information
@kas1e

Thank you.

What I am looking for is a demonstration, or a list of commits.

As an example:

Say I have created ab OpenGL application on my x86 Linux OS machine of a simple rotating rubix cube.

I make a fresh repository for the code on my amiga machine. I try to run MAKE, of course... it fails.

What changes must I make to the code?
What new files must I include?
What new libraries to link against?

Is there an existing repository with version control that I could look at the commits, ideally from a code base that was originally for a non-Amiga OS?

regards.

If liberty means anything at all, it means the right to tell people what they do not want to hear.
George Orwell.
Go to top
Re: Porting OpenGL
Quite a regular
Quite a regular


See User information
For example, do I need to change the opengl function calls, or are they wrapped in these mentioned libraries?

If liberty means anything at all, it means the right to tell people what they do not want to hear.
George Orwell.
Go to top
Re: Porting OpenGL
Just can't stay away
Just can't stay away


See User information
@samo79

RX550 working fine on my SAM460ex, problem is I don't get/see Uboot startup at all, you have to config Uboot to go through serial output.

Boot image and WB runs fine.

Go to top
Re: Porting OpenGL
Home away from home
Home away from home


See User information
@rjd324
You don't need to change opengl calls of course, you just use GL4ES includes in SDK instead of MiniGL ones , and on the linking stage (when link final binary) just add -lgl4es , or if it with sdl , then -lsdl2_gl4es, or -lsdl_gl4es (all of them in my gl4es SDK , on os4depot).

As for makefiles, changes there the same as always, gcc/ar/g++ change on ppc-amigaos-gcc/ppc-amigaos-g++/ppc-amigaos-ar if you on crosscompiler, or keep it as it if you build natively. Just add -athread=native and -lpthread on linking stage as well.

What is most matter, is how you use opengl. If you use opengl with EGL for example, then you have to recode it to remove EGL. If you use OpenGL code taken from windows where it use some win32 driver directly, also get rif of it, etc.

Basically, most of OpenGL stuff we port come with SDL1/SDL2. In this case you need to change nothing, you just use necesary includes (be it minigl or gl4es ones), and necesary linker libs on final binary linking stage.

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: Porting OpenGL
Quite a regular
Quite a regular


See User information
@kas1e
Quote:

and for RadeonRX, there already finished Warp3DNova bridge driver which also give you old Warp3D support so to make old MiniGL works as well, but this is not released for public currently.


Which explains why the demos from the minigl.lha on AmigaOS4Depot fail to run on my X5000, but run on my X1000 (I have Warp3D SI) ? As well as an old open gl game I build on both machines from years ago - X1000 okay, X5 not.

If liberty means anything at all, it means the right to tell people what they do not want to hear.
George Orwell.
Go to top
Re: Porting OpenGL
Quite a regular
Quite a regular


See User information
minigl includes glut library and its header files.

minigl cannot be used on X5000 with RX cards,

no where can I find the glut include files. How do I build a program that includes glut on an X5000 with RX card? installing minigl is pointless right now for the X5 + Rx combination;.

Is my understanding correct: that i can use GL4ES instead of minigl? And that, GL4ES is a superset of the 1.3 opengl standard? in that case, i expected to install something other than minigl that would also include glut header files. like on my x1000: i install minigl and i build the program which is 1.3 opengl compatible. on my x5000 i expect to install gl4es and without modifications to the program also expect to build the program. i should not have to change the source code... other than to perhaps link against different things / include different dirs..

If liberty means anything at all, it means the right to tell people what they do not want to hear.
George Orwell.
Go to top
Re: Porting OpenGL
Home away from home
Home away from home


See User information
@rjd324
Quote:

minigl includes glut library and its header files.

minigl cannot be used on X5000 with RX cards,


While NovaBridge not released publicaly - yes. When it will be released need to ask Mattew. He hold it for now reassons.

Quote:

no where can I find the glut include files. How do I build a program that includes glut on an X5000 with RX card? installing minigl is pointless right now for the X5 + Rx combination;.


There isn't glut avail for gl4es, just for old minigl (and glut by itself is old too and probabaly depricated everywhere). Check minigl.lha on os4depot, there mglut.library and glut includes as well.

Quote:

Is my understanding correct: that i can use GL4ES instead of minigl?


Yes.

Quote:

And that, GL4ES is a superset of the 1.3 opengl standard?


GL4ES give us OpenGL 2.x , with some 3.x parts.

Quote:

in that case, i expected to install something other than minigl that would also include glut header files.


There isn't glut for GL4ES as no one doing so, as it not very need it, and the more modern opengl apps are, the less it uses glut (if ever).


Quote:

on my x5000 i expect to install gl4es and without modifications to the program also expect to build the program.


You install gl4es SDK, and then, you need in your SDK rename old "GL" directory with minigl includes to something else, and insted, create GL directory with includes from GL4ES (that all noted and explained how to do in the readme for GL4ES SDK, which on os4depot). And then things will be build with no modifications, if, of course, no more 3d party layers used, like EGL, GLUT or whatever.

Quote:

perhaps link against different things / include different dirs..


Yes, GL include in your SDK should contain GL4ES includes, and on linking you add -lgl4es , or if it with sdl1 -lsdl1_gl4es -lgl4es, or, if it with sdl2 then -lsdl2_gl4es -lgl4es (that all noted in the readme for gl4es SDK).

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: Porting OpenGL
Quite a regular
Quite a regular


See User information
@kas1e
You are as helpful as ever, thank you. I just want to clear something up:

Quote:

GL4ES give us OpenGL 2.x , with some 3.x parts.

2.x is backwards compatible with 1.3? If so, then you can use GL4ES even for things that were designed with 1.3?

Quote:

There isn't glut for GL4ES as no one doing so, as it not very need it, and the more modern opengl apps are, the less it uses glut (if ever).

What about: http://os4depot.net/share/driver/graphics/minigl4gl4es.lha. This seems to include GLUT that is built on GL4ES, so that it is usable, but there is no
link library, only a shared library and there are no include files.
===

At the point in time, I have installed the GL4ES library and followed the readme. All good so far, and I can build and run the examples.

I am just wondering if it is possible to build an old OpenGL 1.3 program that also uses GLUT and have it work on a Polaris X5000.

I can get GLUT from the minigl.lha, but that is build on Warp3D, so no good? Or, I can get GLUT from minigl4gl4es.lha, but that does not include header files and only a shared library.

Thanks for your patience.

If liberty means anything at all, it means the right to tell people what they do not want to hear.
George Orwell.
Go to top
Re: Porting OpenGL
Just popping in
Just popping in


See User information
@rjd324

Quote:
minigl cannot be used on X5000 with RX cards

Quote:
installing minigl is pointless right now for the X5 + Rx combination


Simply install MiniGL4GL4ES to get MiniGL support using a Radeon RX Graphics Card:

Resized Image

Quote:
How do I build a program that includes glut on an X5000 with RX card?

Quote:
What about: http://os4depot.net/share/driver/graphics/minigl4gl4es.lha. This seems to include GLUT that is built on GL4ES, so that it is usable, but there is no
link library, only a shared library and there are no include files.


Just link your app against regular MiniGL SDK. MiniGL4GL4ES is not a development library.

Go to top
Re: Porting OpenGL
Quite a regular
Quite a regular


See User information
This worked fine.

Thanks all.

If liberty means anything at all, it means the right to tell people what they do not want to hear.
George Orwell.
Go to top

  Register To Post

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2024 The XOOPS Project