Re: VertexBuffer

From: Johan Blomgren (j.blomgren(nospam)_at_spray.se)
Date: 10/19/04


Date: Tue, 19 Oct 2004 07:17:05 -0700

Actually, it didn't work as i thought before =(
If i first create my buffer with the CustomVertex.PositionNormalTextured and
then i change the code to use the sbyte, it seems to work. But after a couple
of runs, it
doesn't display anything onto the screen.
Could this be a bug in D3D?

So, once again any help would be appriciated =)
Cheers

"Jarred Nicholls" wrote:

> You're welcome.
>
> "Johan Blomgren" <j.blomgren(nospam)@spray.se> wrote in message
> news:B01C3742-B212-4CE3-BF80-876557317E6C@microsoft.com...
> > thanks,
> > it worked !
> >
> > "Jarred Nicholls" wrote:
> >
> >> try replacing 'byte' with 'sbyte' ?
> >>
> >> -Jarred
> >>
> >> "Johan Blomgren" <j.blomgren(nospam)@spray.se> wrote in message
> >> news:7936517A-701F-49F4-A5A2-87C7F0A30481@microsoft.com...
> >> > Hi,
> >> > Does anyone know why i can't create my vertexbuffer like this?:
> >> >
> >> > _sizeInBytes is 32bytes ( CustomVertex.PositionNormalTextured )
> >> > _numVertices is 4
> >> > _format is correct and the same as CustomVertex.PositionNormalTextured
> >> >
> >> > this._buffer = new Microsoft.DirectX.Direct3D.VertexBuffer( typeof(
> >> > byte ),
> >> > this._sizeInBytes * this._numVertices,
> >> > Device,
> >> > Usage.WriteOnly,
> >> > this._format,
> >> > Pool.Default );
> >> >
> >> > It only works when i create it like this:
> >> >
> >> > this._buffer = new Microsoft.DirectX.Direct3D.VertexBuffer( typeof(
> >> > CustomVertex.PositionNormalTextured ),
> >> > this._numVertices,
> >> > Device,
> >> > Usage.WriteOnly,
> >> > this._format,
> >> > Pool.Default );
> >> >
> >> > Have i missed something? Any help would be appreciated
> >> > Cheers
> >> >
> >> >
> >>
> >>
> >>
>
>
>