Loading compressed textures with DX8

Started by
0 comments, last by maymer75 20 years, 6 months ago
Hi, I''ve got a question about using compressed textures with DX8. Basically I''d like to use the D3DPOOL_DEFAULT pool for my textures but I can''t find a way to load them (I don''t have a .DDS file for individual textures but just the raw bytes that I need to put into the surface). With the MANAGED pool it''s easy, just lock the texture and copy it. DEFAULT pool won''t let me lock it. So what I did is use CreateImageSurface() to get a surface I can lock, copy the data into that surface, then use D3DXLoadSurfaceFromSurface() to copy the image surface into the first surface level of the texture. This works fine for non-compressed formats but when I try to do this with a compressed texture the D3DXLoadSurfaceFromSurface() gives me this error in the debug console: Direct3D8: (ERROR) :Hardware Blt failed. CopyRects failed None of the documentation I can find suggests that this function should fail in this case but I guess it does. Anyway so has anybody found a way to load a compressed texture into the DEFAULT pool?
Advertisement
Can''t you just do a render-to-texture on a texture in the default pool?

This topic is closed to new replies.

Advertisement