Advertisement
Conmanx360

Untitled

Jun 14th, 2018
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.30 KB | None | 0 0
  1. This doesn't work:
  2. if (format->id == WINED3DFMT_DXT5)
  3. {
  4. if (target == GL_TEXTURE_3D)
  5. {
  6. struct wined3d_format throw_away;
  7.  
  8. texture->resource.format_flags &= !WINED3DFMT_FLAG_BLOCKS;
  9. throw_away.upload = format->upload;
  10. format = wined3d_get_format(gl_info, WINED3DFMT_B8G8R8A8_UNORM, WINED3DUSAGE_TEXTURE);
  11. f = *format;
  12. f.conv_byte_count = 4;
  13. f.upload = throw_away.upload;
  14. format = &f;
  15. }
  16. else
  17. {
  18. f = *format;
  19. f.upload = NULL;
  20. format = &f;
  21. }
  22. }
  23.  
  24. This does:
  25.  
  26. if (format->id == WINED3DFMT_DXT5)
  27. {
  28. if (target == GL_TEXTURE_3D)
  29. {
  30. struct wined3d_format temp;
  31.  
  32. f = *format;
  33. temp.upload = f.upload;
  34. format = &f;
  35. format = wined3d_get_format(gl_info, WINED3DFMT_B8G8R8A8_UNORM, WINED3DUSAGE_TEXTURE);
  36. f = *format;
  37. f.upload = temp.upload;
  38. f.conv_byte_count = 4;
  39. format = &f;
  40. texture->resource.format_flags &= ~WINED3DFMT_FLAG_BLOCKS;
  41. }
  42. else
  43. {
  44. f = *format;
  45. f.upload = NULL;
  46. format = &f;
  47. }
  48.  
  49. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement