FBX파일 읽기 로직 완성
This commit is contained in:
@@ -31,9 +31,13 @@ void Graphics::CreateTextureSampler() {
|
||||
}
|
||||
|
||||
TextureHandle Graphics::CreateTexture(gsl::czstring path) {
|
||||
std::vector<std::uint8_t> data = ReadFile(path);
|
||||
return CreateTexture({data.data(), data.size()});
|
||||
}
|
||||
|
||||
TextureHandle Graphics::CreateTexture(gsl::span<std::uint8_t> image_file_data) {
|
||||
glm::ivec2 image_extents;
|
||||
std::int32_t channels;
|
||||
std::vector<std::uint8_t> image_file_data = ReadFile(path);
|
||||
stbi_uc* pixel_data = stbi_load_from_memory(
|
||||
image_file_data.data(), image_file_data.size(), &image_extents.x,
|
||||
&image_extents.y, &channels, STBI_rgb_alpha);
|
||||
|
||||
Reference in New Issue
Block a user