Hi Luigi,

I don't know whether this would be an OpenGL driver issue or an OSG one.
Neither are going to like byte vertex data very much though as both are
written around vertex data being a float property.

Robert.

On Thu, Apr 16, 2009 at 1:58 AM, Luigi Calori <[email protected]> wrote:

> Probably a newbie question:
>
> Is it possible to store vertex data in byte array like Vec3bArray ?
>
> I' ve tried but it seem not allowed: I obtain crash when call
> setVertexArray
> Is it something dependent on driver?
>
> I attach two sample files, short working, byte hanging
>
> Thanks
>               Luigi
>
> Group {
>  UniqueID Group_0
>  nodeMask 0xffffffff
>  cullingActive TRUE
>  num_children 2
>  ClearNode {
>    nodeMask 0xffffffff
>    cullingActive FALSE
>    StateSet {
>      DataVariance STATIC
>      rendering_hint DEFAULT_BIN
>      renderBinMode USE
>      binNumber -1
>      binName RenderBin
>    }
>    requiresClear TRUE
>    clearColor 0 0 0 1
>    clearMask 16640
>  }
>  Geode {
>    nodeMask 0xffffffff
>    cullingActive TRUE
>    StateSet {
>      DataVariance STATIC
>      rendering_hint DEFAULT_BIN
>      renderBinMode INHERIT
>      GL_LIGHTING OFF
>      GL_DEPTH_TEST OFF
>      GL_BLEND ON
>      0x8861 ON
>      Point {
>        size 20
>        fade_threshold_size  1
>        distance_attenuation  1 0 0
>      }
>      BlendFunc {
>        source SRC_ALPHA
>        destination DST_ALPHA
>      }
>      textureUnit 0 {
>        GL_TEXTURE_2D ON
>        Texture2D {
>          file "Images/particle.rgb"
>          wrap_s CLAMP
>          wrap_t CLAMP
>          wrap_r CLAMP
>          min_filter LINEAR_MIPMAP_LINEAR
>          mag_filter LINEAR
>          maxAnisotropy 1
>          borderColor 0 0 0 0
>          borderWidth 0
>          useHardwareMipMapGeneration TRUE
>          unRefImageDataAfterApply FALSE
>          internalFormatMode USE_IMAGE_DATA_FORMAT
>          resizeNonPowerOfTwo TRUE
>        }
>        PointSprite {
>          coordOriginMode UPPER_LEFT
>        }
>      }
>    }
>    num_drawables 1
>    Geometry {
>      DataVariance STATIC
>      useDisplayList TRUE
>      useVertexBufferObjects FALSE
>      PrimitiveSets 1
>      {
>        DrawArrays POINTS 0 128
>      }
>      VertexArray Vec3sArray 128
>      {
>        0 11 2 3 16 0
>        7 18 -8 15 14 9
>        16 10 -10 4 0 -3
>        5 4 -8 16 8 -11
>        3 9 2 7 9 2
>        7 15 -8 4 4 2
>        20 19 7 5 2 4
>        24 22 0 5 -1 -4
>        22 9 8 10 11 8
>        17 14 5 0 0 -7
>        12 10 -7 8 -7 6
>        10 14 4 6 4 3
>        14 14 0 10 -1 6
>        18 14 3 8 -4 1
>        14 20 0 0 -8 3
>        11 34 -4 13 -7 1
>        9 16 -4 13 -5 5
>        1 34 0 15 -10 -4
>        15 30 3 6 0 0
>        -1 21 -3 21 -8 0
>        7 26 1 13 -6 2
>        4 27 3 12 -10 -4
>        -1 31 4 20 -15 4
>        -3 24 3 23 -9 -1
>        -7 22 2 36 -10 0
>        -15 30 0 35 -7 3
>        -20 34 0 32 -13 -2
>        -6 25 2 36 -8 -3
>        -23 25 -1 31 8 -1
>        -24 22 0 43 5 1
>        -23 8 2 28 -4 2
>        -26 5 -2 41 -2 0
>        -16 13 0 42 1 -2
>        -18 2 0 40 7 0
>        -20 -3 1 42 25 2
>        -29 -3 0 36 29 3
>        -30 -1 2 34 22 -2
>        -14 -11 0 36 32 -1
>        -18 -8 0 40 30 0
>        -12 -7 0 42 38 0
>        -24 -13 -1 38 45 -1
>        -13 -17 0 37 38 -2
>        -8 -22 1 35 48 -2
>        -8 -19 1 38 49 -2
>        -3 -20 -1 22 51 -1
>        -10 -24 -1 29 57 0
>        -7 -42 0 21 60 0
>        3 -39 -1 13 55 0
>        14 -40 1 16 66 1
>        10 -28 1 -2 49 0
>        21 -29 0 -8 65 0
>        16 -37 2 -9 53 0
>        32 -44 0 -9 54 1
>        34 -38 0 -10 56 0
>        29 -29 1 -27 56 0
>        49 -31 0 -26 57 0
>        57 -26 -1 -35 46 1
>        62 -23 -2 -42 42 0
>        49 -14 0 -30 43 1
>        51 -24 -1 -36 39 -1
>        57 -10 0 -47 28 0
>        73 -1 1 -46 29 1
>        62 0 -1 -51 16 1
>        62 2 0 -50 12 -1
>      }
>      ColorBinding PER_VERTEX
>      ColorArray Vec4Array 128
>      {
>        1 1 0 0.5
>        1 1 0 0.5
>        0.984375 0.984375 0.015625 0.507813
>        0.984375 0.984375 0.015625 0.507813
>        0.96875 0.96875 0.03125 0.515625
>        0.96875 0.96875 0.03125 0.515625
>        0.953125 0.953125 0.046875 0.523438
>        0.953125 0.953125 0.046875 0.523438
>        0.9375 0.9375 0.0625 0.53125
>        0.9375 0.9375 0.0625 0.53125
>        0.921875 0.921875 0.078125 0.539063
>        0.921875 0.921875 0.078125 0.539063
>        0.90625 0.90625 0.09375 0.546875
>        0.90625 0.90625 0.09375 0.546875
>        0.890625 0.890625 0.109375 0.554688
>        0.890625 0.890625 0.109375 0.554688
>        0.875 0.875 0.125 0.5625
>        0.875 0.875 0.125 0.5625
>        0.859375 0.859375 0.140625 0.570313
>        0.859375 0.859375 0.140625 0.570313
>        0.84375 0.84375 0.15625 0.578125
>        0.84375 0.84375 0.15625 0.578125
>        0.828125 0.828125 0.171875 0.585938
>        0.828125 0.828125 0.171875 0.585938
>        0.8125 0.8125 0.1875 0.59375
>        0.8125 0.8125 0.1875 0.59375
>        0.796875 0.796875 0.203125 0.601563
>        0.796875 0.796875 0.203125 0.601563
>        0.78125 0.78125 0.21875 0.609375
>        0.78125 0.78125 0.21875 0.609375
>        0.765625 0.765625 0.234375 0.617188
>        0.765625 0.765625 0.234375 0.617188
>        0.75 0.75 0.25 0.625
>        0.75 0.75 0.25 0.625
>        0.734375 0.734375 0.265625 0.632813
>        0.734375 0.734375 0.265625 0.632813
>        0.71875 0.71875 0.28125 0.640625
>        0.71875 0.71875 0.28125 0.640625
>        0.703125 0.703125 0.296875 0.648438
>        0.703125 0.703125 0.296875 0.648438
>        0.6875 0.6875 0.3125 0.65625
>        0.6875 0.6875 0.3125 0.65625
>        0.671875 0.671875 0.328125 0.664063
>        0.671875 0.671875 0.328125 0.664063
>        0.65625 0.65625 0.34375 0.671875
>        0.65625 0.65625 0.34375 0.671875
>        0.640625 0.640625 0.359375 0.679688
>        0.640625 0.640625 0.359375 0.679688
>        0.625 0.625 0.375 0.6875
>        0.625 0.625 0.375 0.6875
>        0.609375 0.609375 0.390625 0.695313
>        0.609375 0.609375 0.390625 0.695313
>        0.59375 0.59375 0.40625 0.703125
>        0.59375 0.59375 0.40625 0.703125
>        0.578125 0.578125 0.421875 0.710938
>        0.578125 0.578125 0.421875 0.710938
>        0.5625 0.5625 0.4375 0.71875
>        0.5625 0.5625 0.4375 0.71875
>        0.546875 0.546875 0.453125 0.726563
>        0.546875 0.546875 0.453125 0.726563
>        0.53125 0.53125 0.46875 0.734375
>        0.53125 0.53125 0.46875 0.734375
>        0.515625 0.515625 0.484375 0.742188
>        0.515625 0.515625 0.484375 0.742188
>        0.5 0.5 0.5 0.75
>        0.5 0.5 0.5 0.75
>        0.484375 0.484375 0.515625 0.757813
>        0.484375 0.484375 0.515625 0.757813
>        0.46875 0.46875 0.53125 0.765625
>        0.46875 0.46875 0.53125 0.765625
>        0.453125 0.453125 0.546875 0.773438
>        0.453125 0.453125 0.546875 0.773438
>        0.4375 0.4375 0.5625 0.78125
>        0.4375 0.4375 0.5625 0.78125
>        0.421875 0.421875 0.578125 0.789063
>        0.421875 0.421875 0.578125 0.789063
>        0.40625 0.40625 0.59375 0.796875
>        0.40625 0.40625 0.59375 0.796875
>        0.390625 0.390625 0.609375 0.804688
>        0.390625 0.390625 0.609375 0.804688
>        0.375 0.375 0.625 0.8125
>        0.375 0.375 0.625 0.8125
>        0.359375 0.359375 0.640625 0.820313
>        0.359375 0.359375 0.640625 0.820313
>        0.34375 0.34375 0.65625 0.828125
>        0.34375 0.34375 0.65625 0.828125
>        0.328125 0.328125 0.671875 0.835938
>        0.328125 0.328125 0.671875 0.835938
>        0.3125 0.3125 0.6875 0.84375
>        0.3125 0.3125 0.6875 0.84375
>        0.296875 0.296875 0.703125 0.851563
>        0.296875 0.296875 0.703125 0.851563
>        0.28125 0.28125 0.71875 0.859375
>        0.28125 0.28125 0.71875 0.859375
>        0.265625 0.265625 0.734375 0.867188
>        0.265625 0.265625 0.734375 0.867188
>        0.25 0.25 0.75 0.875
>        0.25 0.25 0.75 0.875
>        0.234375 0.234375 0.765625 0.882813
>        0.234375 0.234375 0.765625 0.882813
>        0.21875 0.21875 0.78125 0.890625
>        0.21875 0.21875 0.78125 0.890625
>        0.203125 0.203125 0.796875 0.898438
>        0.203125 0.203125 0.796875 0.898438
>        0.1875 0.1875 0.8125 0.90625
>        0.1875 0.1875 0.8125 0.90625
>        0.171875 0.171875 0.828125 0.914063
>        0.171875 0.171875 0.828125 0.914063
>        0.15625 0.15625 0.84375 0.921875
>        0.15625 0.15625 0.84375 0.921875
>        0.140625 0.140625 0.859375 0.929688
>        0.140625 0.140625 0.859375 0.929688
>        0.125 0.125 0.875 0.9375
>        0.125 0.125 0.875 0.9375
>        0.109375 0.109375 0.890625 0.945313
>        0.109375 0.109375 0.890625 0.945313
>        0.09375 0.09375 0.90625 0.953125
>        0.09375 0.09375 0.90625 0.953125
>        0.078125 0.078125 0.921875 0.960938
>        0.078125 0.078125 0.921875 0.960938
>        0.0625 0.0625 0.9375 0.96875
>        0.0625 0.0625 0.9375 0.96875
>        0.046875 0.046875 0.953125 0.976563
>        0.046875 0.046875 0.953125 0.976563
>        0.03125 0.03125 0.96875 0.984375
>        0.03125 0.03125 0.96875 0.984375
>        0.015625 0.015625 0.984375 0.992188
>        0.015625 0.015625 0.984375 0.992188
>      }
>    }
>  }
> }
>
> Group {
>  UniqueID Group_0
>  nodeMask 0xffffffff
>  cullingActive TRUE
>  num_children 2
>  ClearNode {
>    nodeMask 0xffffffff
>    cullingActive FALSE
>    StateSet {
>      DataVariance STATIC
>      rendering_hint DEFAULT_BIN
>      renderBinMode USE
>      binNumber -1
>      binName RenderBin
>    }
>    requiresClear TRUE
>    clearColor 0 0 0 1
>    clearMask 16640
>  }
>  Geode {
>    nodeMask 0xffffffff
>    cullingActive TRUE
>    StateSet {
>      DataVariance STATIC
>      rendering_hint DEFAULT_BIN
>      renderBinMode INHERIT
>      GL_LIGHTING OFF
>      GL_DEPTH_TEST OFF
>      GL_BLEND ON
>      0x8861 ON
>      Point {
>        size 20
>        fade_threshold_size  1
>        distance_attenuation  1 0 0
>      }
>      BlendFunc {
>        source SRC_ALPHA
>        destination DST_ALPHA
>      }
>      textureUnit 0 {
>        GL_TEXTURE_2D ON
>        Texture2D {
>          file "Images/particle.rgb"
>          wrap_s CLAMP
>          wrap_t CLAMP
>          wrap_r CLAMP
>          min_filter LINEAR_MIPMAP_LINEAR
>          mag_filter LINEAR
>          maxAnisotropy 1
>          borderColor 0 0 0 0
>          borderWidth 0
>          useHardwareMipMapGeneration TRUE
>          unRefImageDataAfterApply FALSE
>          internalFormatMode USE_IMAGE_DATA_FORMAT
>          resizeNonPowerOfTwo TRUE
>        }
>        PointSprite {
>          coordOriginMode UPPER_LEFT
>        }
>      }
>    }
>    num_drawables 1
>    Geometry {
>      DataVariance STATIC
>      useDisplayList TRUE
>      useVertexBufferObjects FALSE
>      PrimitiveSets 1
>      {
>        DrawArrays POINTS 0 128
>      }
>      VertexArray Vec3bArray 128
>      {
>        0 11 2 3 16 0
>        7 18 -8 15 14 9
>        16 10 -10 4 0 -3
>        5 4 -8 16 8 -11
>        3 9 2 7 9 2
>        7 15 -8 4 4 2
>        20 19 7 5 2 4
>        24 22 0 5 -1 -4
>        22 9 8 10 11 8
>        17 14 5 0 0 -7
>        12 10 -7 8 -7 6
>        10 14 4 6 4 3
>        14 14 0 10 -1 6
>        18 14 3 8 -4 1
>        14 20 0 0 -8 3
>        11 34 -4 13 -7 1
>        9 16 -4 13 -5 5
>        1 34 0 15 -10 -4
>        15 30 3 6 0 0
>        -1 21 -3 21 -8 0
>        7 26 1 13 -6 2
>        4 27 3 12 -10 -4
>        -1 31 4 20 -15 4
>        -3 24 3 23 -9 -1
>        -7 22 2 36 -10 0
>        -15 30 0 35 -7 3
>        -20 34 0 32 -13 -2
>        -6 25 2 36 -8 -3
>        -23 25 -1 31 8 -1
>        -24 22 0 43 5 1
>        -23 8 2 28 -4 2
>        -26 5 -2 41 -2 0
>        -16 13 0 42 1 -2
>        -18 2 0 40 7 0
>        -20 -3 1 42 25 2
>        -29 -3 0 36 29 3
>        -30 -1 2 34 22 -2
>        -14 -11 0 36 32 -1
>        -18 -8 0 40 30 0
>        -12 -7 0 42 38 0
>        -24 -13 -1 38 45 -1
>        -13 -17 0 37 38 -2
>        -8 -22 1 35 48 -2
>        -8 -19 1 38 49 -2
>        -3 -20 -1 22 51 -1
>        -10 -24 -1 29 57 0
>        -7 -42 0 21 60 0
>        3 -39 -1 13 55 0
>        14 -40 1 16 66 1
>        10 -28 1 -2 49 0
>        21 -29 0 -8 65 0
>        16 -37 2 -9 53 0
>        32 -44 0 -9 54 1
>        34 -38 0 -10 56 0
>        29 -29 1 -27 56 0
>        49 -31 0 -26 57 0
>        57 -26 -1 -35 46 1
>        62 -23 -2 -42 42 0
>        49 -14 0 -30 43 1
>        51 -24 -1 -36 39 -1
>        57 -10 0 -47 28 0
>        73 -1 1 -46 29 1
>        62 0 -1 -51 16 1
>        62 2 0 -50 12 -1
>      }
>      ColorBinding PER_VERTEX
>      ColorArray Vec4Array 128
>      {
>        1 1 0 0.5
>        1 1 0 0.5
>        0.984375 0.984375 0.015625 0.507813
>        0.984375 0.984375 0.015625 0.507813
>        0.96875 0.96875 0.03125 0.515625
>        0.96875 0.96875 0.03125 0.515625
>        0.953125 0.953125 0.046875 0.523438
>        0.953125 0.953125 0.046875 0.523438
>        0.9375 0.9375 0.0625 0.53125
>        0.9375 0.9375 0.0625 0.53125
>        0.921875 0.921875 0.078125 0.539063
>        0.921875 0.921875 0.078125 0.539063
>        0.90625 0.90625 0.09375 0.546875
>        0.90625 0.90625 0.09375 0.546875
>        0.890625 0.890625 0.109375 0.554688
>        0.890625 0.890625 0.109375 0.554688
>        0.875 0.875 0.125 0.5625
>        0.875 0.875 0.125 0.5625
>        0.859375 0.859375 0.140625 0.570313
>        0.859375 0.859375 0.140625 0.570313
>        0.84375 0.84375 0.15625 0.578125
>        0.84375 0.84375 0.15625 0.578125
>        0.828125 0.828125 0.171875 0.585938
>        0.828125 0.828125 0.171875 0.585938
>        0.8125 0.8125 0.1875 0.59375
>        0.8125 0.8125 0.1875 0.59375
>        0.796875 0.796875 0.203125 0.601563
>        0.796875 0.796875 0.203125 0.601563
>        0.78125 0.78125 0.21875 0.609375
>        0.78125 0.78125 0.21875 0.609375
>        0.765625 0.765625 0.234375 0.617188
>        0.765625 0.765625 0.234375 0.617188
>        0.75 0.75 0.25 0.625
>        0.75 0.75 0.25 0.625
>        0.734375 0.734375 0.265625 0.632813
>        0.734375 0.734375 0.265625 0.632813
>        0.71875 0.71875 0.28125 0.640625
>        0.71875 0.71875 0.28125 0.640625
>        0.703125 0.703125 0.296875 0.648438
>        0.703125 0.703125 0.296875 0.648438
>        0.6875 0.6875 0.3125 0.65625
>        0.6875 0.6875 0.3125 0.65625
>        0.671875 0.671875 0.328125 0.664063
>        0.671875 0.671875 0.328125 0.664063
>        0.65625 0.65625 0.34375 0.671875
>        0.65625 0.65625 0.34375 0.671875
>        0.640625 0.640625 0.359375 0.679688
>        0.640625 0.640625 0.359375 0.679688
>        0.625 0.625 0.375 0.6875
>        0.625 0.625 0.375 0.6875
>        0.609375 0.609375 0.390625 0.695313
>        0.609375 0.609375 0.390625 0.695313
>        0.59375 0.59375 0.40625 0.703125
>        0.59375 0.59375 0.40625 0.703125
>        0.578125 0.578125 0.421875 0.710938
>        0.578125 0.578125 0.421875 0.710938
>        0.5625 0.5625 0.4375 0.71875
>        0.5625 0.5625 0.4375 0.71875
>        0.546875 0.546875 0.453125 0.726563
>        0.546875 0.546875 0.453125 0.726563
>        0.53125 0.53125 0.46875 0.734375
>        0.53125 0.53125 0.46875 0.734375
>        0.515625 0.515625 0.484375 0.742188
>        0.515625 0.515625 0.484375 0.742188
>        0.5 0.5 0.5 0.75
>        0.5 0.5 0.5 0.75
>        0.484375 0.484375 0.515625 0.757813
>        0.484375 0.484375 0.515625 0.757813
>        0.46875 0.46875 0.53125 0.765625
>        0.46875 0.46875 0.53125 0.765625
>        0.453125 0.453125 0.546875 0.773438
>        0.453125 0.453125 0.546875 0.773438
>        0.4375 0.4375 0.5625 0.78125
>        0.4375 0.4375 0.5625 0.78125
>        0.421875 0.421875 0.578125 0.789063
>        0.421875 0.421875 0.578125 0.789063
>        0.40625 0.40625 0.59375 0.796875
>        0.40625 0.40625 0.59375 0.796875
>        0.390625 0.390625 0.609375 0.804688
>        0.390625 0.390625 0.609375 0.804688
>        0.375 0.375 0.625 0.8125
>        0.375 0.375 0.625 0.8125
>        0.359375 0.359375 0.640625 0.820313
>        0.359375 0.359375 0.640625 0.820313
>        0.34375 0.34375 0.65625 0.828125
>        0.34375 0.34375 0.65625 0.828125
>        0.328125 0.328125 0.671875 0.835938
>        0.328125 0.328125 0.671875 0.835938
>        0.3125 0.3125 0.6875 0.84375
>        0.3125 0.3125 0.6875 0.84375
>        0.296875 0.296875 0.703125 0.851563
>        0.296875 0.296875 0.703125 0.851563
>        0.28125 0.28125 0.71875 0.859375
>        0.28125 0.28125 0.71875 0.859375
>        0.265625 0.265625 0.734375 0.867188
>        0.265625 0.265625 0.734375 0.867188
>        0.25 0.25 0.75 0.875
>        0.25 0.25 0.75 0.875
>        0.234375 0.234375 0.765625 0.882813
>        0.234375 0.234375 0.765625 0.882813
>        0.21875 0.21875 0.78125 0.890625
>        0.21875 0.21875 0.78125 0.890625
>        0.203125 0.203125 0.796875 0.898438
>        0.203125 0.203125 0.796875 0.898438
>        0.1875 0.1875 0.8125 0.90625
>        0.1875 0.1875 0.8125 0.90625
>        0.171875 0.171875 0.828125 0.914063
>        0.171875 0.171875 0.828125 0.914063
>        0.15625 0.15625 0.84375 0.921875
>        0.15625 0.15625 0.84375 0.921875
>        0.140625 0.140625 0.859375 0.929688
>        0.140625 0.140625 0.859375 0.929688
>        0.125 0.125 0.875 0.9375
>        0.125 0.125 0.875 0.9375
>        0.109375 0.109375 0.890625 0.945313
>        0.109375 0.109375 0.890625 0.945313
>        0.09375 0.09375 0.90625 0.953125
>        0.09375 0.09375 0.90625 0.953125
>        0.078125 0.078125 0.921875 0.960938
>        0.078125 0.078125 0.921875 0.960938
>        0.0625 0.0625 0.9375 0.96875
>        0.0625 0.0625 0.9375 0.96875
>        0.046875 0.046875 0.953125 0.976563
>        0.046875 0.046875 0.953125 0.976563
>        0.03125 0.03125 0.96875 0.984375
>        0.03125 0.03125 0.96875 0.984375
>        0.015625 0.015625 0.984375 0.992188
>        0.015625 0.015625 0.984375 0.992188
>      }
>    }
>  }
> }
>
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to