Skip to main content
GameDev.net gamedev.net
🔒 Locked

vb6/d3d8 Optional Texture

Started by md_lasalle Apr 28, 2004 at 10:10 AM 1 replies 250+ views
Original Post
md_lasalle
md_lasalle
Hi, i have a little sub that can take a Texture as a parameter... Public Sub Render(DxDev As Direct3DDevice8, Optional dTexture As Direct3DTexture8, Optional StartSegment As Long, Optional EndSegment As Long) The reason i''m doing that is that if i dont pass a texture, i dont want the device to switch texture(for optimization you know) im able to test the StartSegement parameter because it is a long,but since dTexture is a Direct3DTexture8, i cannot test Len(dTexture) or IsObject(dTexture)... So how would I test if the dTexture parameter as been used? Thanks.
Tom
Tom

If Not (dTexture Is Nothing) Then
   &nbspCall DxDev.SetTexture(0&, dTexture)
End If
GDNet+. It's only $5 a month. You know you want it.
md_lasalle
md_lasalle
Thanks Tom! that worked Great!

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.