Results 1 to 1 of 1

Thread: Array CVx...

  1. #1
    thinBasic MVPs
    Join Date
    Oct 2012
    Location
    Germany
    Age
    54
    Posts
    1,533
    Rep Power
    171

    Array CVx...

    This time it's the following:

    I want to create stuff in 3d. OpenGL awaits Float-Type (Single) to be passed.

    The problem here is, singles/floats are way too unprecise for calculations so i need the data at least as Double, else i would have to bother with unfitting seams and graphical glitches.

    The Vertex-udt consists of 3 Singles but data is stored at heap, so i can place a straight virtual Array of Singles upon.

    I would like to store the data as Double - because of the known reasons - but i have to pass the array as Single to OpenGL.

    Now i have the option to place an array of Doubles onto my data, dim another array of Single with the same number of elements and assign them one by one, so my Double-Array becomes a Single-Array finally.

    Now I wonder if there weren't a smarter and faster way to cast the whole array-content of Type Double into another array of Type Single...?
    Last edited by ReneMiner; 29-10-2014 at 13:33.
    I think there are missing some Forum-sections as beta-testing and support

Similar Threads

  1. Array Bounds
    By peter in forum thinBasic General
    Replies: 7
    Last Post: 05-11-2012, 08:02
  2. copy array of UDT to another array in one step?
    By ReneMiner in forum thinBasic General
    Replies: 3
    Last Post: 02-11-2012, 01:15
  3. array and memory...
    By Oscar Ugolini in forum thinBasic General
    Replies: 2
    Last Post: 20-09-2012, 09:34
  4. Using MAT on an array within a Union
    By dcromley in forum Core module
    Replies: 5
    Last Post: 09-04-2009, 11:51
  5. ARRAY SHUFFLE??
    By marcuslee in forum Core module
    Replies: 18
    Last Post: 07-09-2008, 05:30

Members who have read this thread: 0

There are no members to list at the moment.

Posting Permissions

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