Browse Source

Added supports_basic_shaders

Josh Yelon 20 years ago
parent
commit
3e9b9c8331

+ 11 - 0
panda/src/display/graphicsStateGuardian.I

@@ -492,6 +492,17 @@ get_supports_shadow_filter() const {
   return _supports_shadow_filter;
   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
 //     Function: GraphicsStateGuardian::get_color_scale_via_lighting
 //       Access: Published
 //       Access: Published

+ 1 - 0
panda/src/display/graphicsStateGuardian.cxx

@@ -147,6 +147,7 @@ GraphicsStateGuardian(const FrameBufferProperties &properties,
   _supports_render_texture = false;
   _supports_render_texture = false;
   _supports_depth_texture = false;
   _supports_depth_texture = false;
   _supports_shadow_filter = false;
   _supports_shadow_filter = false;
+  _supports_basic_shaders = false;
   _supported_geom_rendering = 0;
   _supported_geom_rendering = 0;
 
 
   // If this is true, then we can apply a color and/or color scale by
   // If this is true, then we can apply a color and/or color scale by

+ 3 - 1
panda/src/display/graphicsStateGuardian.h

@@ -111,7 +111,8 @@ PUBLISHED:
   INLINE bool get_supports_render_texture() const;
   INLINE bool get_supports_render_texture() const;
   INLINE bool get_supports_depth_texture() const;
   INLINE bool get_supports_depth_texture() const;
   INLINE bool get_supports_shadow_filter() const;
   INLINE bool get_supports_shadow_filter() const;
-
+  INLINE bool get_supports_basic_shaders() const;
+  
   virtual int get_supported_geom_rendering() const;
   virtual int get_supported_geom_rendering() const;
 
 
   INLINE bool get_color_scale_via_lighting() const;
   INLINE bool get_color_scale_via_lighting() const;
@@ -359,6 +360,7 @@ protected:
   bool _supports_render_texture;
   bool _supports_render_texture;
   bool _supports_depth_texture;
   bool _supports_depth_texture;
   bool _supports_shadow_filter;
   bool _supports_shadow_filter;
+  bool _supports_basic_shaders;
   int _supported_geom_rendering;
   int _supported_geom_rendering;
   bool _color_scale_via_lighting;
   bool _color_scale_via_lighting;