Skip to content
This repository was archived by the owner on Jul 16, 2019. It is now read-only.
This repository was archived by the owner on Jul 16, 2019. It is now read-only.

Opentk compat #1

Description

Hey,
Im currently working with OpenTK and trying to use StbSharp to load a texture(in dot net core 2) i have tried using

        private byte[] LoadTexture(string filename, out int width, out int height)
        {
            ImageReader loader = new ImageReader();
            using (Stream stream = File.Open(filename, FileMode.Open)) 
            {
                byte[] buffer = File.ReadAllBytes(filename);
                Image image = Stb.LoadFromMemory(buffer, Stb.STBI_rgb_alpha);

                width = image.Width;
                height = image.Height;
                return image.Data;
            }
        }

and using the returning bytes directly with opentk which doesnt seem
Does anyone have any advice?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions