[Bug 22918] Ship Simulator 2008 demo crashes on startup (needs D3DXCreateSphere, D3DXCreateCylinder, and D3DXCreateTeapot)

wine-bugs at winehq.org wine-bugs at winehq.org
Fri Jul 16 15:29:49 CDT 2010


http://bugs.winehq.org/show_bug.cgi?id=22918





--- Comment #15 from Henri Verbeet <hverbeet at gmail.com>  2010-07-16 15:29:49 ---
(In reply to comment #14)
>     /* top cap */
>     theta = M_PI / 2;
>     for (slice=0;slice<slices;slice++)
>     {
>         vertex_data[vertex].position.x = radius*cos(theta);
>         vertex_data[vertex].position.y = radius*sin(theta);
>         vertex_data[vertex].position.z = z;
>         vertex_data[vertex].normal.x = 0.0f;
>         vertex_data[vertex].normal.y = 0.0f;
>         vertex_data[vertex].normal.z = -1.0f;
>         vertex++;
>         theta += theta_step;
>     }
> 
> Thus, it seems that if I made a helper function, it would only be useful in the
> main loop and not the cap calculations... or am I missing something?
> 
No, you're right, the x and y components of the normal are 0.0f for the caps.
You could still have separate helper functions for the main loop and caps, and
perhaps you can share some code with spheres, but that's probably less
interesting at this point.

-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.



More information about the wine-bugs mailing list