Good Morning, (or day/evening whatever time it is wherever you are)
I thought it more appropriate to post this here, rather than in the showcase
area.
The following code looks like it doesn't work on some machines. Could people
please test this, and let me know if it works or falls over, preferably
running in debug mode. All it should do is create a texture, write to that texture
then exit. If nothing happens when you run the code that is good, and as
it should be.
If it gives an error, can you show which line it did so on, and also what
your graphics hardware is - intel on board video do not seem to like this.
Further - if this is a bug in blitz3d, not in my code, then I will post
this in the bugs thread.
Am I doing something the wrong way/or a way I shouldn't be doing it in?
Thanks,
Matt
I thought it more appropriate to post this here, rather than in the showcase
area.
The following code looks like it doesn't work on some machines. Could people
please test this, and let me know if it works or falls over, preferably
running in debug mode. All it should do is create a texture, write to that texture
then exit. If nothing happens when you run the code that is good, and as
it should be.
If it gives an error, can you show which line it did so on, and also what
your graphics hardware is - intel on board video do not seem to like this.
Further - if this is a bug in blitz3d, not in my code, then I will post
this in the bugs thread.
Am I doing something the wrong way/or a way I shouldn't be doing it in?
Thanks,
Matt
graphics3d 800,600,32 AlphaTexture=createTexture(256,256,2+16+32) setbuffer texturebuffer(AlphaTexture) lockbuffer For Y=0 To 255 For X=0 To 255 WritePixelFast x,y,0 If y>180 And y<212 Then If x>112 And x<144 Then distance#=Sqr((x-128)^2+(y-196)^2) If distance<=10 Then WritePixelFast x,y,127 Shl 24 Else If distance<=16 Then WritePixelFast x,y,63 Shl 24 Else If distance<=18 Then WritePixelFast x,y,31 Shl 24 Else WritePixelFast x,y,0 EndIf EndIf EndIf EndIf EndIf Next Next UnlockBuffer SetBuffer BackBuffer() end