From 3e9b9c8331d4a9d8d95cfa83c3f7304e2df6d084 Mon Sep 17 00:00:00 2001 From: Josh Yelon Date: Sun, 6 Nov 2005 23:14:31 +0000 Subject: [PATCH] Added supports_basic_shaders --- panda/src/display/graphicsStateGuardian.I | 11 +++++++++++ panda/src/display/graphicsStateGuardian.cxx | 1 + panda/src/display/graphicsStateGuardian.h | 4 +++- 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/panda/src/display/graphicsStateGuardian.I b/panda/src/display/graphicsStateGuardian.I index 6f49f4d910..0daa5b8f10 100644 --- a/panda/src/display/graphicsStateGuardian.I +++ b/panda/src/display/graphicsStateGuardian.I @@ -492,6 +492,17 @@ get_supports_shadow_filter() const { return _supports_shadow_filter; } +//////////////////////////////////////////////////////////////////// +// Function: GraphicsStateGuardian::get_supports_basic_shaders +// Access: Published +// Description: Returns true if this particular GSG supports +// arbfp1+arbvp1 or above. +//////////////////////////////////////////////////////////////////// +INLINE bool GraphicsStateGuardian:: +get_supports_basic_shaders() const { + return _supports_basic_shaders; +} + //////////////////////////////////////////////////////////////////// // Function: GraphicsStateGuardian::get_color_scale_via_lighting // Access: Published diff --git a/panda/src/display/graphicsStateGuardian.cxx b/panda/src/display/graphicsStateGuardian.cxx index fa97c92930..c58675e563 100644 --- a/panda/src/display/graphicsStateGuardian.cxx +++ b/panda/src/display/graphicsStateGuardian.cxx @@ -147,6 +147,7 @@ GraphicsStateGuardian(const FrameBufferProperties &properties, _supports_render_texture = false; _supports_depth_texture = false; _supports_shadow_filter = false; + _supports_basic_shaders = false; _supported_geom_rendering = 0; // If this is true, then we can apply a color and/or color scale by diff --git a/panda/src/display/graphicsStateGuardian.h b/panda/src/display/graphicsStateGuardian.h index e9aff3d215..86c0654ec2 100644 --- a/panda/src/display/graphicsStateGuardian.h +++ b/panda/src/display/graphicsStateGuardian.h @@ -111,7 +111,8 @@ PUBLISHED: INLINE bool get_supports_render_texture() const; INLINE bool get_supports_depth_texture() const; INLINE bool get_supports_shadow_filter() const; - + INLINE bool get_supports_basic_shaders() const; + virtual int get_supported_geom_rendering() const; INLINE bool get_color_scale_via_lighting() const; @@ -359,6 +360,7 @@ protected: bool _supports_render_texture; bool _supports_depth_texture; bool _supports_shadow_filter; + bool _supports_basic_shaders; int _supported_geom_rendering; bool _color_scale_via_lighting;