Skip to content

What gl::GetUniformLocation excepts (rust) #428

Closed

Description

@stalker57241

I'm writing app with rust and opengl, done much work with matrices, but it isn't works. After some tests, I found, that location is -1. but shader's code contains used name. It isn't work when name is &str and used as name.as_ptr().cast() for casting to *const i8 type.

Where is readable docs? May anyone tell me?

Activity

  1. Dav1dde commented on Jun 13, 2023

    @Dav1dde
    Owner

    Strings without length in the API like glGetUniformLocation need to be 0-terminated, in Rust you could/should use CString

  2. Repository owner locked and limited conversation to collaborators on Jun 13, 2023
  3. converted this issue into a discussion #430 on Jun 13, 2023
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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions