//! Return true if active mode is GL_RENDER (cached state)
Standard_Boolean IsRender() const
{
+ #if !defined(GL_ES_VERSION_2_0)
return myRenderMode == GL_RENDER;
+ #else
+ return Standard_True;
+ #endif
}
//! Return true if active mode is GL_FEEDBACK (cached state)
Standard_Boolean IsFeedback() const
{
+ #if !defined(GL_ES_VERSION_2_0)
return myRenderMode == GL_FEEDBACK;
+ #else
+ return Standard_False;
+ #endif
}
//! This function retrieves information from GL about free GPU memory that is:
public:
+ //! Either GL_CLAMP_TO_EDGE (1.2+) or GL_CLAMP (1.1).
+ Standard_Integer TextureWrapClamp() const { return myTexClamp; }
+
//! @return maximum degree of anisotropy texture filter
Standard_EXPORT Standard_Integer MaxDegreeOfAnisotropy() const;
//! right rendering buffers.
Standard_Boolean HasStereoBuffers() const
{
+ #if !defined(GL_ES_VERSION_2_0)
return myIsStereoBuffers;
+ #else
+ return Standard_False;
+ #endif
}
public: //! @name methods to alter or retrieve current state
public: //! @name extensions
- Standard_Boolean arbNPTW; //!< GL_ARB_texture_non_power_of_two
- Standard_Boolean arbTexRG;//!< GL_ARB_texture_rg
- OpenGl_ArbTBO* arbTBO; //!< GL_ARB_texture_buffer_object
- OpenGl_ArbIns* arbIns; //!< GL_ARB_draw_instanced
- OpenGl_ArbDbg* arbDbg; //!< GL_ARB_debug_output
- OpenGl_ArbFBO* arbFBO; //!< GL_ARB_framebuffer_object
- OpenGl_ExtGS* extGS; //!< GL_EXT_geometry_shader4
- Standard_Boolean extBgra; //!< GL_EXT_bgra
- Standard_Boolean extAnis; //!< GL_EXT_texture_filter_anisotropic
- Standard_Boolean extPDS; //!< GL_EXT_packed_depth_stencil
- Standard_Boolean atiMem; //!< GL_ATI_meminfo
- Standard_Boolean nvxMem; //!< GL_NVX_gpu_memory_info
+ Standard_Boolean hasHighp; //!< highp in GLSL ES fragment shader is supported
+ Standard_Boolean hasTexRGBA8; //!< always available on desktop; on OpenGL ES - since 3.0 or as extension GL_OES_rgb8_rgba8
+ Standard_Boolean arbNPTW; //!< GL_ARB_texture_non_power_of_two
+ Standard_Boolean arbTexRG; //!< GL_ARB_texture_rg
+ OpenGl_ArbTBO* arbTBO; //!< GL_ARB_texture_buffer_object
+ OpenGl_ArbIns* arbIns; //!< GL_ARB_draw_instanced
+ OpenGl_ArbDbg* arbDbg; //!< GL_ARB_debug_output
+ OpenGl_ArbFBO* arbFBO; //!< GL_ARB_framebuffer_object
+ OpenGl_ExtGS* extGS; //!< GL_EXT_geometry_shader4
+ Standard_Boolean extBgra; //!< GL_EXT_bgra or GL_EXT_texture_format_BGRA8888 on OpenGL ES
+ Standard_Boolean extAnis; //!< GL_EXT_texture_filter_anisotropic
+ Standard_Boolean extPDS; //!< GL_EXT_packed_depth_stencil
+ Standard_Boolean atiMem; //!< GL_ATI_meminfo
+ Standard_Boolean nvxMem; //!< GL_NVX_gpu_memory_info
private: // system-dependent fields
NCollection_Handle<OpenGl_GlFunctions>
myFuncs; //!< mega structure for all GL functions
Standard_Integer myAnisoMax; //!< maximum level of anisotropy texture filter
+ Standard_Integer myTexClamp; //!< either GL_CLAMP_TO_EDGE (1.2+) or GL_CLAMP (1.1)
Standard_Integer myMaxTexDim; //!< value for GL_MAX_TEXTURE_SIZE
Standard_Integer myMaxClipPlanes; //!< value for GL_MAX_CLIP_PLANES
Standard_Integer myGlVerMajor; //!< cached GL version major number