I try a few polys first, before I start with meshgenerating code
but UV is wrong, I animate UV coordinates also
also after I have tested several times, it seems texture doesnt work at all, must be doing something wrong, wasting resources everytime its run, which adds up, I am using trianglestrips
floor is working, so is bg sky and one poly, but the other is stretching texture, so I tried and it stretches texture in the other direction
I have a few calls to render trianglestrips and few datasections
also wonder right settings for this partially transparent texture, to make hardware use transparency

 vertices2   CUSTOMVERTEX <20.0f , 10.0f, 50.0f, 1.0f,0.0f,0.0f>,\     
                            <640.0f , 10.0f , 50.0f,1.0f, 1.0f,0.0f>,\
                            <20.0f  , 500.0f , 50.0f,1.0f, 0.0f, 1.0f>,\
                            FLOAT 24 dup (1.0f) ;verticescliff is copied here after being tampered with
                            FLOAT 24 dup (1.0f) ;so is verticescliff2
                            FLOAT 6 dup (1.0f)
verticessky CUSTOMVERTEX <0.0f , 0.0f, 1.0f, 1.0f,0.0f,0.0f>,\    ;verticessky is not copied or tampered with
                            <640.0f , 0.0f , 1.0f,1.0f, 1.0f,0.0f>,\
                            <0.0f  , 250.0f , 1.0f,1.0f, 0.0f, 0.5f>,\
                            verticessky2 CUSTOMVERTEX <0.0f , 0.0f, 1.0f, 1.0f,0.0f,0.0f>,\   
                            <640.0f , 0.0f , 1.0f,1.0f, 1.0f,0.0f>,\
                            <0.0f  , 250.0f , 1.0f,1.0f, 0.0f, 0.5f>,\

                            FLOAT 30 dup (1.0f)
  vertices  CUSTOMVERTEX <-640.0f , 250.0f  , 100.0f,1.0f, 0.0f,0.0f>,\  ; Sealevel   
                            <640.0f , 250.0f , 100.0f,1.0f, 1.0f,0.0f>,\
                            <-640.0f  , 500.0f ,1.0f,1.0f, 0.0f, 1.0f>,\
  verticescliff CUSTOMVERTEX  <-640.0f,-200.0f,100.0f,1.0f,0.0f,0.0f>,\
  verticescliff2 CUSTOMVERTEX  <630.0f,500.0f,100.0f,1.0f,0.0f,0.0f>,\

and here is api calls in render proc

        pcall lpd3dDevice.SetStreamSource, 0, lpVB, 0, sizeof(CUSTOMVERTEX)
        pcall lpd3dDevice.SetFVF, D3DFVF_CUSTOMVERTEX
        pcall lpd3dDevice.DrawPrimitive, D3DPT_TRIANGLESTRIP, 7,9;bgsky
        pcall lpd3dDevice.SetTexture, 0, lpTexture
        pcall lpd3dDevice.DrawPrimitive, D3DPT_TRIANGLESTRIP, 0,2 ;floorquad

        pcall lpd3dDevice.DrawPrimitive, D3DPT_TRIANGLESTRIP, 3,4 ;left cliffs
        pcall lpd3dDevice.DrawPrimitive, D3DPT_TRIANGLESTRIP, 4,6 ;right cliffs
Posted on 2005-12-09 10:13:00 by daydreamer
The second and third parameters to DrawPrimitive seem to be messed up.

pcall lpd3dDevice.DrawPrimitive, D3DPT_TRIANGLESTRIP, 0*size CUSTOMVERTEX,2 ;floorquad
pcall lpd3dDevice.DrawPrimitive, D3DPT_TRIANGLESTRIP, 3*size CUSTOMVERTEX,1 ;left cliffs
pcall lpd3dDevice.DrawPrimitive, D3DPT_TRIANGLESTRIP, 4*size CUSTOMVERTEX,1 ;right cliffs

or anything similiar. The left cliffs should work now. Remember that the second param is a starting VERTEX not object. if you're drawing trianglestrips, then first triangle is 3 = vertices, but every next triangle requires only 1 additional vertex.

consider switching to triangle list.
Posted on 2005-12-09 10:57:32 by ti_mo_n
I found it: I only animate U coordinates, so V coordinates for anything than floorquad that had corrrect data was fixed at 1.0f,1.0f by those dup, I merely forgot to copy V coordinates in the part that animates/meddles with original meshes
Posted on 2005-12-11 10:24:58 by daydreamer
it works fine with loading 256mb a32r32g32b32 texture from file, but I try to write a header for a small 128bit texture in memory, but it generates a gp when I try with loadtexturefrommem, any help would be welcome and if it works I can share a spinoff from my project in form of platform for people who want to try write SSE code that renders such textures and a 3d assisted 2d, w all hardware filters applied making your 2d game look better, than with ddraw/GDI

Posted on 2005-12-11 10:49:39 by daydreamer
Are you using D3DXCreateTextureFromFileInMemoryEx ? Check the return value.
Posted on 2005-12-11 12:24:06 by ti_mo_n