Skip to main content
gamedev.net
🔒 Locked

floating point textures

Started by ofer 8 replies 1.1k views
Original Post
ofer
ofer
hi, i want to fill a floating-point texture. i have an accsses violation in my code, which is logical, since i dont really know what i am doing. so here is my code, it is short, maybe someone here can give me a hint. create the texure: hr = D3DXCreateTexture(m_pd3dDevice, 64, 64, 1, 0, D3DFMT_G32R32F, D3DPOOL_MANAGED, &m_pBumpMap ); Fill it : int i,j; D3DLOCKED_RECT Rect; m_pBumpMap->LockRect(0,&Rect, 0, 0); for (i=0; i<64; i++) { float *Tex = ( ( (float*) Rect.pBits + Rect.Pitch * i ) ); for (j=0; j<64; j++) { D3DXVECTOR2 Normal( m_cN[ OffsetWrap(j,i) ].real(), m_cN[ OffsetWrap(j,i) ].imag() ); *Tex = Normal.y; Tex++; *Tex = Normal.x; Tex++; } } m_pBumpMap->UnlockRect(0); thnx. [edited by - ofer on February 17, 2003 12:36:18 PM]
ofer
ofer
anybody?
thedo
thedo
Does your hardware support floating point textures?

Neil

WHATCHA GONNA DO WHEN THE LARGEST ARMS IN THE WORLD RUN WILD ON YOU?!?!
WHATCHA GONNA DO WHEN THE LARGEST ARMS IN THE WORLD RUN WILD ON YOU?!?!
ofer
ofer
yes, thats not the issue.
thedo
thedo
what line does it access violate on?

Neil

WHATCHA GONNA DO WHEN THE LARGEST ARMS IN THE WORLD RUN WILD ON YOU?!?!
WHATCHA GONNA DO WHEN THE LARGEST ARMS IN THE WORLD RUN WILD ON YOU?!?!
ofer
ofer
i guess so. i found another method, which ill try soon.
ababkin
ababkin
So any luck so far , anyone?
I''ve tried to create a 16x16x16x16 bits texture (dont remember the exact format declaration constant name) and it also returns a bad pointer that results in access violation
Seems like it just doesnt wanna create it.

I have NV30 workstation car (QuadroFX 1000) and no luck, even though it supposed to support floating point textures.

Whoever tackled the prob please report back.
Alex BabkinAlias|WavefrontResearch Department
thy MC
thy MC
WHat''s the sense of floating point textures
Please AGREE or I will LIBERATE you
S1CA
S1CA
quote:
Original post by thy MC
WHat''s the sense of floating point textures


RANGE! - HDR techniques for example (www.debevec.org)



--
Simon O''Connor
Creative Asylum Ltd
www.creative-asylum.com
Simon O'Connor | Technical Director (Newcastle) Lockwood Publishing | LinkedIn | Personal site

Topic Locked

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

Sign in to reply to this topic.