Flag 256 and Nvidia cards

Blitz3D Forums/Blitz3D Programming/Flag 256 and Nvidia cards

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.

Ok now, this is kinda worrying me, I didn't know this
was so frequent, much of my gameplay is based on
writing things and getting clues from dynamically
created textures ... damn it ... if this doesn't work
properly then the whole game is a mess...


Could you tell me if anyone get an absurd slowdown
with this code (w/wo 256) or if anyone by any reason
get nothing written to the texture??? you should only see
some rects being drawn to the texture:


Graphics3D 800,600,16,2

Const FPS=30

cam=CreateCamera()
	CameraRange cam,.01,200
	PositionEntity cam,0,0,-4
	CameraClsColor cam,0,0,100

c=CreateCube()
	EntityFX c,1

;texture:
;try with and without 256 flag
tex=CreateTexture(512,512,1+256)
	EntityTexture c,tex
;----------------------------------------

period=1000/FPS
time=MilliSecs()-period
MoveMouse 320,240

While Not KeyDown(1)

	;------ Framerate Counter ----------
	fps_count=fps_count+1
	fps_timer=fps_timer+(MilliSecs()-fps_millis)
	fps_millis=MilliSecs()
	If fps_timer>1000
	fps_timer=0:fpsc=fps_count:fps_count=0
	EndIf
	;---------------------------------------


	;---
	Repeat
		elapsed=MilliSecs()-time
	Until elapsed

	;how many 'frames' have elapsed	
	ticks=elapsed/period
	
	;fractional remainder
	tween#=Float(elapsed Mod period)/Float(period)
	
	For k=1 To ticks
		time=time+period
		If k=ticks Then CaptureWorld
	;---

	TurnEntity c,.1,.2,.3

	If KeyDown(200) MoveEntity cam,0,0,.2
	If KeyDown(208) MoveEntity cam,0,0,-.2
	If KeyDown(203) MoveEntity cam,-.2,0,0
	If KeyDown(205) MoveEntity cam,.2,0,0
	TurnEntity cam,MouseYSpeed()/6.0,-MouseXSpeed()/6.0,0
	RotateEntity cam,EntityPitch(cam),EntityYaw(cam),0
	MoveMouse GraphicsWidth()/2,GraphicsHeight()/2

	Color 50,50,0:Rect 0,0,512,512,1
	For a=1 To 40
		Color Rand(0,255),Rand(0,255),Rand(0,255)
		Rect Rand(20,500),Rand(0,500),Rand(2,100),Rand(2,100),1
	Next
	Color 0,0,0:Rect 0,0,512,512,0:Rect 1,1,510,510,0:Rect 2,2,508,508,0
	CopyRect 0,0,512,512,0,0,BackBuffer(),TextureBuffer(tex)
	
	UpdateWorld
	
	;---
	Next
	;---
	
	RenderWorld tween
	
	Color 255,255,255
	Text 10,10,"fps:"+fpsc
	
	Flip
Wend
End