Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create Texture from memory or from stream #3

Closed
mctb32 opened this issue Mar 29, 2018 · 1 comment
Closed

Create Texture from memory or from stream #3

mctb32 opened this issue Mar 29, 2018 · 1 comment

Comments

@mctb32
Copy link

mctb32 commented Mar 29, 2018

It would be great if the texture loader component contained functions to create textures not only from files, but also from memory or from user streams. It seems the functionality is almost there, but it's not exposed to the end user. Also the image types are deduced from file extensions, rather than from the actual file headers.

@DiligentGraphics
Copy link
Collaborator

DiligentGraphics commented Apr 1, 2018

This functionality is in fact already there. If you want to create an image from memory, you can use
Image::CreateFromDataBlob() function that also allows you to specify the image format. A texture can then be created from this image with CreateTextureFromImage() function. If you have a DDS data blob, you can create a texture from it with CreateTextureFromDDS().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant