Results 1 to 2 of 2

Thread: Accessing the corner points of a 3D object

  1. #1
    Junior Member
    Join Date
    Mar 2011

    Accessing the corner points of a 3D object

    I hope that someone here can help. I am trying to produce a simple 3D game using WebGL, but I have one major issue. I have not been able to come up with a good boundary checking method. Unlike in a 2D space where it is relatively easy to calculate where all of the relevant points are, in the 3D space I have to worry about perspective altering the relative location of all of the points of my object. So the question that I am asking is, is there either a good way of accessing the precalculated values of the points of let us say a cubeís corners or is there a good way of calculating these points myself? Any help I can receive on this would be much appreciated, I am actually writing this for a class, and itís due soon. Thanks

  2. #2
    Junior Member
    Join Date
    Mar 2011

    Re: Accessing the corner points of a 3D object

    I am sorry about double posting, but I figured out a way to make what I am asking a bit clearer. What I am specifically trying to do is access the values stored in a WebGLBuffer as if they were stored in an array. The reason for this is that I know that the data that I want is in the buffer, I wrote the original data into it, and rather then calculating the data separately I would rather just read the data back out of the buffer after is has been altered appropriately. That said, I have been looking all through the WebGL spec and the OpenGL ES spec, and can only find functions which write to a buffer, nothing that can read back from one. If anyone has some creative ideas for how to do this, I would love to hear them.

    Thanks again!

Similar Threads

  1. drawElements with gl.POINTS
    By anvaka in forum Developers Coding:Beginner
    Replies: 1
    Last Post: 05-31-2012, 12:15 PM
  2. Maximum number of points allowed on drawArrays(POINTS)
    By pion in forum Developers Coding:Beginner
    Replies: 3
    Last Post: 01-14-2011, 08:26 PM

Posting Permissions

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