From cc5c38b1aaf93157f5558df95383491a6163cc5a Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 3 Oct 2020 19:38:53 +0200 Subject: Add puglGetViewHint() This allows retrieving properties of the view that may be needed, such as the actual bit depth (which may vary from the suggested depth provided as a hint). --- pugl/pugl.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'pugl/pugl.h') diff --git a/pugl/pugl.h b/pugl/pugl.h index c32a17d..7e27425 100644 --- a/pugl/pugl.h +++ b/pugl/pugl.h @@ -938,6 +938,16 @@ puglSetEventFunc(PuglView* view, PuglEventFunc eventFunc); PUGL_API PuglStatus puglSetViewHint(PuglView* view, PuglViewHint hint, int value); +/** + Get the value for a view hint. + + If the view has been realized, this can be used to get the actual value of a + hint which was initially set to PUGL_DONT_CARE, or has been adjusted from + the suggested value. +*/ +PUGL_API int +puglGetViewHint(const PuglView* view, PuglViewHint hint); + /** @} @anchor frame -- cgit v1.2.1