A question about wrappers...

Developer's Forum, for discussion of bugs, code, and other developmental aspects of GliDOS.

A question about wrappers...

Postby Stiletto » 2002-9-27 @ 15:41

My long-time question: Is it possible to "reverse" a wrapper?

Suppose that someone wrote a Glide - OpenGL wrapper. Open-source, then stopped work on it. Can it then be reversed to OpenGL-Glide?
Or a Glide-Direct3D to D3D-Glide? When does the ability to wrap a 3D API stop? If it's possible to do something in one API that doesn't have an equivalent function in the other, how do you work around that? And all other "wrapper reversing" related questions you may have the answers to.

I'm hoping Vlad might see this and pop in too, this is also related to our MSCDEX-ASPI/IOCTL discussion going on in email... and the MCI-DVD to DirectShow thread from a few days ago... hmmm... lotsa involvement in wrappers these days...
"I see a little silhouette-o of a man, Scaramouche, Scaramouche, will you
do the Fandango!" - Queen

Stiletto
User avatar
Stiletto
l33t
 
Posts: 3850
Joined: 2002-7-01 @ 21:57

Postby Snover » 2002-9-27 @ 20:27

On the one hand, it's unfortunate that we need to use wrappers to get old stuff working. On the other hand, it's good, because it means old stuff can't crash our systems. In any case, who said you all could communicate via email and not let everyone in on the juicy details? That's just not nice! ;)
Snover
l33t++
 
Posts: 5207
Joined: 2002-6-30 @ 04:47

Postby Glidos » 2002-9-27 @ 21:14

I think implementing OpenGL or D3D on top of Glide might be the easier direction. OpenGL and D3D commands tend to be at the level of "what you want done", whereas Glide is closer to setting up the hardware in a way that gets the job done. An OpenGL to Glide wrapper would be a bit like an OpenGL driver for a real card, or that higher levels of such a driver. That's a bit of an over generalisation, but sort of true.

The difficulty with Glide to OpenGL is that the various functional units can be set up in some really weird ways that don't necessarily map onto sensible OpenGL commands.

I suppose all the modern OpenGL extensions would be hard to map onto Glide.
User avatar
Glidos
l33t
 
Posts: 3114
Joined: 2002-8-08 @ 02:55

Postby Stiletto » 2002-9-30 @ 12:49

Thought: Maybe once OpenGlide is in a thoroughly debugged and beautiful state, we let the WineX guys have a go with it (WineX is by Transgaming Technologies http://www.transgaming.com/) It's a compatibility "layer" for Linux, permits Win32 and Win16 programs to run in Linux. You think that's Wine, eh? (http://www.winehq.com/) Well WineX additionally translates D3D to OpenGL and DirectX to whatever else corresponding Linux API. Perhaps they'd like this, who knows...

Anyhow, back to the original question.

I have a vision of an arbitrary API framework that could be used to recompile code from -one- API to another. I'm simply trying to determine if it's possible, if it's probable, estimated development man-hours or man-days, etc. Where problems would occur, thoughts about implementation. That's kinda why I asked this question.
"I see a little silhouette-o of a man, Scaramouche, Scaramouche, will you
do the Fandango!" - Queen

Stiletto
User avatar
Stiletto
l33t
 
Posts: 3850
Joined: 2002-7-01 @ 21:57

Postby Glidos » 2002-9-30 @ 14:23

Stiletto wrote:I have a vision of an arbitrary API framework that could be used to recompile code from -one- API to another. I'm simply trying to determine if it's possible, if it's probable, estimated development man-hours or man-days, etc. Where problems would occur, thoughts about implementation. That's kinda why I asked this question.


Not quite sure what you mean. Are you suggesting you might take the source code of a game that uses Glide and apply a transformation to it to produce the same game but using OpenGL?
Something like that.
User avatar
Glidos
l33t
 
Posts: 3114
Joined: 2002-8-08 @ 02:55

Postby Stiletto » 2002-9-30 @ 14:51

Yes.

I also have a vision of a Stiletto-API. Write in Stiletto-API, choose target API (OpenGL, Direct3D, Glide, RRedline, etc.) and compile. However, there's the problem of SDK licenses (grr...)
"I see a little silhouette-o of a man, Scaramouche, Scaramouche, will you
do the Fandango!" - Queen

Stiletto
User avatar
Stiletto
l33t
 
Posts: 3850
Joined: 2002-7-01 @ 21:57

Postby Glidos » 2002-9-30 @ 15:26

I think there must already be in-house Stiletto APIs, for any game that lets you select between D3D and OpenGL. Looking at the Descent II source, they also have a sort of Stiletto API that is implemented either in Glide or OpenGL.

I guess the main problem would be that you could efficiently support only the common capabilities.
User avatar
Glidos
l33t
 
Posts: 3114
Joined: 2002-8-08 @ 02:55

Postby Glidos » 2002-9-30 @ 15:28

Glidos wrote:implemented either in Glide or OpenGL.


Oops! Meant Glide or software.
User avatar
Glidos
l33t
 
Posts: 3114
Joined: 2002-8-08 @ 02:55

Postby Stiletto » 2002-10-01 @ 20:51

Snover wrote:In any case, who said you all could communicate via email and not let everyone in on the juicy details? That's just not nice! ;)


The upshot is Vlad and SaPu (http://sapu.ngemu.com/index_e.html) may have this MSCDEX thing figured out. I'm hangin' on to the technical conversation by the skin of my teeth. :)
"I see a little silhouette-o of a man, Scaramouche, Scaramouche, will you
do the Fandango!" - Queen

Stiletto
User avatar
Stiletto
l33t
 
Posts: 3850
Joined: 2002-7-01 @ 21:57

Postby Stiletto » 2002-10-01 @ 21:30

Glidos wrote:I guess the main problem would be that you could efficiently support only the common capabilities.


Still, depending on the API, that could be quite a lot of functions. I hope someone smarter than me takes a look into this at some point.
"I see a little silhouette-o of a man, Scaramouche, Scaramouche, will you
do the Fandango!" - Queen

Stiletto
User avatar
Stiletto
l33t
 
Posts: 3850
Joined: 2002-7-01 @ 21:57


Return to GliDOS Development

Who is online

Users browsing this forum: No registered users and 1 guest