Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 2 of 2

Thread: Cone in Cpw

  1. #1
    Junior Member Newbie
    Join Date
    Feb 2002
    Location
    Horgen, Switzerland
    Posts
    1

    Cone in Cpw

    I'm new to OpenGL and Cpw.
    I can easely draw primitives (spheres, circle, torus etc.) using Cpw, ** BUT A CONE **. My settings are:
    CPW_PRIMOPT_SIZE, 1.0
    CPW_PRIMOPT_RADIUS, 1.0
    CPW_PRIMOPT_INNERRADIUS, 0.5
    CPW_PRIMOPT_OUTERRADIUS, 1.0
    CPW_PRIMOPT_TOPRADIUS, 1.0
    CPW_PRIMOPT_BASERADIUS, 1.0
    CPW_PRIMOPT_WIDTH, 1.0
    CPW_PRIMOPT_HEIGHT, 1.0
    CPW_PRIMOPT_SLICES, 20.0
    CPW_PRIMOPT_STACKS, 20.0
    CPW_PRIMOPT_SCALE, 1.0

    I tried other values as well. I assume I'm making a newbie error. Which one??

    roh

  2. #2
    Junior Member Regular Contributor
    Join Date
    Feb 2002
    Posts
    133

    Re: Cone in Cpw

    Hey Roh,

    Your right, you can't. I did a test and
    realized some of the options you set for
    cones were not correct. I've updated the
    source, win32bins, and demo download on
    the Cpw site.
    http://www.mathies.com/cpw/

    I also updated the overunder conformance
    demo so it draws a cone for an example.
    There are also a few new demos in the
    'demos' dir, including a volumetric
    fog demo and lightmap demo.

    The correct way to do a cone is as such:

    cpwSetPrimitiveOpt( cpw, CPW_PRIMOPT_BASERADIUS, 0.5 );
    cpwSetPrimitiveOpt( cpw, CPW_PRIMOPT_TOPRADIUS, 2.0 );
    cpwSetPrimitiveOpt( cpw, CPW_PRIMOPT_HEIGHT, 10.0 );
    cpwSetPrimitiveOpt( cpw, CPW_PRIMOPT_SLICES, 20.0 );
    cpwSetPrimitiveOpt( cpw, CPW_PRIMOPT_STACKS, 20.0 );
    cpwDrawPrimitive( cpw, CPW_PRIM_3D_WIRECONE );

    Hope this fixes your problem.

    Regards,
    Jim


    [This message has been edited by jmathies (edited 02-08-2002).]
    --
    Jim Mathies http://www.mathies.com/

    \"The best way to predict the future is to invent it."

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •