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

Documentation for Notifications API #395

Open
BenWoodford opened this issue Feb 7, 2017 · 7 comments
Open

Documentation for Notifications API #395

BenWoodford opened this issue Feb 7, 2017 · 7 comments

Comments

@BenWoodford
Copy link

BenWoodford commented Feb 7, 2017

Some of it's fairly obvious (like the contents of NotificationBitmap_t, text, handle, etc) but the ones that aren't so obvious:

  • ulUserValue
  • type
  • style

Been looking forward to having a notifications API as it's a pain to make them yourself, so it's great to see it being introduced.

@BenWoodford
Copy link
Author

BenWoodford commented Mar 1, 2017

Addendum, both myself and others have been having problems using anything other than an empty bitmap on this. @matzman666 care to chime in on this?

@matzman666
Copy link

Yeah, I also didn't get the NotificationBitmap_t to work. I tried to use GetOverlayImageData() to fill the NotificationBitmap_t with data from an existing overlay, but to no avail (My reasoning was that openVR uses GetOverlayImageData() to retrieve a default icon when you don't specify your own). The exact code I used to achieve this can be found here.

An important point that is not clear at all is who takes ownership of the notification bitmap data. NotificationBitmap_t contains a void* pointer to the image data. When I pass the bitmap data to createNotification(), is the data copied and I can immediately free the buffer (that's what I tried to do and I didn't get a segmentation fault, so it seems plausible), or does OpenVR takes ownership of the buffer?

@BenWoodford
You can find information about the type and style parameter here. The ulUserValue seems to be used as an unique id for system notifications, and it seems also to be used in notification events.

@BenWoodford
Copy link
Author

That's helpful thanks, I use the C# header which doesn't have the comments, shall have to keep an eye on the .h file for documentation.

@BOLL7708
Copy link

BOLL7708 commented May 13, 2017

I also use the C# wrapper but I never got notifications to work, I looked at it periodically over many months. Finally I used the working albeit somewhat outdated library SteamVR_HUDCenter. The author mentions that missing handles were manually added back to the wrapper to specifically expose notification functionality.

That would explain why notifications are tricky to get working in C# with the wrapper Valve provides, using the above mentioned library I have notifications with bitmaps working.
vrcompositor_2017-04-17_21-15-30

@BenWoodford
Copy link
Author

Yeah, I've got a similar addition. Curious as to how you got the right icon texture to work though?

@BOLL7708
Copy link

BOLL7708 commented May 15, 2017

I actually checked the sample project in SteamVR_HUDCenter and used this snippet.

Incidentally I have problems getting my notifications to show up anymore, but then I'm messing about with my universe settings so they might appear on the other side of the planet for all I know :P

@BenWoodford
Copy link
Author

Hmm. I did a similar thing here and it ended up showing me something irrelevant (the texture of the overlay I believe). Weird.

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

3 participants