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: howto render 3d image from raytracing dataset

  1. #1
    Junior Member Newbie
    Join Date
    Jan 2009
    Posts
    1

    howto render 3d image from raytracing dataset

    Hi..
    I have a raw dataset that I'm supposed to raytrace with cuda to make 3d images.. I have a quite decent idea on how to ray trace.. but I can't figure out how to get make the image using openGL

    any idea's on how to do this.. as far as I can see from some forums, ppl suggest PBO.. but how do I get the data into a PBO, and then how do I render it?

    KG

  2. #2
    Advanced Member Frequent Contributor
    Join Date
    Feb 2006
    Location
    Sweden
    Posts
    744

    Re: howto render 3d image from raytracing dataset

    the easiest way is probably using glTexSubImage2D
    Just create a texture of an appropriate size and then just update the data as you wish, works great.
    Here is what i use.
    glTexSubImage2D(GL_TEXTURE_2D,0,0,y-rows,512,rows,GL_RGB,GL_FLOAT,&data[0]);
    where y is the last row i am on and rows is how many rows per batch i am updating.

Posting Permissions

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