I've been writting for a LONG time a game using OpenGL, and I'd like to have it run on OS4.
I know the standard answer is "use MiniGL", but I've already done a lot of work and there are things lacking in MiniGL. So I was wondering if StormMesa or some other OpenGL implementation was more complete yet for OS4?
Arthur
P.S. Since I know the next question will be "what are you using that isn't in MiniGL?", here is the list:
glPopAttrib glPushAttrib gluOrtho2D (I can just use glOrtho) glNormalPointer glLightfv glMaterialfv glCallList glEndList glNewList glGenlists glLineWidth gluSphere (I can get around this) gluNewQuadric (I can get around this as well) glClipPlane gluBuild2DMipmaps glRasterPos2i glDrawPixels glVertex2d (I CAN reduce this to f's but it makes things shake too much) glVertex3d (I CAN reduce this to f's but it makes things shake too much)
I know the standard answer is "use MiniGL", but I've already done a lot of work and there are things lacking in MiniGL. So I was wondering if StormMesa or some other OpenGL implementation was more complete yet for OS4?
If you need speed, forget about StormMESA. It doesn't work on AmigaOS 4.0 anyway, since it requires the obsolteted indirect mode.
Quote:
glPopAttrib glPushAttrib
Both in already.
Quote:
gluOrtho2D (I can just use glOrtho)
Should both be available, and easy to replace/insert if they aren't.
Quote:
glNormalPointer
Normals are in, as well as...
Quote:
glLightfv glMaterialfv
... these, including the full lighting pipeline.
Quote:
glCallList glEndList glNewList glGenlists
Those are missing. Can be added (since MiniGL is OpenSource), in fact I am in contact with someone that was planning to have a go at it.
Quote:
glLineWidth
LineWidth, PointSize, stipple pattern etc. are in.
Quote:
gluSphere (I can get around this) gluNewQuadric (I can get around this as well)
No quadrics support, I suppose that a possibility might be to get these from the SGI GLU library.
Quote:
glClipPlane
Those are in too.
Quote:
gluBuild2DMipmaps
That's available too.
Quote:
glRasterPos2i glDrawPixels
Available as well.
Quote:
glVertex2d (I CAN reduce this to f's but it makes things shake too much) glVertex3d (I CAN reduce this to f's but it makes things shake too much)
They are in the API IIRC, but internally MiniGL uses floats internally. I am not sure whether that can be changed easily, but normally floating point precision should really be sufficient, unless you use very small coordinates...
Seems that display lists are the only feature that is missing.
Seriously, if you do want to contact me write me a mail. You're more likely to get a reply then.
If you need speed, forget about StormMESA. It doesn't work on AmigaOS 4.0 anyway, since it requires the obsolteted indirect mode.
I've heard that, but I figuired I'd mention it. :)
<Snip long list of GL functions>
To determine the list, I swapped out the gl.h include with the gl.h in the MiniGL archive I got from Aminet. Barring a few hacks of the includes, I got it to compile and waited for the error list, then double checked the missing functions against the gl.h include file with MiniGL to verify if they were there or not. Is the one on AmiNet not the most up to date (which wouldn't surprise me at all considering when it was dated)? And if not, where would one get a newer one? (I logged into Hyperion's site but I didn't see anything there via the website).
It's a pity that the Lists aren't there, but I've known that for a while. I'd still like to see my project running on OS4, and I can always dummy out those calls since the whole thing doesn't use lists. Wouldn't one be able to grab the list functions from a version of Mesa to integrate in MiniGL? (I'm not saying for you, I mean just in general)
Thanks again!
Arthur
P.S. Now to start an annoying thread about cross-compiling!
P.P.S. As far as using Doubles for certain things over floats, the majority of my program uses floats, but for certain things it does use doubles. Mostly because of the scales involved...The further from the origin, the more the imprecision is noticed and makes things "shakey". I already use "sectors" to compensate for that however, so I guess I can shrink the sectors. I don't remember at this point which part uses the doubles precisely, so I'll have to look into that. Using the f versions will do for now for a port to get it running (even if I just do a wrapper).
Is the one on AmiNet not the most up to date (which wouldn't surprise me at all considering when it was dated)?
No, the later versions where included with the OS 4 SDK. We also have an SVN repository with a later version. I think I'll have a look at brushing it up a bit and then making it public.
Quote:
Wouldn't one be able to grab the list functions from a version of Mesa to integrate in MiniGL? (I'm not saying for you, I mean just in general)
Not really, Display lists tie quite deeply into the underlying architecture of the GL implementation. Essentially, you would need to hook into every call and determine whether it would compile or execute (or both), it's not exactly difficult to do but a bit of tedious work.
Quote:
The further from the origin, the more the imprecision is noticed and makes things "shakey". I already use "sectors" to compensate for that however, so I guess I can shrink the sectors. I don't remember at this point which part uses the doubles precisely, so I'll have to look into that. Using the f versions will do for now for a port to get it running (even if I just do a wrapper).
True, if you have a large space then this will cause imprecision of that sort, but it should be possible to work around it. You will always have some sort of observer, and unless you have a very large-scale "universe" with a high visibility, you would always have the possibility to translate into a local coordinate system first for drawing - chances are you will do that anyway for hierarchical objects.
Seriously, if you do want to contact me write me a mail. You're more likely to get a reply then.
I'm having a look at adding display-lists right now. Like Rogue said, it's a little tedious, but shouldn't be hard.
It would be greatly appreciated! Thanks!
Now to figuire out the compiler issue... :) (I'm trying not to have divergent trees because of compiler differences. I know that is impossible, but I want to keep it minimal.)
In OpenGL if you use glRotatef(...) the rotation will be multiplied to the MODELVIEW matrix. This matrix will be multiplied to all vertices you define. On a T&L graphics cards that multiplication will be done in hardware, most graphics cards today have T&L or shaders, so if you were programming OpenGL on a Windows or Linux OS, it would use the hardware.
But using MiniGL on the amiga will not use the hardware, everything except rendering the triangles is handled by software.
So I suggest you program the rotation using the OpenGL functions and just pretend it is done by hardware. Then when the hardware drivers are updated you will get better hardware acceleration, if you recompile your application.
I'm happy to see that the development of the OpneGL library is continuing steady. OpenGL library are an essential part of an OS. Go on dudes
it was mentioned that a complete mesa port will be developed for os4 - including sort of a "warp3d wrapper" iirc.
can rogue maybe give a status update on that? iirc this also needed a completely new developed graphics api underneath it?
i guess that the development of the classic version has slowed this down a little bit.
byebye...
No idea what the status of the MESA port is. I really hope that it is progressing as I could definitely use a full port (with shader support). Improving MiniGL is just to give people something to use in the interim. I have the display-list core working (it executes some demos that use lists). Now I just have to do the tedious task of redirecting all relevant OpenGL calls to save into a display list.
Any chance in getting glutSpecialUpFunc, glutKeyboardUpFunc and glutIgnoreKeyRepeat in the next release?
(And ofcourse glutFullScreen...)
/me hopes...
I'm focusing more on OpenGL itself rather than GLUT. If someone is willing to have a go at updating GLUT support, they can always access the SVN, and/or contact the Friedens in order to be added as developers.