mayingzhen / nvidia-texture-tools

Automatically exported from code.google.com/p/nvidia-texture-tools
Other
0 stars 0 forks source link

Saving result in memory #162

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Compilation of the code
2.
3.

What is the expected output? What do you see instead?

I would like to write such code:

        nvtt::InputOptions inputOptions; 
        inputOptions.setTextureLayout(nvtt::TextureType_2D, cxImage, cyImage); 
        inputOptions.setMipmapData((void*)local_source_texture_memory, cxImage, cyImage);

        nvtt::OutputOptions outputOptions;
        outputOptions.setTextureLayout(nvtt::TextureType_2D, (local_target_rect_final_bufer.right-local_target_rect_final_bufer.left), (local_target_rect_final_bufer.right-local_target_rect_final_bufer.left));
        outputOptions.setMipmapData((void*)local_final_texture_memory_DATA_1, (local_target_rect_final_bufer.right-local_target_rect_final_bufer.left), (local_target_rect_final_bufer.right-local_target_rect_final_bufer.left));

        nvtt::CompressionOptions compressionOptions;
        compressionOptions.setFormat(nvtt::Format_DXT1);

        nvtt::Compressor compressor;
        compressor.process(inputOptions, compressionOptions, outputOptions);

i see 
1>.\StereoRenderer.cpp(1168): error: class "nvtt::OutputOptions" has no member 
"setTextureLayout"
1>          outputOptions.setTextureLayout(nvtt::TextureType_2D, 
(local_target_rect_final_bufer.right-local_target_rect_final_bufer.left), 
(local_target_rect_final_bufer.right-local_target_rect_final_bufer.left));
1>                        ^
1>
1>.\StereoRenderer.cpp(1169): error: class "nvtt::OutputOptions" has no member 
"setMipmapData"
1>          outputOptions.setMipmapData((void*)local_final_texture_memory_DATA_1, 
(local_target_rect_final_bufer.right-local_target_rect_final_bufer.left), 
(local_target_rect_final_bufer.right-local_target_rect_final_bufer.left));

What version of the product are you using? On what operating system?

2.0.8-1

Please provide any additional information below.

Kozlov.Sergey.Aleksandrovitch@gmail.com 

Original issue reported on code.google.com by Kozlov.S...@gmail.com on 29 Apr 2011 at 8:16

GoogleCodeExporter commented 8 years ago
This is not the way the API works. I'd recommend reading the API documentation:

http://code.google.com/p/nvidia-texture-tools/wiki/ApiDocumentation

OutputOptions and InputOptions are different classes with different APIs.

Original comment by cast...@gmail.com on 30 Apr 2011 at 11:28