D3DXCreateTeapot and reverse engineering?

Roderick Colenbrander thunderbird2k at gmail.com
Sun Jul 18 15:56:32 CDT 2010


On Sun, Jul 18, 2010 at 11:05 AM, Misha Koshelev <misha680 at gmail.com> wrote:
> Dear All:
>
> I just wanted to double check before I do anything with
> D3DXCreateTeapot.
>
> I have several options for implementing this:
>
> Option A
> --------
> One, the slightly harder option, involves the original dataset:
> http://www.sjbaker.org/teapot/teaset.tgz
>
> Option B
> --------
> Another, much simpler method, would be to:
> a) Call D3DXCreateTeapot
> b) D3DXCreateTeapot returns a vertex and index buffer
> c) I can easily use these to create a header file that _exactly_
> reproduces the vertices and indices created by Windows.
>
> My question: is Option B allowed, and if not, why not?
>
> Thank you
> Misha
>

Others have mentioned before that the only 'reverse' engineering
method we allow is black box reverse engineering. Technically this is
black box, but I would say that you can't use the output because of
copyright reasons.

I think we are entering some gray area. It might be good to get some
answers, here some examples:
- Lets say Wine lacks a font e.g. 'Arial' which we need for some
reason. Are we allowed to let Window render text in this font and read
back the glyph data?
- Lets say Wine had ugly icons in the common dialogs. We could
probably create some test to draw a file open dialog on Windows and
read back icons. Is this fine?
- Lets say MS decided to make the default background color of a window
'pink'. Would we be allowed to use this exact same color of pink (you
could make a screenshot, write a test or whatever)?

I would say the answer to the first two questions is 'No' for certain
because of copyrights. I'm not sure about the last one but I guess it
is fine because right now we use the same colors as Windows, Where do
we have to draw the line?


Personally I would go for option A. Do applications really need the
exact data? I remember the teapot in some d3d SDK examples (I believe
at least in some teapot cubemap one) and one or more demos at
codesampler.com. Apparently some game mentioned in the book needs it
(I guess it is a joke from the programmers.... who seriously uses this
call), typically it are only demos which use it. BTW glut should have
the teapot as well, if it is under a usable license and it is easier
to use, consider using it.

Even if going for A, I'm not sure how Alexandre wants to have it
implemented. A few kilobyte of static data isn't fun. If there was a
way to express it in a number of equations, that might be better but
you would have to ask him.

Roderick



More information about the wine-devel mailing list