WritePixels3D?

Blitz3D Forums/Blitz3D Programming/WritePixels3D?

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Try using 128x128. Directx don't like textures that aren't even multiples of 2.
2,4,8,16,32,64,128,256,512,1024,etc.
I don't know if that will solve your problem but it will get rid of a
possible other problem.
Here is an example of how I create a texture on the fly with writepixel, maybe it will help.
You can even write the pixels after the texture is applied to something,
and you will see the changes take effect in front of you. NOTE rca is the Alpha byte.
Also the SetBuffer commands are very important.
Here is the code:

ts=512 ;Texture creation using WritePixel
tex57=CreateTexture (ts,ts,1)
SetBuffer TextureBuffer (tex57,0)
For cdy= 0 To ts-1
For cdx= 0 To ts-1
rca=255
rcg=Rnd(100,255)
;If rcg<70 Then rcg=0
rcr=rcg
rcb=rcg
argb=0 ;clear color
argb=(rca Shl 24) Or (rcr Shl 16) Or (rcg Shl 8) Or (rcb)
;If rcg<74 Then argb=0 ;just to be sure lots of black
WritePixel cdx,cdy,argb

Next
Next

SetBuffer BackBuffer()

Roger WillKoh Over and Out.