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: Ray Picking base DX8.X and OpenGL

  1. #1
    Junior Member Newbie
    Join Date
    Apr 2003
    Posts
    2

    Ray Picking base DX8.X and OpenGL

    Hi!
    I am working on developing a 3D rendering engine base both DirectX8.0 and OpenGL,which allow user to select between the two 3D API. I am programing on Win2K+VC++6.0 environment.Now I want to implement ray picking objects by mouse and the objects would be transformed in world space.I known there is a sample about Ray Picking with Object Transformations,following:
    http://www.mvps.org/directx/articles...ay_picking.htm

    But I don't known how I can implement same function base OpenGL because there is no independent world and view transformation matrix can be get.Can anybody give me some hints about this?The key problem I want to solve is how to convert 2D mouse to a 3D ray.
    Then I can test intersection between the objects of scene and the ray and determine the selected objects.

    Thanks in advance
    Best Regards
    Herbert

  2. #2
    Intern Contributor
    Join Date
    Apr 2003
    Posts
    61

    Re: Ray Picking base DX8.X and OpenGL

    OpenGL has "picking" commands that might be easier (and faster?) than trying to do what you suggest. But I really have no idea since I'm fairly new to this. GameTutorials.com has some demos that show how to test for collisons, but I don't know if those will help you.

Posting Permissions

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