OpenGl_GlFunctions no more loads unused FFP functions.
OpenGl_GlCoreXX function tables no more defined two hierarchies with and without FFP functions,
and OpenGl_Context::coreXXback fields have been removed.
Introduced OpenGl_Context::core11ffp as more straightforward naming for obsolete FFP function set.
}
if (theCtx->core20fwd != NULL
- && (!theCtx->caps->pntSpritesDisable || theCtx->core11 == NULL))
+ && (!theCtx->caps->pntSpritesDisable || theCtx->core11ffp == NULL))
{
// Creating texture resource for using it with point sprites
Handle(Image_PixMap) anImage = aNewMarkerImage->GetImage();
}
}
}
- else if (theCtx->core11 != NULL)
+ else if (theCtx->core11ffp != NULL)
{
#if !defined(GL_ES_VERSION_2_0)
// Creating list with bitmap for using it in compatibility mode
- GLuint aBitmapList = glGenLists (1);
+ GLuint aBitmapList = theCtx->core11ffp->glGenLists (1);
aSprite->SetDisplayList (theCtx, aBitmapList);
Handle(Image_PixMap) anImage = aNewMarkerImage->IsColoredImage()
anImage = anImageCopy;
}
const GLint anAligment = Min ((GLint)anImage->MaxRowAligmentBytes(), 8);
- glPixelStorei (GL_UNPACK_ALIGNMENT, anAligment);
+ theCtx->core11fwd->glPixelStorei (GL_UNPACK_ALIGNMENT, anAligment);
const GLint anExtraBytes = GLint (anImage->RowExtraBytes());
const GLint aPixelsWidth = GLint (anImage->SizeRowBytes() / anImage->SizePixelBytes());
const GLint aRowLength = (anExtraBytes >= anAligment) ? aPixelsWidth : 0;
- glPixelStorei (GL_UNPACK_ROW_LENGTH, aRowLength);
+ theCtx->core11fwd->glPixelStorei (GL_UNPACK_ROW_LENGTH, aRowLength);
- glNewList (aBitmapList, GL_COMPILE);
+ theCtx->core11ffp->glNewList (aBitmapList, GL_COMPILE);
const Standard_Integer aWidth = (Standard_Integer )anImage->Width(), aHeight = (Standard_Integer )anImage->Height();
- glBitmap (0, 0, 0, 0, GLfloat(-0.5f * aWidth), GLfloat(-0.5f * aHeight), NULL); // make offsets that will be added to the current raster position
- glDrawPixels (GLsizei(anImage->Width()), GLsizei(anImage->Height()), aFormat.PixelFormat(), aFormat.DataType(), anImage->Data());
- glEndList();
- glPixelStorei (GL_UNPACK_ALIGNMENT, 1);
- glPixelStorei (GL_UNPACK_ROW_LENGTH, 0);
+ theCtx->core11ffp->glBitmap (0, 0, 0, 0, GLfloat(-0.5f * aWidth), GLfloat(-0.5f * aHeight), NULL); // make offsets that will be added to the current raster position
+ theCtx->core11ffp->glDrawPixels (GLsizei(anImage->Width()), GLsizei(anImage->Height()), aFormat.PixelFormat(), aFormat.DataType(), anImage->Data());
+ theCtx->core11ffp->glEndList();
+ theCtx->core11fwd->glPixelStorei (GL_UNPACK_ALIGNMENT, 1);
+ theCtx->core11fwd->glPixelStorei (GL_UNPACK_ROW_LENGTH, 0);
}
if (!aFormat.IsValid() || !hadAlreadyAlpha)
aNewMarkerImage->GetTextureSize (aWidth, aHeight);
if (Handle(TColStd_HArray1OfByte) aBitMap = aNewMarkerImage->GetBitMapArray())
{
- glNewList (aBitmapList, GL_COMPILE);
- glBitmap ((GLsizei)aWidth, (GLsizei)aHeight, (GLfloat)(0.5f * aWidth), (GLfloat)(0.5f * aHeight),
- 0.f, 0.f, (const GLubyte*)&aBitMap->First());
- glEndList();
+ theCtx->core11ffp->glNewList (aBitmapList, GL_COMPILE);
+ theCtx->core11ffp->glBitmap ((GLsizei)aWidth, (GLsizei)aHeight, (GLfloat)(0.5f * aWidth), (GLfloat)(0.5f * aHeight),
+ 0.f, 0.f, (const GLubyte*)&aBitMap->First());
+ theCtx->core11ffp->glEndList();
}
}
#endif
// purpose :
// =======================================================================
OpenGl_Context::OpenGl_Context (const Handle(OpenGl_Caps)& theCaps)
-: core11 (NULL),
+: core11ffp (NULL),
core11fwd (NULL),
core15 (NULL),
- core15fwd (NULL),
core20 (NULL),
- core20fwd (NULL),
core30 (NULL),
- core30fwd (NULL),
core32 (NULL),
- core32back (NULL),
core33 (NULL),
- core33back (NULL),
core41 (NULL),
- core41back (NULL),
core42 (NULL),
- core42back (NULL),
core43 (NULL),
- core43back (NULL),
core44 (NULL),
- core44back (NULL),
core45 (NULL),
- core45back (NULL),
core46 (NULL),
- core46back (NULL),
+ core15fwd (NULL),
+ core20fwd (NULL),
caps (!theCaps.IsNull() ? theCaps : new OpenGl_Caps()),
hasGetBufferData (Standard_False),
#if defined(GL_ES_VERSION_2_0)
{
#if !defined(GL_ES_VERSION_2_0)
// cache feedback mode state
- if (core11 != NULL)
+ if (core11ffp != NULL)
{
::glGetIntegerv (GL_RENDER_MODE, &myRenderMode);
::glGetIntegerv (GL_SHADE_MODEL, &myShadeModel);
#if defined(GL_ES_VERSION_2_0)
myShaderManager->SetUseRedAlpha (false);
#else
- myShaderManager->SetUseRedAlpha (core11 == NULL);
+ myShaderManager->SetUseRedAlpha (core11ffp == NULL);
#endif
#define checkGlslExtensionShort(theName) myShaderManager->EnableGlslExtension (Graphic3d_GlslExtension_ ## theName, CheckExtension (#theName))
#if defined(GL_ES_VERSION_2_0)
glGetIntegerv (GL_MAX_TEXTURE_SIZE, &myMaxTexDim);
#if !defined(GL_ES_VERSION_2_0)
- if (IsGlGreaterEqual (1, 3) && core11 != NULL)
+ if (IsGlGreaterEqual (1, 3) && core11ffp != NULL)
{
// this is a maximum of texture units for FFP functionality,
// usually smaller than combined texture units available for GLSL
::glGetIntegerv (GL_MAX_SAMPLES, &myMaxMsaaSamples);
}
#else
- if (core30fwd != NULL)
+ if (core30 != NULL)
{
// MSAA RenderBuffers have been defined in OpenGL 3.0,
// but MSAA Textures - only in OpenGL 3.2+
continue;
}
- // release resource if no one requiested it more than 2 redraw calls
+ // release resource if no one requested it more than 2 redraw calls
aRes->Release (this);
mySharedResources->UnBind (aKey);
aDeadList.Append (aKey);
}
}
#if !defined(GL_ES_VERSION_2_0)
- if (core11 != NULL)
+ if (core11ffp != NULL)
{
OpenGl_Sampler::applyGlobalTextureParams (aThisCtx, *aTextureNew, aTextureNew->Sampler()->Parameters());
}
{
aTextureOld->Unbind (aThisCtx, aTexUnit);
#if !defined(GL_ES_VERSION_2_0)
- if (core11 != NULL)
+ if (core11ffp != NULL)
{
OpenGl_Sampler::resetGlobalTextureParams (aThisCtx, *aTextureOld, aTextureOld->Sampler()->Parameters());
}
}
}
#if !defined(GL_ES_VERSION_2_0)
- else if (core11 != NULL)
+ else if (core11ffp != NULL)
{
- core11->glColor4fv (theColor.GetData());
+ core11ffp->glColor4fv (theColor.GetData());
}
#endif
}
#if !defined(GL_ES_VERSION_2_0)
if (thePattern != 0xFFFF)
{
- if (core11 != NULL)
+ if (core11ffp != NULL)
{
core11fwd->glEnable (GL_LINE_STIPPLE);
- core11->glLineStipple (static_cast<GLint> (theFactor),
- static_cast<GLushort> (thePattern));
+ core11ffp->glLineStipple (static_cast<GLint> (theFactor),
+ static_cast<GLushort> (thePattern));
}
}
else
{
- if (core11 != NULL)
+ if (core11ffp != NULL)
{
core11fwd->glDisable (GL_LINE_STIPPLE);
}
void OpenGl_Context::SetLineWidth (const Standard_ShortReal theWidth)
{
#if !defined(GL_ES_VERSION_2_0)
- if (core11 != NULL)
+ if (core11ffp != NULL)
#endif
{
// glLineWidth() is still defined within Core Profile, but has no effect with values != 1.0f
}
#if !defined(GL_ES_VERSION_2_0)
- if (core11 != NULL)
+ if (core11ffp != NULL)
{
GLint aMatrixMode = GL_TEXTURE;
::glGetIntegerv (GL_MATRIX_MODE, &aMatrixMode);
- core11->glMatrixMode (GL_TEXTURE);
+ core11ffp->glMatrixMode (GL_TEXTURE);
OpenGl_Mat4 aTextureMat;
if (caps->isTopDownTextureUV != theIsTopDown)
{
Graphic3d_TransformUtils::Translate (aTextureMat, -aTrans.x(), -aTrans.y(), 0.0f);
}
Graphic3d_TransformUtils::Rotate (aTextureMat, -theParams->Rotation(), 0.0f, 0.0f, 1.0f);
- core11->glLoadMatrixf (aTextureMat);
- core11->glMatrixMode (aMatrixMode);
+ core11ffp->glLoadMatrixf (aTextureMat);
+ core11ffp->glMatrixMode (aMatrixMode);
}
#endif
}
}
Standard_Boolean anOldGlNormalize = myIsGlNormalizeEnabled;
-
myIsGlNormalizeEnabled = isEnabled;
-
#if !defined(GL_ES_VERSION_2_0)
- if (core11 != NULL)
+ if (core11ffp != NULL)
{
if (isEnabled)
{
- ::glEnable (GL_NORMALIZE);
+ core11fwd->glEnable (GL_NORMALIZE);
}
else
{
- ::glDisable (GL_NORMALIZE);
+ core11fwd->glDisable (GL_NORMALIZE);
}
}
#endif
void OpenGl_Context::SetShadeModel (Graphic3d_TypeOfShadingModel theModel)
{
#if !defined(GL_ES_VERSION_2_0)
- if (core11 != NULL)
+ if (core11ffp != NULL)
{
const Standard_Integer aModel = theModel == Graphic3d_TOSM_FACET
|| theModel == Graphic3d_TOSM_PBR_FACET ? GL_FLAT : GL_SMOOTH;
return;
}
myShadeModel = aModel;
- core11->glShadeModel (aModel);
+ core11ffp->glShadeModel (aModel);
}
#else
(void )theModel;
// =======================================================================
bool OpenGl_Context::SetPolygonHatchEnabled (const bool theIsEnabled)
{
- if (core11 == NULL)
+ if (core11ffp == NULL)
{
return false;
}
{
const Standard_Integer aNewStyle = !theStyle.IsNull() ? theStyle->HatchType() : Aspect_HS_SOLID;
if (myActiveHatchType == aNewStyle
- || core11 == NULL)
+ || core11ffp == NULL)
{
return myActiveHatchType;
}
{
if (toFillNew)
{
- glEnable (GL_POLYGON_OFFSET_FILL);
+ core11fwd->glEnable (GL_POLYGON_OFFSET_FILL);
}
else
{
- glDisable (GL_POLYGON_OFFSET_FILL);
+ core11fwd->glDisable (GL_POLYGON_OFFSET_FILL);
}
}
{
if (toLineNew)
{
- glEnable (GL_POLYGON_OFFSET_LINE);
+ core11fwd->glEnable (GL_POLYGON_OFFSET_LINE);
}
else
{
- glDisable (GL_POLYGON_OFFSET_LINE);
+ core11fwd->glDisable (GL_POLYGON_OFFSET_LINE);
}
}
{
if (toPointNew)
{
- glEnable (GL_POLYGON_OFFSET_POINT);
+ core11fwd->glEnable (GL_POLYGON_OFFSET_POINT);
}
else
{
- glDisable (GL_POLYGON_OFFSET_POINT);
+ core11fwd->glDisable (GL_POLYGON_OFFSET_POINT);
}
}
#endif
if (myPolygonOffset.Factor != theOffset.Factor
|| myPolygonOffset.Units != theOffset.Units)
{
- glPolygonOffset (theOffset.Factor, theOffset.Units);
+ core11fwd->glPolygonOffset (theOffset.Factor, theOffset.Units);
}
myPolygonOffset = theOffset;
}
void OpenGl_Context::DisableFeatures() const
{
// Disable stuff that's likely to slow down glDrawPixels.
- glDisable(GL_DITHER);
- glDisable(GL_BLEND);
- glDisable(GL_DEPTH_TEST);
- glDisable(GL_STENCIL_TEST);
+ core11fwd->glDisable(GL_DITHER);
+ core11fwd->glDisable(GL_BLEND);
+ core11fwd->glDisable(GL_DEPTH_TEST);
+ core11fwd->glDisable(GL_STENCIL_TEST);
#if !defined(GL_ES_VERSION_2_0)
- if (core11 == NULL)
+ if (core11ffp == NULL)
{
return;
}
- glDisable(GL_TEXTURE_1D);
- glDisable(GL_TEXTURE_2D);
+ core11fwd->glDisable(GL_TEXTURE_1D);
+ core11fwd->glDisable(GL_TEXTURE_2D);
- glDisable(GL_LIGHTING);
- glDisable(GL_ALPHA_TEST);
- glDisable(GL_FOG);
- glDisable(GL_LOGIC_OP);
+ core11fwd->glDisable(GL_LIGHTING);
+ core11fwd->glDisable(GL_ALPHA_TEST);
+ core11fwd->glDisable(GL_FOG);
+ core11fwd->glDisable(GL_LOGIC_OP);
glPixelTransferi(GL_MAP_COLOR, GL_FALSE);
glPixelTransferi(GL_RED_SCALE, 1);
if ((myGlVerMajor >= 1) && (myGlVerMinor >= 2))
{
if (CheckExtension ("GL_CONVOLUTION_1D_EXT"))
- glDisable(GL_CONVOLUTION_1D_EXT);
+ core11fwd->glDisable(GL_CONVOLUTION_1D_EXT);
if (CheckExtension ("GL_CONVOLUTION_2D_EXT"))
- glDisable(GL_CONVOLUTION_2D_EXT);
+ core11fwd->glDisable(GL_CONVOLUTION_2D_EXT);
if (CheckExtension ("GL_SEPARABLE_2D_EXT"))
- glDisable(GL_SEPARABLE_2D_EXT);
+ core11fwd->glDisable(GL_SEPARABLE_2D_EXT);
if (CheckExtension ("GL_SEPARABLE_2D_EXT"))
- glDisable(GL_HISTOGRAM_EXT);
+ core11fwd->glDisable(GL_HISTOGRAM_EXT);
if (CheckExtension ("GL_MINMAX_EXT"))
- glDisable(GL_MINMAX_EXT);
+ core11fwd->glDisable(GL_MINMAX_EXT);
if (CheckExtension ("GL_TEXTURE_3D_EXT"))
- glDisable(GL_TEXTURE_3D_EXT);
+ core11fwd->glDisable(GL_TEXTURE_3D_EXT);
}
#endif
}
// =======================================================================
void OpenGl_Context::SetColorMaskRGBA (const NCollection_Vec4<bool>& theVal)
{
- glColorMask (theVal.r() ? GL_TRUE : GL_FALSE,
+ core11fwd->glColorMask (theVal.r() ? GL_TRUE : GL_FALSE,
theVal.g() ? GL_TRUE : GL_FALSE,
theVal.b() ? GL_TRUE : GL_FALSE,
theVal.a() ? GL_TRUE : GL_FALSE);
const bool anOldValue = myColorMask.r();
myColorMask.SetValues (theToWriteColor, theToWriteColor, theToWriteColor, caps->buffersOpaqueAlpha ? false : theToWriteColor);
const GLboolean toWrite = theToWriteColor ? GL_TRUE : GL_FALSE;
- glColorMask (toWrite, toWrite, toWrite, myColorMask.a() ? GL_TRUE : GL_FALSE);
+ core11fwd->glColorMask (toWrite, toWrite, toWrite, myColorMask.a() ? GL_TRUE : GL_FALSE);
return anOldValue;
}
}, theTarget, theOffset, theData, theSize);
return true;
#elif defined(GL_ES_VERSION_2_0)
- if (void* aData = core30fwd->glMapBufferRange (theTarget, theOffset, theSize, GL_MAP_READ_BIT))
+ if (void* aData = core30->glMapBufferRange (theTarget, theOffset, theSize, GL_MAP_READ_BIT))
{
memcpy (theData, aData, theSize);
- core30fwd->glUnmapBuffer (theTarget);
+ core30->glUnmapBuffer (theTarget);
return true;
}
return false;
struct OpenGl_ArbTexBindless;
struct OpenGl_ExtGS;
-template<typename theBaseClass_t> struct OpenGl_TmplCore12;
-typedef OpenGl_TmplCore12<OpenGl_GlCore11> OpenGl_GlCore12;
-typedef OpenGl_TmplCore12<OpenGl_GlCore11Fwd> OpenGl_GlCore12Fwd;
-
+struct OpenGl_GlCore12;
struct OpenGl_GlCore13;
-struct OpenGl_GlCore13Fwd;
-
-template<typename theBaseClass_t> struct OpenGl_TmplCore14;
-typedef OpenGl_TmplCore14<OpenGl_GlCore13> OpenGl_GlCore14;
-typedef OpenGl_TmplCore14<OpenGl_GlCore13Fwd> OpenGl_GlCore14Fwd;
-
-template<typename theBaseClass_t> struct OpenGl_TmplCore15;
-typedef OpenGl_TmplCore15<OpenGl_GlCore14> OpenGl_GlCore15;
-typedef OpenGl_TmplCore15<OpenGl_GlCore14Fwd> OpenGl_GlCore15Fwd;
-
-template<typename theBaseClass_t> struct OpenGl_TmplCore20;
-typedef OpenGl_TmplCore20<OpenGl_GlCore15> OpenGl_GlCore20;
-typedef OpenGl_TmplCore20<OpenGl_GlCore15Fwd> OpenGl_GlCore20Fwd;
-
-template<typename theBaseClass_t> struct OpenGl_TmplCore21;
-typedef OpenGl_TmplCore21<OpenGl_GlCore20> OpenGl_GlCore21;
-typedef OpenGl_TmplCore21<OpenGl_GlCore20Fwd> OpenGl_GlCore21Fwd;
-
-template<typename theBaseClass_t> struct OpenGl_TmplCore30;
-typedef OpenGl_TmplCore30<OpenGl_GlCore21> OpenGl_GlCore30;
-typedef OpenGl_TmplCore30<OpenGl_GlCore21Fwd> OpenGl_GlCore30Fwd;
-
-template<typename theBaseClass_t> struct OpenGl_TmplCore31;
-typedef OpenGl_TmplCore31<OpenGl_GlCore30> OpenGl_GlCore31Back;
-typedef OpenGl_TmplCore31<OpenGl_GlCore30Fwd> OpenGl_GlCore31;
-
-template<typename theBaseClass_t> struct OpenGl_TmplCore32;
-typedef OpenGl_TmplCore32<OpenGl_GlCore31Back> OpenGl_GlCore32Back;
-typedef OpenGl_TmplCore32<OpenGl_GlCore31> OpenGl_GlCore32;
-
-template<typename theBaseClass_t> struct OpenGl_TmplCore33;
-typedef OpenGl_TmplCore33<OpenGl_GlCore32Back> OpenGl_GlCore33Back;
-typedef OpenGl_TmplCore33<OpenGl_GlCore32> OpenGl_GlCore33;
-
-template<typename theBaseClass_t> struct OpenGl_TmplCore40;
-typedef OpenGl_TmplCore40<OpenGl_GlCore33Back> OpenGl_GlCore40Back;
-typedef OpenGl_TmplCore40<OpenGl_GlCore33> OpenGl_GlCore40;
-
-template<typename theBaseClass_t> struct OpenGl_TmplCore41;
-typedef OpenGl_TmplCore41<OpenGl_GlCore40Back> OpenGl_GlCore41Back;
-typedef OpenGl_TmplCore41<OpenGl_GlCore40> OpenGl_GlCore41;
-
-template<typename theBaseClass_t> struct OpenGl_TmplCore42;
-typedef OpenGl_TmplCore42<OpenGl_GlCore41Back> OpenGl_GlCore42Back;
-typedef OpenGl_TmplCore42<OpenGl_GlCore41> OpenGl_GlCore42;
-
-template<typename theBaseClass_t> struct OpenGl_TmplCore43;
-typedef OpenGl_TmplCore43<OpenGl_GlCore42Back> OpenGl_GlCore43Back;
-typedef OpenGl_TmplCore43<OpenGl_GlCore42> OpenGl_GlCore43;
-
-template<typename theBaseClass_t> struct OpenGl_TmplCore44;
-typedef OpenGl_TmplCore44<OpenGl_GlCore43Back> OpenGl_GlCore44Back;
-typedef OpenGl_TmplCore44<OpenGl_GlCore43> OpenGl_GlCore44;
-
-template<typename theBaseClass_t> struct OpenGl_TmplCore45;
-typedef OpenGl_TmplCore45<OpenGl_GlCore44Back> OpenGl_GlCore45Back;
-typedef OpenGl_TmplCore45<OpenGl_GlCore44> OpenGl_GlCore45;
-
-template<typename theBaseClass_t> struct OpenGl_TmplCore46;
-typedef OpenGl_TmplCore46<OpenGl_GlCore45Back> OpenGl_GlCore46Back;
-typedef OpenGl_TmplCore46<OpenGl_GlCore45> OpenGl_GlCore46;
+struct OpenGl_GlCore14;
+struct OpenGl_GlCore15;
+struct OpenGl_GlCore20;
+struct OpenGl_GlCore21;
+struct OpenGl_GlCore30;
+struct OpenGl_GlCore31;
+struct OpenGl_GlCore32;
+struct OpenGl_GlCore33;
+struct OpenGl_GlCore40;
+struct OpenGl_GlCore41;
+struct OpenGl_GlCore42;
+struct OpenGl_GlCore43;
+struct OpenGl_GlCore44;
+struct OpenGl_GlCore45;
+struct OpenGl_GlCore46;
class Graphic3d_Camera;
class Graphic3d_PresentationAttributes;
//! }
//! @endcode
//!
-//! Current implementation provide access to OpenGL core functionality up to 4.4 version (core12, core13, core14, core15, fields core20)
+//! Current implementation provide access to OpenGL core functionality up to 4.6 version (core12, core13, core14, etc.)
//! as well as several extensions (arbTBO, arbFBO, etc.).
//!
//! OpenGL context might be initialized in Core Profile. In this case deprecated functionality become unavailable.
-//! To make code easily adaptable to wide range of OpenGL versions, function sets related to each version has two kinds of suffixes:
-//! - "back" for version 3.2+.
-//! Represents function set for Backward-Compatible Profile.
-//! Function sets without this suffix represents core profile.
-//! - "fwd" for version 3.0-.
-//! Represents non-deprecated function set of earlier OpenGL versions, which are still available within OpenGL 3.2 Core Profile.
-//! Function sets without this suffix represents complete list of functions related to specific OpenGL version.
-//!
//! To select which core** function set should be used in specific case:
//! - Determine the minimal OpenGL version required for implemented functionality and use it to access all functions.
//! For example, if algorithm requires OpenGL 2.1+, it is better to write core20fwd->glEnable() rather than core11fwd->glEnable() for uniformity.
-//! - If functionality will work within Core Profile, use function sets with appropriate suffix.
//! - Validate minimal requirements at initialization/creation time and omit checks within code where algorithm should be already initialized.
-//! Properly escape code incompatible with Core Profile. The simplest way to check Core Profile is "if (core11 == NULL)".
+//! Properly escape code incompatible with Core Profile. The simplest way to check Core Profile is "if (core11ffp == NULL)".
//!
//! Simplified extensions classification:
//! - prefixed with NV, AMD, ATI are vendor-specific (however may be provided by other vendors in some cases);
//! model -> world -> view -> projection
//! These matrices might be changed for local transformation, transform persistent using direct access to
//! current matrix of ModelWorldState, WorldViewState and ProjectionState
-//! After, these matrices should be applyed using ApplyModelWorldMatrix, ApplyWorldViewMatrix,
+//! After, these matrices should be applied using ApplyModelWorldMatrix, ApplyWorldViewMatrix,
//! ApplyModelViewMatrix or ApplyProjectionMatrix.
class OpenGl_Context : public Standard_Transient
{
public: //! @name core profiles
- OpenGl_GlCore11* core11; //!< OpenGL 1.1 core functionality
+ OpenGl_GlCore11* core11ffp; //!< OpenGL 1.1 core functionality
OpenGl_GlCore11Fwd* core11fwd; //!< OpenGL 1.1 without deprecated entry points
- OpenGl_GlCore15* core15; //!< OpenGL 1.5 core functionality
- OpenGl_GlCore15Fwd* core15fwd; //!< OpenGL 1.5 without deprecated entry points
- OpenGl_GlCore20* core20; //!< OpenGL 2.0 core functionality (includes 1.5)
- OpenGl_GlCore20Fwd* core20fwd; //!< OpenGL 2.0 without deprecated entry points
- OpenGl_GlCore30* core30; //!< OpenGL 3.0 core functionality
- OpenGl_GlCore30Fwd* core30fwd; //!< OpenGL 3.0 without deprecated entry points
+ OpenGl_GlCore15* core15; //!< OpenGL 1.5 without deprecated entry points
+ OpenGl_GlCore20* core20; //!< OpenGL 2.0 without deprecated entry points
+ OpenGl_GlCore30* core30; //!< OpenGL 3.0 without deprecated entry points
OpenGl_GlCore32* core32; //!< OpenGL 3.2 core profile
- OpenGl_GlCore32Back* core32back; //!< OpenGL 3.2 backward compatibility profile
OpenGl_GlCore33* core33; //!< OpenGL 3.3 core profile
- OpenGl_GlCore33Back* core33back; //!< OpenGL 3.3 backward compatibility profile
OpenGl_GlCore41* core41; //!< OpenGL 4.1 core profile
- OpenGl_GlCore41Back* core41back; //!< OpenGL 4.1 backward compatibility profile
OpenGl_GlCore42* core42; //!< OpenGL 4.2 core profile
- OpenGl_GlCore42Back* core42back; //!< OpenGL 4.2 backward compatibility profile
OpenGl_GlCore43* core43; //!< OpenGL 4.3 core profile
- OpenGl_GlCore43Back* core43back; //!< OpenGL 4.3 backward compatibility profile
OpenGl_GlCore44* core44; //!< OpenGL 4.4 core profile
- OpenGl_GlCore44Back* core44back; //!< OpenGL 4.4 backward compatibility profile
OpenGl_GlCore45* core45; //!< OpenGL 4.5 core profile
- OpenGl_GlCore45Back* core45back; //!< OpenGL 4.5 backward compatibility profile
OpenGl_GlCore46* core46; //!< OpenGL 4.6 core profile
- OpenGl_GlCore46Back* core46back; //!< OpenGL 4.6 backward compatibility profile
+
+ OpenGl_GlCore15* core15fwd; //!< obsolete entry left for code portability; core15 should be used instead
+ OpenGl_GlCore20* core20fwd; //!< obsolete entry left for code portability; core20 should be used instead
Handle(OpenGl_Caps) caps; //!< context options
{
#if !defined(GL_ES_VERSION_2_0)
- inline void glRotated (GLdouble theAngleDegrees,
- GLdouble theX, GLdouble theY, GLdouble theZ)
- {
- ::glRotated (theAngleDegrees, theX, theY, theZ);
- OpenGl_TRACE(glRotated)
- }
-
- inline void glScaled (GLdouble theX, GLdouble theY, GLdouble theZ)
- {
- ::glScaled (theX, theY, theZ);
- OpenGl_TRACE(glScaled)
- }
-
- inline void glTranslated (GLdouble theX, GLdouble theY, GLdouble theZ)
- {
- ::glTranslated (theX, theY, theZ);
- OpenGl_TRACE(glTranslated)
- }
-
-public: //! @name Begin/End primitive specification (removed since 3.1)
-
- inline void glBegin (GLenum theMode)
- {
- ::glBegin (theMode);
- OpenGl_TRACE(glBegin)
- }
-
- inline void glEnd()
- {
- ::glEnd();
- OpenGl_TRACE(glEnd)
- }
-
- inline void glVertex2d (GLdouble theX, GLdouble theY)
- {
- ::glVertex2d (theX, theY);
- OpenGl_TRACE(glVertex2d)
- }
-
- inline void glVertex2f (GLfloat theX, GLfloat theY)
- {
- ::glVertex2f (theX, theY);
- OpenGl_TRACE(glVertex2f)
- }
-
- inline void glVertex2i (GLint theX, GLint theY)
- {
- ::glVertex2i (theX, theY);
- OpenGl_TRACE(glVertex2i)
- }
-
- inline void glVertex2s (GLshort theX, GLshort theY)
- {
- ::glVertex2s (theX, theY);
- OpenGl_TRACE(glVertex2s)
- }
-
- inline void glVertex3d (GLdouble theX, GLdouble theY, GLdouble theZ)
- {
- ::glVertex3d (theX, theY, theZ);
- OpenGl_TRACE(glVertex3d)
- }
-
- inline void glVertex3f (GLfloat theX, GLfloat theY, GLfloat theZ)
- {
- ::glVertex3f (theX, theY, theZ);
- OpenGl_TRACE(glVertex3f)
- }
-
- inline void glVertex3i (GLint theX, GLint theY, GLint theZ)
- {
- ::glVertex3i (theX, theY, theZ);
- OpenGl_TRACE(glVertex3i)
- }
-
- inline void glVertex3s (GLshort theX, GLshort theY, GLshort theZ)
- {
- ::glVertex3s (theX, theY, theZ);
- OpenGl_TRACE(glVertex3s)
- }
-
- inline void glVertex4d (GLdouble theX, GLdouble theY, GLdouble theZ, GLdouble theW)
- {
- ::glVertex4d (theX, theY, theZ, theW);
- OpenGl_TRACE(glVertex4d)
- }
-
- inline void glVertex4f (GLfloat theX, GLfloat theY, GLfloat theZ, GLfloat theW)
- {
- ::glVertex4f (theX, theY, theZ, theW);
- OpenGl_TRACE(glVertex4f)
- }
-
- inline void glVertex4i (GLint theX, GLint theY, GLint theZ, GLint theW)
- {
- ::glVertex4i (theX, theY, theZ, theW);
- OpenGl_TRACE(glVertex4i)
- }
-
- inline void glVertex4s (GLshort theX, GLshort theY, GLshort theZ, GLshort theW)
- {
- ::glVertex4s (theX, theY, theZ, theW);
- OpenGl_TRACE(glVertex4s)
- }
-
- inline void glVertex2dv (const GLdouble* theVec2)
- {
- ::glVertex2dv (theVec2);
- OpenGl_TRACE(glVertex2dv)
- }
-
- inline void glVertex2fv (const GLfloat* theVec2)
- {
- ::glVertex2fv (theVec2);
- OpenGl_TRACE(glVertex2fv)
- }
-
- inline void glVertex2iv (const GLint* theVec2)
- {
- ::glVertex2iv (theVec2);
- OpenGl_TRACE(glVertex2iv)
- }
-
- inline void glVertex2sv (const GLshort* theVec2)
- {
- ::glVertex2sv (theVec2);
- OpenGl_TRACE(glVertex2sv)
- }
-
- inline void glVertex3dv (const GLdouble* theVec3)
- {
- ::glVertex3dv (theVec3);
- OpenGl_TRACE(glVertex3dv)
- }
-
- inline void glVertex3fv (const GLfloat* theVec3)
- {
- ::glVertex3fv (theVec3);
- OpenGl_TRACE(glVertex3fv)
- }
-
- inline void glVertex3iv (const GLint* theVec3)
- {
- ::glVertex3iv (theVec3);
- OpenGl_TRACE(glVertex3iv)
- }
-
- inline void glVertex3sv (const GLshort* theVec3)
- {
- ::glVertex3sv (theVec3);
- OpenGl_TRACE(glVertex3sv)
- }
-
- inline void glVertex4dv (const GLdouble* theVec4)
- {
- ::glVertex4dv (theVec4);
- OpenGl_TRACE(glVertex4dv)
- }
-
- inline void glVertex4fv (const GLfloat* theVec4)
- {
- ::glVertex4fv (theVec4);
- OpenGl_TRACE(glVertex4fv)
- }
-
- inline void glVertex4iv (const GLint* theVec4)
- {
- ::glVertex4iv (theVec4);
- OpenGl_TRACE(glVertex4iv)
- }
-
- inline void glVertex4sv (const GLshort* theVec4)
- {
- ::glVertex4sv (theVec4);
- OpenGl_TRACE(glVertex4sv)
- }
-
- inline void glNormal3b (GLbyte nx, GLbyte ny, GLbyte nz)
- {
- ::glNormal3b(nx, ny, nz);
- OpenGl_TRACE(glNormal3b)
- }
-
- inline void glNormal3d (GLdouble nx, GLdouble ny, GLdouble nz)
- {
- ::glNormal3d(nx, ny, nz);
- OpenGl_TRACE(glNormal3d)
- }
-
- inline void glNormal3f (GLfloat nx, GLfloat ny, GLfloat nz)
- {
- ::glNormal3f(nx, ny, nz);
- OpenGl_TRACE(glNormal3f)
- }
-
- inline void glNormal3i (GLint nx, GLint ny, GLint nz)
- {
- ::glNormal3i(nx, ny, nz);
- OpenGl_TRACE(glNormal3i)
- }
-
- inline void glNormal3s (GLshort nx, GLshort ny, GLshort nz)
- {
- ::glNormal3s(nx, ny, nz);
- OpenGl_TRACE(glNormal3s)
- }
-
- inline void glNormal3bv (const GLbyte* theVec)
- {
- ::glNormal3bv (theVec);
- OpenGl_TRACE(glNormal3bv)
- }
-
- inline void glNormal3dv (const GLdouble* theVec)
- {
- ::glNormal3dv (theVec);
- OpenGl_TRACE(glNormal3dv)
- }
-
- inline void glNormal3fv (const GLfloat* theVec)
- {
- ::glNormal3fv (theVec);
- OpenGl_TRACE(glNormal3fv)
- }
-
- inline void glNormal3iv (const GLint* theVec)
- {
- ::glNormal3iv (theVec);
- OpenGl_TRACE(glNormal3iv)
- }
-
- inline void glNormal3sv (const GLshort* theVec)
- {
- ::glNormal3sv (theVec);
- OpenGl_TRACE(glNormal3sv)
- }
-
- inline void glIndexd (GLdouble c)
- {
- ::glIndexd(c);
- OpenGl_TRACE(glIndexd)
- }
-
- inline void glIndexf (GLfloat c)
- {
- ::glIndexf(c);
- OpenGl_TRACE(glIndexf)
- }
-
- inline void glIndexi (GLint c)
- {
- ::glIndexi(c);
- OpenGl_TRACE(glIndexi)
- }
-
- inline void glIndexs (GLshort c)
- {
- ::glIndexs(c);
- OpenGl_TRACE(glIndexs)
- }
-
- inline void glIndexub (GLubyte c)
- {
- ::glIndexub(c);
- OpenGl_TRACE(glIndexub)
- }
-
- inline void glIndexdv (const GLdouble* c)
- {
- ::glIndexdv(c);
- OpenGl_TRACE(glIndexdv)
- }
-
- inline void glIndexfv (const GLfloat* c)
- {
- ::glIndexfv(c);
- OpenGl_TRACE(glIndexfv)
- }
-
- inline void glIndexiv (const GLint* c)
- {
- ::glIndexiv(c);
- OpenGl_TRACE(glIndexiv)
- }
-
- inline void glIndexsv (const GLshort* c)
- {
- ::glIndexsv(c);
- OpenGl_TRACE(glIndexsv)
- }
-
- inline void glIndexubv (const GLubyte* c)
- {
- ::glIndexubv(c);
- OpenGl_TRACE(glIndexubv)
- }
-
- inline void glColor3b (GLbyte theRed, GLbyte theGreen, GLbyte theBlue)
- {
- ::glColor3b (theRed, theGreen, theBlue);
- OpenGl_TRACE(glColor3b)
- }
-
- inline void glColor3d (GLdouble theRed, GLdouble theGreen, GLdouble theBlue)
- {
- ::glColor3d (theRed, theGreen, theBlue);
- OpenGl_TRACE(glColor3d)
- }
-
- inline void glColor3f (GLfloat theRed, GLfloat theGreen, GLfloat theBlue)
- {
- ::glColor3f (theRed, theGreen, theBlue);
- OpenGl_TRACE(glColor3f)
- }
-
- inline void glColor3i (GLint theRed, GLint theGreen, GLint theBlue)
- {
- ::glColor3i (theRed, theGreen, theBlue);
- OpenGl_TRACE(glColor3i)
- }
-
- inline void glColor3s (GLshort theRed, GLshort theGreen, GLshort theBlue)
- {
- ::glColor3s (theRed, theGreen, theBlue);
- OpenGl_TRACE(glColor3s)
- }
-
- inline void glColor3ub (GLubyte theRed, GLubyte theGreen, GLubyte theBlue)
- {
- ::glColor3ub (theRed, theGreen, theBlue);
- OpenGl_TRACE(glColor3ub)
- }
-
- inline void glColor3ui (GLuint theRed, GLuint theGreen, GLuint theBlue)
- {
- ::glColor3ui (theRed, theGreen, theBlue);
- OpenGl_TRACE(glColor3ui)
- }
-
- inline void glColor3us (GLushort theRed, GLushort theGreen, GLushort theBlue)
- {
- ::glColor3us (theRed, theGreen, theBlue);
- OpenGl_TRACE(glColor3us)
- }
-
- inline void glColor4b (GLbyte theRed, GLbyte theGreen, GLbyte theBlue, GLbyte theAlpha)
- {
- ::glColor4b (theRed, theGreen, theBlue, theAlpha);
- OpenGl_TRACE(glColor4b)
- }
-
- inline void glColor4d (GLdouble theRed, GLdouble theGreen, GLdouble theBlue, GLdouble theAlpha)
- {
- ::glColor4d (theRed, theGreen, theBlue, theAlpha);
- OpenGl_TRACE(glColor4d)
- }
-
- inline void glColor4f (GLfloat theRed, GLfloat theGreen, GLfloat theBlue, GLfloat theAlpha)
- {
- ::glColor4f (theRed, theGreen, theBlue, theAlpha);
- OpenGl_TRACE(glColor4f)
- }
-
- inline void glColor4i (GLint theRed, GLint theGreen, GLint theBlue, GLint theAlpha)
- {
- ::glColor4i (theRed, theGreen, theBlue, theAlpha);
- OpenGl_TRACE(glColor4i)
- }
-
- inline void glColor4s (GLshort theRed, GLshort theGreen, GLshort theBlue, GLshort theAlpha)
- {
- ::glColor4s (theRed, theGreen, theBlue, theAlpha);
- OpenGl_TRACE(glColor4s)
- }
-
- inline void glColor4ub (GLubyte theRed, GLubyte theGreen, GLubyte theBlue, GLubyte theAlpha)
- {
- ::glColor4ub (theRed, theGreen, theBlue, theAlpha);
- OpenGl_TRACE(glColor4ub)
- }
-
- inline void glColor4ui (GLuint theRed, GLuint theGreen, GLuint theBlue, GLuint theAlpha)
- {
- ::glColor4ui (theRed, theGreen, theBlue, theAlpha);
- OpenGl_TRACE(glColor4ui)
- }
-
- inline void glColor4us (GLushort theRed, GLushort theGreen, GLushort theBlue, GLushort theAlpha)
- {
- ::glColor4us (theRed, theGreen, theBlue, theAlpha);
- OpenGl_TRACE(glColor4us)
- }
-
- inline void glColor3bv (const GLbyte* theVec)
- {
- ::glColor3bv (theVec);
- OpenGl_TRACE(glColor3bv)
- }
-
- inline void glColor3dv (const GLdouble* theVec)
- {
- ::glColor3dv (theVec);
- OpenGl_TRACE(glColor3dv)
- }
-
- inline void glColor3fv (const GLfloat* theVec)
- {
- ::glColor3fv (theVec);
- OpenGl_TRACE(glColor3fv)
- }
-
- inline void glColor3iv (const GLint* theVec)
- {
- ::glColor3iv (theVec);
- OpenGl_TRACE(glColor3iv)
- }
-
- inline void glColor3sv (const GLshort* theVec)
- {
- ::glColor3sv (theVec);
- OpenGl_TRACE(glColor3sv)
- }
-
- inline void glColor3ubv (const GLubyte* theVec)
- {
- ::glColor3ubv (theVec);
- OpenGl_TRACE(glColor3ubv)
- }
-
- inline void glColor3uiv (const GLuint* theVec)
- {
- ::glColor3uiv (theVec);
- OpenGl_TRACE(glColor3uiv)
- }
-
- inline void glColor3usv (const GLushort* theVec)
- {
- ::glColor3usv (theVec);
- OpenGl_TRACE(glColor3usv)
- }
-
- inline void glColor4bv (const GLbyte* theVec)
- {
- ::glColor4bv (theVec);
- OpenGl_TRACE(glColor4bv)
- }
-
- inline void glColor4dv (const GLdouble* theVec)
- {
- ::glColor4dv (theVec);
- OpenGl_TRACE(glColor4dv)
- }
-
- inline void glColor4fv (const GLfloat* theVec)
- {
- ::glColor4fv (theVec);
- OpenGl_TRACE(glColor4fv)
- }
-
- inline void glColor4iv (const GLint* theVec)
- {
- ::glColor4iv (theVec);
- OpenGl_TRACE(glColor4iv)
- }
-
- inline void glColor4sv (const GLshort* theVec)
- {
- ::glColor4sv (theVec);
- OpenGl_TRACE(glColor4sv)
- }
-
- inline void glColor4ubv (const GLubyte* theVec)
- {
- ::glColor4ubv (theVec);
- OpenGl_TRACE(glColor4ubv)
- }
-
- inline void glColor4uiv (const GLuint* theVec)
- {
- ::glColor4uiv (theVec);
- OpenGl_TRACE(glColor4uiv)
- }
-
- inline void glColor4usv (const GLushort* theVec)
- {
- ::glColor4usv (theVec);
- OpenGl_TRACE(glColor4usv)
- }
-
- inline void glTexCoord1d (GLdouble s)
- {
- ::glTexCoord1d(s);
- OpenGl_TRACE(glTexCoord1d);
- }
-
- inline void glTexCoord1f (GLfloat s)
- {
- ::glTexCoord1f(s);
- OpenGl_TRACE(glTexCoord1f)
- }
-
- inline void glTexCoord1i (GLint s)
- {
- ::glTexCoord1i(s);
- OpenGl_TRACE(glTexCoord1i)
- }
-
- inline void glTexCoord1s (GLshort s)
- {
- ::glTexCoord1s(s);
- OpenGl_TRACE(glTexCoord1s)
- }
-
- inline void glTexCoord2d (GLdouble s, GLdouble t)
- {
- ::glTexCoord2d(s, t);
- OpenGl_TRACE(glTexCoord2d)
- }
-
- inline void glTexCoord2f (GLfloat s, GLfloat t)
- {
- ::glTexCoord2f(s, t);
- OpenGl_TRACE(glTexCoord2f)
- }
-
- inline void glTexCoord2i (GLint s, GLint t)
- {
- ::glTexCoord2i(s, t);
- OpenGl_TRACE(glTexCoord2i)
- }
-
- inline void glTexCoord2s (GLshort s, GLshort t)
- {
- ::glTexCoord2s(s, t);
- OpenGl_TRACE(glTexCoord2s)
- }
-
- inline void glTexCoord3d (GLdouble s, GLdouble t, GLdouble r)
- {
- ::glTexCoord3d(s, t, r);
- OpenGl_TRACE(glTexCoord3d)
- }
-
- inline void glTexCoord3f (GLfloat s, GLfloat t, GLfloat r)
- {
- ::glTexCoord3f(s, t, r);
- OpenGl_TRACE(glTexCoord3f)
- }
-
- inline void glTexCoord3i (GLint s, GLint t, GLint r)
- {
- ::glTexCoord3i(s, t, r);
- OpenGl_TRACE(glTexCoord3i)
- }
-
- inline void glTexCoord3s (GLshort s, GLshort t, GLshort r)
- {
- ::glTexCoord3s(s, t, r);
- OpenGl_TRACE(glTexCoord3s)
- }
-
- inline void glTexCoord4d (GLdouble s, GLdouble t, GLdouble r, GLdouble q)
- {
- ::glTexCoord4d(s, t, r, q);
- OpenGl_TRACE(glTexCoord4d)
- }
-
- inline void glTexCoord4f (GLfloat s, GLfloat t, GLfloat r, GLfloat q)
- {
- ::glTexCoord4f(s, t, r, q);
- OpenGl_TRACE(glTexCoord4f)
- }
-
- inline void glTexCoord4i (GLint s, GLint t, GLint r, GLint q)
- {
- ::glTexCoord4i(s, t, r, q);
- OpenGl_TRACE(glTexCoord4i)
- }
-
- inline void glTexCoord4s (GLshort s, GLshort t, GLshort r, GLshort q)
- {
- ::glTexCoord4s(s, t, r, q);
- OpenGl_TRACE(glTexCoord4s)
- }
-
- inline void glTexCoord1dv (const GLdouble* theVec1)
- {
- ::glTexCoord1dv (theVec1);
- OpenGl_TRACE(glTexCoord1dv)
- }
-
- inline void glTexCoord1fv (const GLfloat* theVec1)
- {
- ::glTexCoord1fv (theVec1);
- OpenGl_TRACE(glTexCoord1fv)
- }
-
- inline void glTexCoord1iv (const GLint* theVec1)
- {
- ::glTexCoord1iv (theVec1);
- OpenGl_TRACE(glTexCoord1iv)
- }
-
- inline void glTexCoord1sv (const GLshort* theVec1)
- {
- ::glTexCoord1sv (theVec1);
- OpenGl_TRACE(glTexCoord1sv)
- }
-
- inline void glTexCoord2dv (const GLdouble* theVec2)
- {
- ::glTexCoord2dv (theVec2);
- OpenGl_TRACE(glTexCoord2dv)
- }
-
- inline void glTexCoord2fv (const GLfloat* theVec2)
- {
- ::glTexCoord2fv (theVec2);
- OpenGl_TRACE(glTexCoord2fv)
- }
-
- inline void glTexCoord2iv (const GLint* theVec2)
- {
- ::glTexCoord2iv (theVec2);
- OpenGl_TRACE(glTexCoord2iv)
- }
-
- inline void glTexCoord2sv (const GLshort* theVec)
- {
- ::glTexCoord2sv (theVec);
- OpenGl_TRACE(glTexCoord2sv)
- }
-
- inline void glTexCoord3dv (const GLdouble* theVec3)
- {
- ::glTexCoord3dv (theVec3);
- OpenGl_TRACE(glTexCoord3dv)
- }
-
- inline void glTexCoord3fv (const GLfloat* theVec3)
- {
- ::glTexCoord3fv (theVec3);
- OpenGl_TRACE(glTexCoord3fv)
- }
-
- inline void glTexCoord3iv (const GLint* theVec3)
- {
- ::glTexCoord3iv (theVec3);
- OpenGl_TRACE(glTexCoord3iv)
- }
-
- inline void glTexCoord3sv (const GLshort* theVec3)
- {
- ::glTexCoord3sv (theVec3);
- OpenGl_TRACE(glTexCoord3sv)
- }
-
- inline void glTexCoord4dv (const GLdouble* theVec4)
- {
- ::glTexCoord4dv (theVec4);
- OpenGl_TRACE(glTexCoord4dv)
- }
-
- inline void glTexCoord4fv (const GLfloat* theVec4)
- {
- ::glTexCoord4fv (theVec4);
- OpenGl_TRACE(glTexCoord4fv)
- }
-
- inline void glTexCoord4iv (const GLint* theVec4)
- {
- ::glTexCoord4iv (theVec4);
- OpenGl_TRACE(glTexCoord4iv)
- }
-
- inline void glTexCoord4sv (const GLshort* theVec4)
- {
- ::glTexCoord4sv (theVec4);
- OpenGl_TRACE(glTexCoord4sv)
- }
-
-public: //! @name Matrix operations (removed since 3.1)
-
- inline void glMatrixMode (GLenum theMode)
- {
- ::glMatrixMode (theMode);
- OpenGl_TRACE(glMatrixMode)
- }
-
- inline void glOrtho (GLdouble theLeft, GLdouble theRight,
- GLdouble theBottom, GLdouble theTop,
- GLdouble theNearVal, GLdouble theFarVal)
- {
- ::glOrtho (theLeft, theRight, theBottom, theTop, theNearVal, theFarVal);
- OpenGl_TRACE(glOrtho)
- }
-
- inline void glFrustum (GLdouble theLeft, GLdouble theRight,
- GLdouble theBottom, GLdouble theTop,
- GLdouble theNearVal, GLdouble theFarVal)
- {
- ::glFrustum (theLeft, theRight, theBottom, theTop, theNearVal, theFarVal);
- OpenGl_TRACE(glFrustum)
- }
-
- inline void glPushMatrix()
- {
- ::glPushMatrix();
- OpenGl_TRACE(glPushMatrix)
- }
-
- inline void glPopMatrix()
- {
- ::glPopMatrix();
- OpenGl_TRACE(glPopMatrix)
- }
-
- inline void glLoadIdentity()
- {
- ::glLoadIdentity();
- OpenGl_TRACE(glLoadIdentity)
- }
-
- inline void glLoadMatrixd (const GLdouble* theMatrix)
- {
- ::glLoadMatrixd (theMatrix);
- OpenGl_TRACE(glLoadMatrixd)
- }
-
- inline void glLoadMatrixf (const GLfloat* theMatrix)
- {
- ::glLoadMatrixf (theMatrix);
- OpenGl_TRACE(glLoadMatrixf)
- }
-
- inline void glMultMatrixd (const GLdouble* theMatrix)
- {
- ::glMultMatrixd (theMatrix);
- OpenGl_TRACE(glMultMatrixd)
- }
-
- inline void glMultMatrixf (const GLfloat* theMatrix)
- {
- ::glMultMatrixf (theMatrix);
- OpenGl_TRACE(glMultMatrixf)
- }
-
-public: //! @name Line and Polygon stripple (removed since 3.1)
-
- //void glLineWidth (GLfloat theWidth) { ::glLineWidth (theWidth); }
-
- inline void glLineStipple (GLint theFactor, GLushort thePattern)
- {
- ::glLineStipple (theFactor, thePattern);
- OpenGl_TRACE(glLineStipple)
- }
-
- inline void glPolygonStipple (const GLubyte* theMask)
- {
- ::glPolygonStipple (theMask);
- OpenGl_TRACE(glPolygonStipple)
- }
-
- inline void glGetPolygonStipple (GLubyte* theMask)
- {
- ::glGetPolygonStipple (theMask);
- OpenGl_TRACE(glGetPolygonStipple)
- }
-
-public: //! @name Attribute stacks (removed since 3.1)
-
- inline void glPushAttrib (GLbitfield theMask)
- {
- ::glPushAttrib (theMask);
- OpenGl_TRACE(glPushAttrib)
- }
-
- inline void glPopAttrib()
- {
- ::glPopAttrib();
- OpenGl_TRACE(glPopAttrib)
- }
-
- inline void glPushClientAttrib (GLbitfield theMask)
- {
- ::glPushClientAttrib (theMask);
- OpenGl_TRACE(glPushClientAttrib)
- }
-
- inline void glPopClientAttrib()
- {
- ::glPopClientAttrib();
- OpenGl_TRACE(glPopClientAttrib)
- }
-
-public: //! @name Fixed pipeline lighting (removed since 3.1)
-
- inline void glShadeModel (GLenum theMode)
- {
- ::glShadeModel (theMode);
- OpenGl_TRACE(glShadeModel)
- }
-
- inline void glLightf (GLenum theLight, GLenum pname, GLfloat param)
- {
- ::glLightf (theLight, pname, param);
- OpenGl_TRACE(glLightf)
- }
-
- inline void glLighti (GLenum theLight, GLenum pname, GLint param)
- {
- ::glLighti (theLight, pname, param);
- OpenGl_TRACE(glLighti)
- }
-
- inline void glLightfv (GLenum theLight, GLenum pname, const GLfloat* params)
- {
- ::glLightfv (theLight, pname, params);
- OpenGl_TRACE(glLightfv)
- }
-
- inline void glLightiv (GLenum theLight, GLenum pname, const GLint* params)
- {
- ::glLightiv (theLight, pname, params);
- OpenGl_TRACE(glLightiv)
- }
-
- inline void glGetLightfv (GLenum theLight, GLenum pname, GLfloat *params)
- {
- ::glGetLightfv (theLight, pname, params);
- OpenGl_TRACE(glGetLightfv)
- }
-
- inline void glGetLightiv (GLenum theLight, GLenum pname, GLint *params)
- {
- ::glGetLightiv (theLight, pname, params);
- OpenGl_TRACE(glGetLightiv)
- }
-
- inline void glLightModelf (GLenum pname, GLfloat param)
- {
- ::glLightModelf(pname, param);
- OpenGl_TRACE(glLightModelf)
- }
-
- inline void glLightModeli (GLenum pname, GLint param)
- {
- ::glLightModeli(pname, param);
- OpenGl_TRACE(glLightModeli)
- }
-
- inline void glLightModelfv (GLenum pname, const GLfloat* params)
- {
- ::glLightModelfv(pname, params);
- OpenGl_TRACE(glLightModelfv)
- }
-
- inline void glLightModeliv (GLenum pname, const GLint* params)
- {
- ::glLightModeliv(pname, params);
- OpenGl_TRACE(glLightModeliv)
- }
-
- inline void glMaterialf (GLenum face, GLenum pname, GLfloat param)
- {
- ::glMaterialf(face, pname, param);
- OpenGl_TRACE(glMaterialf)
- }
-
- inline void glMateriali (GLenum face, GLenum pname, GLint param)
- {
- ::glMateriali(face, pname, param);
- OpenGl_TRACE(glMateriali)
- }
-
- inline void glMaterialfv (GLenum face, GLenum pname, const GLfloat* params)
- {
- ::glMaterialfv(face, pname, params);
- OpenGl_TRACE(glMaterialfv)
- }
-
- inline void glMaterialiv (GLenum face, GLenum pname, const GLint* params)
- {
- ::glMaterialiv(face, pname, params);
- OpenGl_TRACE(glMaterialiv)
- }
-
- inline void glGetMaterialfv (GLenum face, GLenum pname, GLfloat* params)
- {
- ::glGetMaterialfv(face, pname, params);
- OpenGl_TRACE(glGetMaterialfv)
- }
-
- inline void glGetMaterialiv (GLenum face, GLenum pname, GLint* params)
- {
- ::glGetMaterialiv(face, pname, params);
- OpenGl_TRACE(glGetMaterialiv)
- }
-
- inline void glColorMaterial (GLenum face, GLenum mode)
- {
- ::glColorMaterial(face, mode);
- OpenGl_TRACE(glColorMaterial)
- }
-
-public: //! @name clipping plane (removed since 3.1)
-
- inline void glClipPlane (GLenum thePlane, const GLdouble* theEquation)
- {
- ::glClipPlane (thePlane, theEquation);
- OpenGl_TRACE(glClipPlane)
- }
-
- inline void glGetClipPlane (GLenum thePlane, GLdouble* theEquation)
- {
- ::glGetClipPlane (thePlane, theEquation);
- OpenGl_TRACE(glGetClipPlane)
- }
-
-public: //! @name Display lists (removed since 3.1)
-
- inline GLboolean glIsList (GLuint theList)
- {
- const GLboolean aRes = ::glIsList (theList);
- OpenGl_TRACE(glIsList)
- return aRes;
- }
-
- inline void glDeleteLists (GLuint theList, GLsizei theRange)
- {
- ::glDeleteLists (theList, theRange);
- OpenGl_TRACE(glDeleteLists)
- }
-
- inline GLuint glGenLists (GLsizei theRange)
- {
- const GLuint aRes = ::glGenLists (theRange);
- OpenGl_TRACE(glGenLists)
- return aRes;
- }
-
- inline void glNewList (GLuint theList, GLenum theMode)
- {
- ::glNewList (theList, theMode);
- OpenGl_TRACE(glNewList)
- }
-
- inline void glEndList()
- {
- ::glEndList();
- OpenGl_TRACE(glEndList)
- }
-
- inline void glCallList (GLuint theList)
- {
- ::glCallList (theList);
- OpenGl_TRACE(glCallList)
- }
-
- inline void glCallLists (GLsizei theNb, GLenum theType, const GLvoid* theLists)
- {
- ::glCallLists (theNb, theType, theLists);
- OpenGl_TRACE(glCallLists)
- }
-
- inline void glListBase (GLuint theBase)
- {
- ::glListBase (theBase);
- OpenGl_TRACE(glListBase)
- }
-
-public: //! @name Current raster position and Rectangles (removed since 3.1)
+public:
- inline void glRasterPos2d (GLdouble x, GLdouble y)
+ inline void glTexEnvi (GLenum target, GLenum pname, GLint param)
{
- ::glRasterPos2d (x, y);
- OpenGl_TRACE(glRasterPos2d)
+ ::glTexEnvi (target, pname, param);
+ OpenGl_TRACE(glTexEnvi)
}
- inline void glRasterPos2f (GLfloat x, GLfloat y)
+ inline void glGetTexEnviv (GLenum target, GLenum pname, GLint *params)
{
- ::glRasterPos2f (x, y);
- OpenGl_TRACE(glRasterPos2f)
+ ::glGetTexEnviv (target, pname, params);
+ OpenGl_TRACE(glGetTexEnviv)
}
- inline void glRasterPos2i (GLint x, GLint y)
- {
- ::glRasterPos2i (x, y);
- OpenGl_TRACE(glRasterPos2i)
- }
-
- inline void glRasterPos2s (GLshort x, GLshort y)
+ inline void glLogicOp (GLenum opcode)
{
- ::glRasterPos2s (x, y);
- OpenGl_TRACE(glRasterPos2s)
+ ::glLogicOp (opcode);
+ OpenGl_TRACE(glLogicOp)
}
- inline void glRasterPos3d (GLdouble x, GLdouble y, GLdouble z)
- {
- ::glRasterPos3d (x, y, z);
- OpenGl_TRACE(glRasterPos3d)
- }
+public: //! @name Begin/End primitive specification (removed since 3.1)
- inline void glRasterPos3f (GLfloat x, GLfloat y, GLfloat z)
+ inline void glColor4fv (const GLfloat* theVec)
{
- ::glRasterPos3f (x, y, z);
- OpenGl_TRACE(glRasterPos3f)
+ ::glColor4fv (theVec);
+ OpenGl_TRACE(glColor4fv)
}
- inline void glRasterPos3i (GLint x, GLint y, GLint z)
- {
- ::glRasterPos3i (x, y, z);
- OpenGl_TRACE(glRasterPos3i)
- }
+public: //! @name Matrix operations (removed since 3.1)
- inline void glRasterPos3s (GLshort x, GLshort y, GLshort z)
+ inline void glMatrixMode (GLenum theMode)
{
- ::glRasterPos3s (x, y, z);
- OpenGl_TRACE(glRasterPos3s)
+ ::glMatrixMode (theMode);
+ OpenGl_TRACE(glMatrixMode)
}
- inline void glRasterPos4d (GLdouble x, GLdouble y, GLdouble z, GLdouble w)
+ inline void glLoadIdentity()
{
- ::glRasterPos4d (x, y, z, w);
- OpenGl_TRACE(glRasterPos4d)
+ ::glLoadIdentity();
+ OpenGl_TRACE(glLoadIdentity)
}
- inline void glRasterPos4f (GLfloat x, GLfloat y, GLfloat z, GLfloat w)
+ inline void glLoadMatrixf (const GLfloat* theMatrix)
{
- ::glRasterPos4f (x, y, z, w);
- OpenGl_TRACE(glRasterPos4f)
+ ::glLoadMatrixf (theMatrix);
+ OpenGl_TRACE(glLoadMatrixf)
}
- inline void glRasterPos4i (GLint x, GLint y, GLint z, GLint w)
- {
- ::glRasterPos4i (x, y, z, w);
- OpenGl_TRACE(glRasterPos4i)
- }
+public: //! @name Line and Polygon stipple (removed since 3.1)
- inline void glRasterPos4s (GLshort x, GLshort y, GLshort z, GLshort w)
+ inline void glLineStipple (GLint theFactor, GLushort thePattern)
{
- ::glRasterPos4s (x, y, z, w);
- OpenGl_TRACE(glRasterPos4s)
+ ::glLineStipple (theFactor, thePattern);
+ OpenGl_TRACE(glLineStipple)
}
- inline void glRasterPos2dv (const GLdouble* theVec)
+ inline void glPolygonStipple (const GLubyte* theMask)
{
- ::glRasterPos2dv (theVec);
- OpenGl_TRACE(glRasterPos2dv)
+ ::glPolygonStipple (theMask);
+ OpenGl_TRACE(glPolygonStipple)
}
- inline void glRasterPos2fv (const GLfloat* theVec)
- {
- ::glRasterPos2fv (theVec);
- OpenGl_TRACE(glRasterPos2fv)
- }
+public: //! @name Fixed pipeline lighting (removed since 3.1)
- inline void glRasterPos2iv (const GLint* theVec)
+ inline void glShadeModel (GLenum theMode)
{
- ::glRasterPos2iv (theVec);
- OpenGl_TRACE(glRasterPos2iv)
+ ::glShadeModel (theMode);
+ OpenGl_TRACE(glShadeModel)
}
- inline void glRasterPos2sv (const GLshort* theVec)
+ inline void glLightf (GLenum theLight, GLenum pname, GLfloat param)
{
- ::glRasterPos2sv (theVec);
- OpenGl_TRACE(glRasterPos2sv)
+ ::glLightf (theLight, pname, param);
+ OpenGl_TRACE(glLightf)
}
- inline void glRasterPos3dv (const GLdouble* theVec)
+ inline void glLightfv (GLenum theLight, GLenum pname, const GLfloat* params)
{
- ::glRasterPos3dv (theVec);
- OpenGl_TRACE(glRasterPos3dv)
+ ::glLightfv (theLight, pname, params);
+ OpenGl_TRACE(glLightfv)
}
- inline void glRasterPos3fv (const GLfloat* theVec)
+ inline void glLightModeli (GLenum pname, GLint param)
{
- ::glRasterPos3fv (theVec);
- OpenGl_TRACE(glRasterPos3fv)
+ ::glLightModeli(pname, param);
+ OpenGl_TRACE(glLightModeli)
}
- inline void glRasterPos3iv (const GLint* theVec)
+ inline void glLightModelfv (GLenum pname, const GLfloat* params)
{
- ::glRasterPos3iv (theVec);
- OpenGl_TRACE(glRasterPos3iv)
+ ::glLightModelfv(pname, params);
+ OpenGl_TRACE(glLightModelfv)
}
- inline void glRasterPos3sv (const GLshort* theVec)
+ inline void glMaterialf (GLenum face, GLenum pname, GLfloat param)
{
- ::glRasterPos3sv (theVec);
- OpenGl_TRACE(glRasterPos3sv)
+ ::glMaterialf(face, pname, param);
+ OpenGl_TRACE(glMaterialf)
}
- inline void glRasterPos4dv (const GLdouble* theVec)
+ inline void glMaterialfv (GLenum face, GLenum pname, const GLfloat* params)
{
- ::glRasterPos4dv (theVec);
- OpenGl_TRACE(glRasterPos4dv)
+ ::glMaterialfv(face, pname, params);
+ OpenGl_TRACE(glMaterialfv)
}
- inline void glRasterPos4fv (const GLfloat* theVec)
+ inline void glColorMaterial (GLenum face, GLenum mode)
{
- ::glRasterPos4fv (theVec);
- OpenGl_TRACE(glRasterPos4fv)
+ ::glColorMaterial(face, mode);
+ OpenGl_TRACE(glColorMaterial)
}
- inline void glRasterPos4iv (const GLint* theVec)
- {
- ::glRasterPos4iv (theVec);
- OpenGl_TRACE(glRasterPos4iv)
- }
+public: //! @name clipping plane (removed since 3.1)
- inline void glRasterPos4sv (const GLshort* theVec)
+ inline void glClipPlane (GLenum thePlane, const GLdouble* theEquation)
{
- ::glRasterPos4sv (theVec);
- OpenGl_TRACE(glRasterPos4sv)
+ ::glClipPlane (thePlane, theEquation);
+ OpenGl_TRACE(glClipPlane)
}
- inline void glRectd (GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2)
- {
- ::glRectd (x1, y1, x2, y2);
- OpenGl_TRACE(glRectd)
- }
+public: //! @name Display lists (removed since 3.1)
- inline void glRectf (GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2)
+ inline void glDeleteLists (GLuint theList, GLsizei theRange)
{
- ::glRectf (x1, y1, x2, y2);
- OpenGl_TRACE(glRectf)
+ ::glDeleteLists (theList, theRange);
+ OpenGl_TRACE(glDeleteLists)
}
- inline void glRecti (GLint x1, GLint y1, GLint x2, GLint y2)
+ inline GLuint glGenLists (GLsizei theRange)
{
- ::glRecti (x1, y1, x2, y2);
- OpenGl_TRACE(glRecti)
+ const GLuint aRes = ::glGenLists (theRange);
+ OpenGl_TRACE(glGenLists)
+ return aRes;
}
- inline void glRects (GLshort x1, GLshort y1, GLshort x2, GLshort y2)
+ inline void glNewList (GLuint theList, GLenum theMode)
{
- ::glRects (x1, y1, x2, y2);
- OpenGl_TRACE(glRects)
+ ::glNewList (theList, theMode);
+ OpenGl_TRACE(glNewList)
}
- inline void glRectdv (const GLdouble* v1, const GLdouble* v2)
+ inline void glEndList()
{
- ::glRectdv (v1, v2);
- OpenGl_TRACE(glRectdv)
+ ::glEndList();
+ OpenGl_TRACE(glEndList)
}
- inline void glRectfv (const GLfloat* v1, const GLfloat* v2)
+ inline void glCallList (GLuint theList)
{
- ::glRectfv (v1, v2);
- OpenGl_TRACE(glRectfv)
+ ::glCallList (theList);
+ OpenGl_TRACE(glCallList)
}
- inline void glRectiv (const GLint* v1, const GLint* v2)
+ inline void glCallLists (GLsizei theNb, GLenum theType, const GLvoid* theLists)
{
- ::glRectiv (v1, v2);
- OpenGl_TRACE(glRectiv)
+ ::glCallLists (theNb, theType, theLists);
+ OpenGl_TRACE(glCallLists)
}
- inline void glRectsv (const GLshort* v1, const GLshort* v2)
+ inline void glListBase (GLuint theBase)
{
- ::glRectsv (v1, v2);
- OpenGl_TRACE(glRectsv)
+ ::glListBase (theBase);
+ OpenGl_TRACE(glListBase)
}
-public: //! @name Texture mapping (removed since 3.1)
+public: //! @name Current raster position and Rectangles (removed since 3.1)
- inline void glTexGend (GLenum coord, GLenum pname, GLdouble param)
+ inline void glRasterPos2i (GLint x, GLint y)
{
- ::glTexGend (coord, pname, param);
- OpenGl_TRACE(glTexGend)
+ ::glRasterPos2i (x, y);
+ OpenGl_TRACE(glRasterPos2i)
}
- inline void glTexGenf (GLenum coord, GLenum pname, GLfloat param)
+ inline void glRasterPos3fv (const GLfloat* theVec)
{
- ::glTexGenf (coord, pname, param);
- OpenGl_TRACE(glTexGenf)
+ ::glRasterPos3fv (theVec);
+ OpenGl_TRACE(glRasterPos3fv)
}
+public: //! @name Texture mapping (removed since 3.1)
+
inline void glTexGeni (GLenum coord, GLenum pname, GLint param)
{
::glTexGeni (coord, pname, param);
OpenGl_TRACE(glTexGeni)
}
- inline void glTexGendv (GLenum coord, GLenum pname, const GLdouble* params)
- {
- ::glTexGendv (coord, pname, params);
- OpenGl_TRACE(glTexGendv)
- }
-
inline void glTexGenfv (GLenum coord, GLenum pname, const GLfloat* params)
{
::glTexGenfv (coord, pname, params);
OpenGl_TRACE(glTexGenfv)
}
- inline void glTexGeniv (GLenum coord, GLenum pname, const GLint* params)
- {
- ::glTexGeniv (coord, pname, params);
- OpenGl_TRACE(glTexGeniv)
- }
-
- inline void glGetTexGendv (GLenum coord, GLenum pname, GLdouble* params)
- {
- ::glGetTexGendv (coord, pname, params);
- OpenGl_TRACE(glGetTexGendv)
- }
-
- inline void glGetTexGenfv (GLenum coord, GLenum pname, GLfloat* params)
- {
- ::glGetTexGenfv (coord, pname, params);
- OpenGl_TRACE(glGetTexGenfv)
- }
-
- inline void glGetTexGeniv (GLenum coord, GLenum pname, GLint* params)
- {
- ::glGetTexGeniv (coord, pname, params);
- OpenGl_TRACE(glGetTexGeniv)
- }
-
-public: //! @name Resident textures and priorities (removed since 3.1)
-
- inline void glPrioritizeTextures (GLsizei n, const GLuint* textures, const GLclampf* priorities)
- {
- ::glPrioritizeTextures (n, textures, priorities);
- OpenGl_TRACE(glPrioritizeTextures)
- }
-
- inline GLboolean glAreTexturesResident (GLsizei n, const GLuint* textures, GLboolean* residences)
- {
- const GLboolean aRes = ::glAreTexturesResident (n, textures, residences);
- OpenGl_TRACE(glAreTexturesResident)
- return aRes;
- }
-
public: //! @name Pixel copying (removed since 3.1)
inline void glDrawPixels (GLsizei width, GLsizei height,
OpenGl_TRACE(glBitmap)
}
- inline void glPixelZoom (GLfloat xfactor, GLfloat yfactor)
- {
- ::glPixelZoom (xfactor, yfactor);
- OpenGl_TRACE(glPixelZoom)
- }
-
-public: //! @name Fog and all associated parameters (removed since 3.1)
-
- inline void glFogf (GLenum pname, GLfloat param)
- {
- ::glFogf (pname, param);
- OpenGl_TRACE(glFogf)
- }
-
- inline void glFogi (GLenum pname, GLint param)
- {
- ::glFogi (pname, param);
- OpenGl_TRACE(glFogi)
- }
-
- inline void glFogfv (GLenum pname, const GLfloat* params)
- {
- ::glFogfv (pname, params);
- OpenGl_TRACE(glFogfv)
- }
-
- inline void glFogiv (GLenum pname, const GLint* params)
- {
- ::glFogiv (pname, params);
- OpenGl_TRACE(glFogiv)
- }
-
-public: //! @name Evaluators (removed since 3.1)
-
- inline void glMap1d (GLenum target, GLdouble u1, GLdouble u2,
- GLint stride,
- GLint order, const GLdouble* points)
- {
- ::glMap1d (target, u1, u2, stride, order, points);
- OpenGl_TRACE(glMap1d)
- }
-
- inline void glMap1f (GLenum target, GLfloat u1, GLfloat u2,
- GLint stride,
- GLint order, const GLfloat* points)
- {
- ::glMap1f (target, u1, u2, stride, order, points);
- OpenGl_TRACE(glMap1f)
- }
-
- inline void glMap2d (GLenum target,
- GLdouble u1, GLdouble u2, GLint ustride, GLint uorder,
- GLdouble v1, GLdouble v2, GLint vstride, GLint vorder,
- const GLdouble* points)
- {
- ::glMap2d (target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points);
- OpenGl_TRACE(glMap2d)
- }
-
- inline void glMap2f (GLenum target,
- GLfloat u1, GLfloat u2, GLint ustride, GLint uorder,
- GLfloat v1, GLfloat v2, GLint vstride, GLint vorder,
- const GLfloat* points)
- {
- ::glMap2f (target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points);
- OpenGl_TRACE(glMap2f)
- }
-
- inline void glGetMapdv (GLenum target, GLenum query, GLdouble* v)
- {
- ::glGetMapdv (target, query, v);
- OpenGl_TRACE(glGetMapdv)
- }
-
- inline void glGetMapfv (GLenum target, GLenum query, GLfloat* v)
- {
- ::glGetMapfv (target, query, v);
- OpenGl_TRACE(glGetMapfv)
- }
-
- inline void glGetMapiv (GLenum target, GLenum query, GLint* v)
- {
- ::glGetMapiv (target, query, v);
- OpenGl_TRACE(glGetMapiv)
- }
-
- inline void glEvalCoord1d (GLdouble u)
- {
- ::glEvalCoord1d (u);
- OpenGl_TRACE(glEvalCoord1d)
- }
-
- inline void glEvalCoord1f (GLfloat u)
- {
- ::glEvalCoord1f (u);
- OpenGl_TRACE(glEvalCoord1f)
- }
-
- inline void glEvalCoord1dv (const GLdouble* u)
- {
- ::glEvalCoord1dv (u);
- OpenGl_TRACE(glEvalCoord1dv)
- }
-
- inline void glEvalCoord1fv (const GLfloat* u)
- {
- ::glEvalCoord1fv (u);
- OpenGl_TRACE(glEvalCoord1fv)
- }
-
- inline void glEvalCoord2d (GLdouble u, GLdouble v)
- {
- ::glEvalCoord2d (u, v);
- OpenGl_TRACE(glEvalCoord2d)
- }
-
- inline void glEvalCoord2f (GLfloat u, GLfloat v)
- {
- ::glEvalCoord2f (u, v);
- OpenGl_TRACE(glEvalCoord2f)
- }
-
- inline void glEvalCoord2dv (const GLdouble* u)
- {
- ::glEvalCoord2dv (u);
- OpenGl_TRACE(glEvalCoord2dv)
- }
-
- inline void glEvalCoord2fv (const GLfloat* u)
- {
- ::glEvalCoord2fv (u);
- OpenGl_TRACE(glEvalCoord2fv)
- }
-
- inline void glMapGrid1d (GLint un, GLdouble u1, GLdouble u2)
- {
- ::glMapGrid1d (un, u1, u2);
- OpenGl_TRACE(glMapGrid1d)
- }
-
- inline void glMapGrid1f (GLint un, GLfloat u1, GLfloat u2)
- {
- ::glMapGrid1f (un, u1, u2);
- OpenGl_TRACE(glMapGrid1f)
- }
-
- inline void glMapGrid2d (GLint un, GLdouble u1, GLdouble u2,
- GLint vn, GLdouble v1, GLdouble v2)
- {
- ::glMapGrid2d (un, u1, u2, vn, v1, v2);
- OpenGl_TRACE(glMapGrid2d)
- }
-
- inline void glMapGrid2f (GLint un, GLfloat u1, GLfloat u2,
- GLint vn, GLfloat v1, GLfloat v2)
- {
- ::glMapGrid2f (un, u1, u2, vn, v1, v2);
- OpenGl_TRACE(glMapGrid2f)
- }
-
- inline void glEvalPoint1 (GLint i)
- {
- ::glEvalPoint1 (i);
- OpenGl_TRACE(glEvalPoint1)
- }
-
- inline void glEvalPoint2 (GLint i, GLint j)
- {
- ::glEvalPoint2 (i, j);
- OpenGl_TRACE(glEvalPoint2)
- }
-
- inline void glEvalMesh1 (GLenum mode, GLint i1, GLint i2)
- {
- ::glEvalMesh1 (mode, i1, i2);
- OpenGl_TRACE(glEvalMesh1)
- }
-
- inline void glEvalMesh2 (GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2)
- {
- ::glEvalMesh2 (mode, i1, i2, j1, j2);
- OpenGl_TRACE(glEvalMesh2)
- }
-
-public: //! @name Selection and feedback modes (removed since 3.1)
-
- inline void glFeedbackBuffer (GLsizei theSize, GLenum theType, GLfloat* theBuffer)
- {
- ::glFeedbackBuffer (theSize, theType, theBuffer);
- OpenGl_TRACE(glFeedbackBuffer)
- }
-
- inline void glPassThrough (GLfloat token)
- {
- ::glPassThrough (token);
- OpenGl_TRACE(glPassThrough)
- }
-
- inline void glSelectBuffer (GLsizei theSize, GLuint* theBuffer)
- {
- ::glSelectBuffer (theSize, theBuffer);
- OpenGl_TRACE(glSelectBuffer)
- }
-
- inline void glInitNames()
- {
- ::glInitNames();
- OpenGl_TRACE(glInitNames)
- }
-
- inline void glLoadName (GLuint theName)
- {
- ::glLoadName (theName);
- OpenGl_TRACE(glLoadName)
- }
-
- inline void glPushName (GLuint theName)
- {
- ::glPushName (theName);
- OpenGl_TRACE(glPushName)
- }
-
- inline void glPopName()
- {
- ::glPopName();
- OpenGl_TRACE(glPopName)
- }
-
-public: //! @name Accumulation Buffer (removed since 3.1)
-
- inline void glClearAccum (GLfloat theRed, GLfloat theGreen, GLfloat theBlue, GLfloat theAlpha)
- {
- ::glClearAccum (theRed, theGreen, theBlue, theAlpha);
- OpenGl_TRACE(glClearAccum)
- }
-
- inline void glAccum (GLenum theOp, GLfloat theValue)
- {
- ::glAccum (theOp, theValue);
- OpenGl_TRACE(glAccum)
- }
-
public: //! @name Edge flags and fixed-function vertex processing (removed since 3.1)
- inline void glEdgeFlag (GLboolean theFlag)
- {
- ::glEdgeFlag (theFlag);
- OpenGl_TRACE(glEdgeFlag)
- }
-
- inline void glEdgeFlagv (const GLboolean* theFlag)
- {
- ::glEdgeFlagv (theFlag);
- OpenGl_TRACE(glEdgeFlagv)
- }
-
inline void glIndexPointer (GLenum theType, GLsizei theStride, const GLvoid* thePtr)
{
::glIndexPointer (theType, theStride, thePtr);
OpenGl_TRACE(glIndexPointer)
}
- inline void glEdgeFlagPointer (GLsizei theStride, const GLvoid* thePtr)
- {
- ::glEdgeFlagPointer (theStride, thePtr);
- OpenGl_TRACE(glEdgeFlagPointer)
- }
-
- inline void glGetPointerv (GLenum pname, GLvoid** params)
- {
- ::glGetPointerv(pname, params);
- OpenGl_TRACE(glGetPointerv)
- }
-
- inline void glInterleavedArrays (GLenum theFormat, GLsizei theStride, const GLvoid* thePointer)
- {
- ::glInterleavedArrays (theFormat, theStride, thePointer);
- OpenGl_TRACE(glInterleavedArrays)
- }
-
inline void glVertexPointer (GLint theSize, GLenum theType, GLsizei theStride, const GLvoid* thePtr)
{
::glVertexPointer (theSize, theType, theStride, thePtr);
#include <OpenGl_GlCore11.hxx>
//! OpenGL 1.2 core based on 1.1 version.
-template<typename theBaseClass_t>
-struct OpenGl_TmplCore12 : public theBaseClass_t
+struct OpenGl_GlCore12 : public OpenGl_GlCore11Fwd
{
+private:
+ typedef OpenGl_GlCore11Fwd theBaseClass_t;
public: //! @name OpenGL 1.2 additives to 1.1
};
-//! OpenGL 1.2 core based on 1.1 version.
-typedef OpenGl_TmplCore12<OpenGl_GlCore11> OpenGl_GlCore12;
-
-//! OpenGL 1.2 without deprecated entry points.
-typedef OpenGl_TmplCore12<OpenGl_GlCore11Fwd> OpenGl_GlCore12Fwd;
-
#endif // _OpenGl_GlCore12_Header
#include <OpenGl_GlCore12.hxx>
//! OpenGL 1.3 without deprecated entry points.
-struct OpenGl_GlCore13Fwd : public OpenGl_GlCore12Fwd
-{
-
-public: //! @name OpenGL 1.3 additives to 1.2
-
-#if !defined(GL_ES_VERSION_2_0)
- using OpenGl_GlFunctions::glCompressedTexImage3D;
- using OpenGl_GlFunctions::glCompressedTexImage1D;
- using OpenGl_GlFunctions::glCompressedTexSubImage3D;
- using OpenGl_GlFunctions::glCompressedTexSubImage1D;
- using OpenGl_GlFunctions::glGetCompressedTexImage;
-#endif
-
- using OpenGl_GlFunctions::glActiveTexture;
- using OpenGl_GlFunctions::glSampleCoverage;
- using OpenGl_GlFunctions::glCompressedTexImage2D;
- using OpenGl_GlFunctions::glCompressedTexSubImage2D;
-
-};
-
-//! OpenGL 1.3 core based on 1.2 version.
struct OpenGl_GlCore13 : public OpenGl_GlCore12
{
using OpenGl_GlFunctions::glCompressedTexImage2D;
using OpenGl_GlFunctions::glCompressedTexSubImage2D;
-#if !defined(GL_ES_VERSION_2_0)
-
-public: //! @name Begin/End primitive specification (removed since 3.1)
-
- using OpenGl_GlFunctions::glMultiTexCoord1d;
- using OpenGl_GlFunctions::glMultiTexCoord1dv;
- using OpenGl_GlFunctions::glMultiTexCoord1f;
- using OpenGl_GlFunctions::glMultiTexCoord1fv;
- using OpenGl_GlFunctions::glMultiTexCoord1i;
- using OpenGl_GlFunctions::glMultiTexCoord1iv;
- using OpenGl_GlFunctions::glMultiTexCoord1s;
- using OpenGl_GlFunctions::glMultiTexCoord1sv;
- using OpenGl_GlFunctions::glMultiTexCoord2d;
- using OpenGl_GlFunctions::glMultiTexCoord2dv;
- using OpenGl_GlFunctions::glMultiTexCoord2f;
- using OpenGl_GlFunctions::glMultiTexCoord2fv;
- using OpenGl_GlFunctions::glMultiTexCoord2i;
- using OpenGl_GlFunctions::glMultiTexCoord2iv;
- using OpenGl_GlFunctions::glMultiTexCoord2s;
- using OpenGl_GlFunctions::glMultiTexCoord2sv;
- using OpenGl_GlFunctions::glMultiTexCoord3d;
- using OpenGl_GlFunctions::glMultiTexCoord3dv;
- using OpenGl_GlFunctions::glMultiTexCoord3f;
- using OpenGl_GlFunctions::glMultiTexCoord3fv;
- using OpenGl_GlFunctions::glMultiTexCoord3i;
- using OpenGl_GlFunctions::glMultiTexCoord3iv;
- using OpenGl_GlFunctions::glMultiTexCoord3s;
- using OpenGl_GlFunctions::glMultiTexCoord3sv;
- using OpenGl_GlFunctions::glMultiTexCoord4d;
- using OpenGl_GlFunctions::glMultiTexCoord4dv;
- using OpenGl_GlFunctions::glMultiTexCoord4f;
- using OpenGl_GlFunctions::glMultiTexCoord4fv;
- using OpenGl_GlFunctions::glMultiTexCoord4i;
- using OpenGl_GlFunctions::glMultiTexCoord4iv;
- using OpenGl_GlFunctions::glMultiTexCoord4s;
- using OpenGl_GlFunctions::glMultiTexCoord4sv;
-
- using OpenGl_GlFunctions::glClientActiveTexture;
-
-public: //! @name Matrix operations (removed since 3.1)
-
- using OpenGl_GlFunctions::glLoadTransposeMatrixf;
- using OpenGl_GlFunctions::glLoadTransposeMatrixd;
- using OpenGl_GlFunctions::glMultTransposeMatrixf;
- using OpenGl_GlFunctions::glMultTransposeMatrixd;
-
-#endif
-
};
#endif // _OpenGl_GlCore13_Header
#include <OpenGl_GlCore13.hxx>
//! OpenGL 1.4 core based on 1.3 version.
-template<typename theBaseClass_t>
-struct OpenGl_TmplCore14 : public theBaseClass_t
+struct OpenGl_GlCore14 : public OpenGl_GlCore13
{
+private:
+ typedef OpenGl_GlCore13 theBaseClass_t;
public: //! @name OpenGL 1.4 additives to 1.3
};
-//! OpenGL 1.4 core based on 1.3 version.
-typedef OpenGl_TmplCore14<OpenGl_GlCore13> OpenGl_GlCore14;
-
-//! OpenGL 1.4 without deprecated entry points.
-typedef OpenGl_TmplCore14<OpenGl_GlCore13Fwd> OpenGl_GlCore14Fwd;
-
#endif // _OpenGl_GlCore14_Header
#include <OpenGl_GlCore14.hxx>
-/**
- * OpenGL 1.5 core based on 1.4 version.
- */
-template<typename theBaseClass_t>
-struct OpenGl_TmplCore15 : public theBaseClass_t
+//! OpenGL 1.5 core based on 1.4 version.
+struct OpenGl_GlCore15 : public OpenGl_GlCore14
{
+private:
+ typedef OpenGl_GlCore14 theBaseClass_t;
public: //! @name OpenGL 1.5 additives to 1.4
};
-//! OpenGL 1.5 core based on 1.4 version.
-typedef OpenGl_TmplCore15<OpenGl_GlCore14> OpenGl_GlCore15;
-
-//! OpenGL 1.5 without deprecated entry points.
-typedef OpenGl_TmplCore15<OpenGl_GlCore14Fwd> OpenGl_GlCore15Fwd;
-
#endif // _OpenGl_GlCore15_Header
#include <OpenGl_GlCore15.hxx>
//! OpenGL 2.0 core based on 1.5 version.
-template<typename theBaseClass_t>
-struct OpenGl_TmplCore20 : public theBaseClass_t
+struct OpenGl_GlCore20 : public OpenGl_GlCore15
{
+private:
+ typedef OpenGl_GlCore15 theBaseClass_t;
public: //! @name OpenGL 2.0 additives to 1.5
};
-//! OpenGL 2.0 core based on 1.5 version.
-typedef OpenGl_TmplCore20<OpenGl_GlCore15> OpenGl_GlCore20;
-
-//! OpenGL 2.0 without deprecated entry points.
-typedef OpenGl_TmplCore20<OpenGl_GlCore15Fwd> OpenGl_GlCore20Fwd;
-
#endif // _OpenGl_GlCore20_Header
#include <OpenGl_GlCore20.hxx>
//! OpenGL 2.1 core based on 2.0 version.
-template<typename theBaseClass_t>
-struct OpenGl_TmplCore21 : public theBaseClass_t
+struct OpenGl_GlCore21 : public OpenGl_GlCore20
{
+private:
+ typedef OpenGl_GlCore20 theBaseClass_t;
public: //! @name OpenGL 2.1 additives to 2.0
};
-//! OpenGL 2.1 core based on 2.0 version.
-typedef OpenGl_TmplCore21<OpenGl_GlCore20> OpenGl_GlCore21;
-
-//! OpenGL 2.1 without deprecated entry points.
-typedef OpenGl_TmplCore21<OpenGl_GlCore20Fwd> OpenGl_GlCore21Fwd;
-
#endif // _OpenGl_GlCore21_Header
//! This is first version with deprecation model introduced
//! - a lot of functionality regarding to fixed pipeline were marked deprecated.
//! Notice that nothing were actually removed in this version (unless Forward context loaded)!
-template<typename theBaseClass_t>
-struct OpenGl_TmplCore30 : public theBaseClass_t
+struct OpenGl_GlCore30 : public OpenGl_GlCore21
{
+private:
+ typedef OpenGl_GlCore21 theBaseClass_t;
public: //! @name GL_ARB_framebuffer_object (added to OpenGL 3.0 core)
#endif
};
-//! OpenGL 3.0 core based on 2.1 version.
-typedef OpenGl_TmplCore30<OpenGl_GlCore21> OpenGl_GlCore30;
-
-//! OpenGL 3.0 without deprecated entry points.
-//! Notice that this doesn't actually corresponds to GL3.0 forward profile!
-typedef OpenGl_TmplCore30<OpenGl_GlCore21Fwd> OpenGl_GlCore30Fwd;
-
#endif // _OpenGl_GlCore30_Header
#include <OpenGl_GlCore30.hxx>
//! OpenGL 3.1 definition.
-template<typename theBaseClass_t>
-struct OpenGl_TmplCore31 : public theBaseClass_t
+struct OpenGl_GlCore31 : public OpenGl_GlCore30
{
+private:
+ typedef OpenGl_GlCore30 theBaseClass_t;
public: //! @name GL_ARB_uniform_buffer_object (added to OpenGL 3.1 core)
};
-//! OpenGL 3.1 compatibility profile.
-typedef OpenGl_TmplCore31<OpenGl_GlCore30> OpenGl_GlCore31Back;
-
-//! OpenGL 3.1 core profile (without removed entry points marked as deprecated in 3.0).
-//! Notice that GLSL versions 1.10 and 1.20 also removed in 3.1!
-typedef OpenGl_TmplCore31<OpenGl_GlCore30Fwd> OpenGl_GlCore31;
-
#endif // _OpenGl_GlCore31_Header
#include <OpenGl_GlCore31.hxx>
//! OpenGL 3.2 definition.
-template<typename theBaseClass_t>
-struct OpenGl_TmplCore32 : public theBaseClass_t
+struct OpenGl_GlCore32 : public OpenGl_GlCore31
{
+private:
+ typedef OpenGl_GlCore31 theBaseClass_t;
#if !defined(GL_ES_VERSION_2_0)
};
-//! OpenGL 3.2 compatibility profile.
-typedef OpenGl_TmplCore32<OpenGl_GlCore31Back> OpenGl_GlCore32Back;
-
-//! OpenGL 3.2 core profile.
-typedef OpenGl_TmplCore32<OpenGl_GlCore31> OpenGl_GlCore32;
-
#endif // _OpenGl_GlCore32_Header
#include <OpenGl_GlCore32.hxx>
//! OpenGL 3.3 definition.
-template<typename theBaseClass_t>
-struct OpenGl_TmplCore33 : public theBaseClass_t
+struct OpenGl_GlCore33 : public OpenGl_GlCore32
{
+private:
+ typedef OpenGl_GlCore32 theBaseClass_t;
#if !defined(GL_ES_VERSION_2_0)
};
-//! OpenGL 3.3 compatibility profile.
-typedef OpenGl_TmplCore33<OpenGl_GlCore32Back> OpenGl_GlCore33Back;
-
-//! OpenGL 3.3 core profile.
-typedef OpenGl_TmplCore33<OpenGl_GlCore32> OpenGl_GlCore33;
-
#endif // _OpenGl_GlCore33_Header
#include <OpenGl_GlCore33.hxx>
//! OpenGL 4.0 definition.
-template<typename theBaseClass_t>
-struct OpenGl_TmplCore40 : public theBaseClass_t
+struct OpenGl_GlCore40 : public OpenGl_GlCore33
{
+private:
+ typedef OpenGl_GlCore33 theBaseClass_t;
#if !defined(GL_ES_VERSION_2_0)
};
-//! OpenGL 4.0 compatibility profile.
-typedef OpenGl_TmplCore40<OpenGl_GlCore33Back> OpenGl_GlCore40Back;
-
-//! OpenGL 4.0 core profile.
-typedef OpenGl_TmplCore40<OpenGl_GlCore33> OpenGl_GlCore40;
-
#endif // _OpenGl_GlCore40_Header
#include <OpenGl_GlCore40.hxx>
//! OpenGL 4.1 definition.
-template<typename theBaseClass_t>
-struct OpenGl_TmplCore41 : public theBaseClass_t
+struct OpenGl_GlCore41 : public OpenGl_GlCore40
{
+private:
+ typedef OpenGl_GlCore40 theBaseClass_t;
#if !defined(GL_ES_VERSION_2_0)
using theBaseClass_t::glGetFloati_v;
using theBaseClass_t::glGetDoublei_v;
-public: //! @name OpenGL 4.1 additives to 4.0
-
#endif
};
-//! OpenGL 4.1 compatibility profile.
-typedef OpenGl_TmplCore41<OpenGl_GlCore40Back> OpenGl_GlCore41Back;
-
-//! OpenGL 4.1 core profile.
-typedef OpenGl_TmplCore41<OpenGl_GlCore40> OpenGl_GlCore41;
-
#endif // _OpenGl_GlCore41_Header
#include <OpenGl_GlCore41.hxx>
//! OpenGL 4.2 definition.
-template<typename theBaseClass_t>
-struct OpenGl_TmplCore42 : public theBaseClass_t
+struct OpenGl_GlCore42 : public OpenGl_GlCore41
{
+private:
+ typedef OpenGl_GlCore41 theBaseClass_t;
#if !defined(GL_ES_VERSION_2_0)
};
-//! OpenGL 4.2 compatibility profile.
-typedef OpenGl_TmplCore42<OpenGl_GlCore41Back> OpenGl_GlCore42Back;
-
-//! OpenGL 4.2 core profile.
-typedef OpenGl_TmplCore42<OpenGl_GlCore41> OpenGl_GlCore42;
-
-
#endif // _OpenGl_GlCore42_Header
#include <OpenGl_GlCore42.hxx>
//! OpenGL 4.3 definition.
-template<typename theBaseClass_t>
-struct OpenGl_TmplCore43 : public theBaseClass_t
+struct OpenGl_GlCore43 : public OpenGl_GlCore42
{
+private:
+ typedef OpenGl_GlCore42 theBaseClass_t;
public: //! @name OpenGL 4.3 additives to 4.2
};
-//! OpenGL 4.3 compatibility profile.
-typedef OpenGl_TmplCore43<OpenGl_GlCore42Back> OpenGl_GlCore43Back;
-
-//! OpenGL 4.3 core profile.
-typedef OpenGl_TmplCore43<OpenGl_GlCore42> OpenGl_GlCore43;
-
#endif // _OpenGl_GlCore43_Header
#include <OpenGl_GlCore43.hxx>
//! OpenGL 4.4 definition.
-template<typename theBaseClass_t>
-struct OpenGl_TmplCore44 : public theBaseClass_t
+struct OpenGl_GlCore44 : public OpenGl_GlCore43
{
+private:
+ typedef OpenGl_GlCore43 theBaseClass_t;
public: //! @name OpenGL 4.4 additives to 4.3
};
-//! OpenGL 4.4 compatibility profile.
-typedef OpenGl_TmplCore44<OpenGl_GlCore43Back> OpenGl_GlCore44Back;
-
-//! OpenGL 4.4 core profile.
-typedef OpenGl_TmplCore44<OpenGl_GlCore43> OpenGl_GlCore44;
-
#endif // _OpenGl_GlCore44_Header
#include <OpenGl_GlCore44.hxx>
//! OpenGL 4.5 definition.
-template<typename theBaseClass_t>
-struct OpenGl_TmplCore45 : public theBaseClass_t
+struct OpenGl_GlCore45 : public OpenGl_GlCore44
{
+private:
+ typedef OpenGl_GlCore44 theBaseClass_t;
public: //! @name OpenGL 4.5 additives to 4.4
};
-//! OpenGL 4.5 compatibility profile.
-typedef OpenGl_TmplCore45<OpenGl_GlCore44Back> OpenGl_GlCore45Back;
-
-//! OpenGL 4.5 core profile.
-typedef OpenGl_TmplCore45<OpenGl_GlCore44> OpenGl_GlCore45;
-
#endif // _OpenGl_GlCore45_Header
#include <OpenGl_GlCore45.hxx>
//! OpenGL 4.6 definition.
-template<typename theBaseClass_t>
-struct OpenGl_TmplCore46 : public theBaseClass_t
+struct OpenGl_GlCore46 : public OpenGl_GlCore45
{
+private:
+ typedef OpenGl_GlCore45 theBaseClass_t;
public: //! @name OpenGL 4.6 additives to 4.5
};
-//! OpenGL 4.6 compatibility profile.
-typedef OpenGl_TmplCore46<OpenGl_GlCore45Back> OpenGl_GlCore46Back;
-
-//! OpenGL 4.6 core profile.
-typedef OpenGl_TmplCore46<OpenGl_GlCore45> OpenGl_GlCore46;
-
#endif // _OpenGl_GlCore46_Header
{
#if defined(GL_ES_VERSION_2_0)
(void )theIsCoreProfile;
- theCtx.core11 = NULL;
+ theCtx.core11ffp = NULL;
#else
- const bool isCoreProfile = theIsCoreProfile;
- theCtx.core11 = !isCoreProfile ? (OpenGl_GlCore11* )this : NULL;
+ theCtx.core11ffp = !theIsCoreProfile ? (OpenGl_GlCore11* )this : NULL;
#endif
theCtx.core11fwd = (OpenGl_GlCore11Fwd* )this;
theCtx.core15 = NULL;
theCtx.core20 = NULL;
theCtx.core20fwd = NULL;
theCtx.core30 = NULL;
- theCtx.core30fwd = NULL;
theCtx.core32 = NULL;
- theCtx.core32back = NULL;
theCtx.core33 = NULL;
- theCtx.core33back = NULL;
theCtx.core41 = NULL;
- theCtx.core41back = NULL;
theCtx.core42 = NULL;
- theCtx.core42back = NULL;
theCtx.core43 = NULL;
- theCtx.core43back = NULL;
theCtx.core44 = NULL;
- theCtx.core44back = NULL;
theCtx.core45 = NULL;
- theCtx.core45back = NULL;
theCtx.core46 = NULL;
- theCtx.core46back = NULL;
theCtx.arbTBO = NULL;
theCtx.arbTboRGB32 = false;
theCtx.arbClipControl = false;
if (isGlGreaterEqualShort (2, 0))
{
// enable compatible functions
- theCtx.core20 = (OpenGl_GlCore20* )this;
- theCtx.core20fwd = (OpenGl_GlCore20Fwd* )this;
- theCtx.core15fwd = (OpenGl_GlCore15Fwd* )this;
- theCtx.arbFBO = (OpenGl_ArbFBO* )this;
+ theCtx.core20 = (OpenGl_GlCore20* )this;
+ theCtx.core20fwd = (OpenGl_GlCore20* )this;
+ theCtx.core15 = (OpenGl_GlCore15* )this;
+ theCtx.core15fwd = (OpenGl_GlCore15* )this;
+ theCtx.arbFBO = (OpenGl_ArbFBO* )this;
}
if (isGlGreaterEqualShort (3, 0)
&& FindProcShort (glBlitFramebuffer))
}
else
{
- theCtx.core30 = (OpenGl_GlCore30* )this;
- theCtx.core30fwd = (OpenGl_GlCore30Fwd* )this;
+ theCtx.core30 = (OpenGl_GlCore30* )this;
theCtx.hasGetBufferData = true;
}
&& FindProcShort (glCompressedTexSubImage2D)
&& FindProcShort (glCompressedTexSubImage1D)
&& FindProcShort (glGetCompressedTexImage);
-
- if (!isCoreProfile)
- {
- has13 = has13
- && FindProcShort (glClientActiveTexture)
- && FindProcShort (glMultiTexCoord1d)
- && FindProcShort (glMultiTexCoord1dv)
- && FindProcShort (glMultiTexCoord1f)
- && FindProcShort (glMultiTexCoord1fv)
- && FindProcShort (glMultiTexCoord1i)
- && FindProcShort (glMultiTexCoord1iv)
- && FindProcShort (glMultiTexCoord1s)
- && FindProcShort (glMultiTexCoord1sv)
- && FindProcShort (glMultiTexCoord2d)
- && FindProcShort (glMultiTexCoord2dv)
- && FindProcShort (glMultiTexCoord2f)
- && FindProcShort (glMultiTexCoord2fv)
- && FindProcShort (glMultiTexCoord2i)
- && FindProcShort (glMultiTexCoord2iv)
- && FindProcShort (glMultiTexCoord2s)
- && FindProcShort (glMultiTexCoord2sv)
- && FindProcShort (glMultiTexCoord3d)
- && FindProcShort (glMultiTexCoord3dv)
- && FindProcShort (glMultiTexCoord3f)
- && FindProcShort (glMultiTexCoord3fv)
- && FindProcShort (glMultiTexCoord3i)
- && FindProcShort (glMultiTexCoord3iv)
- && FindProcShort (glMultiTexCoord3s)
- && FindProcShort (glMultiTexCoord3sv)
- && FindProcShort (glMultiTexCoord4d)
- && FindProcShort (glMultiTexCoord4dv)
- && FindProcShort (glMultiTexCoord4f)
- && FindProcShort (glMultiTexCoord4fv)
- && FindProcShort (glMultiTexCoord4i)
- && FindProcShort (glMultiTexCoord4iv)
- && FindProcShort (glMultiTexCoord4s)
- && FindProcShort (glMultiTexCoord4sv)
- && FindProcShort (glLoadTransposeMatrixf)
- && FindProcShort (glLoadTransposeMatrixd)
- && FindProcShort (glMultTransposeMatrixf)
- && FindProcShort (glMultTransposeMatrixd);
- }
if (!has13)
{
theCtx.checkWrongVersion (1, 3, aLastFailedProc);
&& FindProcShort (glGetBufferPointerv);
if (has15)
{
- if (!isCoreProfile)
- {
- theCtx.core15 = (OpenGl_GlCore15* )this;
- }
- theCtx.core15fwd = (OpenGl_GlCore15Fwd* )this;
+ theCtx.core15 = (OpenGl_GlCore15* )this;
+ theCtx.core15fwd = (OpenGl_GlCore15* )this;
theCtx.hasGetBufferData = true;
}
else
}
else
{
- if (!isCoreProfile)
- {
- theCtx.core20 = (OpenGl_GlCore20* )this;
- }
- theCtx.core20fwd = (OpenGl_GlCore20Fwd* )this;
+ theCtx.core20 = (OpenGl_GlCore20* )this;
+ theCtx.core20fwd = (OpenGl_GlCore20* )this;
}
}
else
theCtx.arbNPTW = true;
theCtx.arbTexRG = true;
- if (!isCoreProfile)
- {
- theCtx.core30 = (OpenGl_GlCore30* )this;
- }
- theCtx.core30fwd = (OpenGl_GlCore30Fwd* )this;
+ theCtx.core30 = (OpenGl_GlCore30* )this;
}
// load OpenGL 3.1 new functions
if (has32)
{
theCtx.core32 = (OpenGl_GlCore32* )this;
- if (!isCoreProfile)
- {
- theCtx.core32back = (OpenGl_GlCore32Back* )this;
- }
}
else
{
&& FindProcShort (glVertexAttribP4ui)
&& FindProcShort (glVertexAttribP4uiv);
- if ( hasVertType21010101rev
- && !isCoreProfile)
- {
- // load deprecated functions
- const bool hasVertType21010101revExt =
- FindProcShort (glVertexP2ui)
- && FindProcShort (glVertexP2uiv)
- && FindProcShort (glVertexP3ui)
- && FindProcShort (glVertexP3uiv)
- && FindProcShort (glVertexP4ui)
- && FindProcShort (glVertexP4uiv)
- && FindProcShort (glTexCoordP1ui)
- && FindProcShort (glTexCoordP1uiv)
- && FindProcShort (glTexCoordP2ui)
- && FindProcShort (glTexCoordP2uiv)
- && FindProcShort (glTexCoordP3ui)
- && FindProcShort (glTexCoordP3uiv)
- && FindProcShort (glTexCoordP4ui)
- && FindProcShort (glTexCoordP4uiv)
- && FindProcShort (glMultiTexCoordP1ui)
- && FindProcShort (glMultiTexCoordP1uiv)
- && FindProcShort (glMultiTexCoordP2ui)
- && FindProcShort (glMultiTexCoordP2uiv)
- && FindProcShort (glMultiTexCoordP3ui)
- && FindProcShort (glMultiTexCoordP3uiv)
- && FindProcShort (glMultiTexCoordP4ui)
- && FindProcShort (glMultiTexCoordP4uiv)
- && FindProcShort (glNormalP3ui)
- && FindProcShort (glNormalP3uiv)
- && FindProcShort (glColorP3ui)
- && FindProcShort (glColorP3uiv)
- && FindProcShort (glColorP4ui)
- && FindProcShort (glColorP4uiv)
- && FindProcShort (glSecondaryColorP3ui)
- && FindProcShort (glSecondaryColorP3uiv);
- (void )hasVertType21010101revExt;
- }
-
// load OpenGL 3.3 extra functions
has33 = isGlGreaterEqualShort (3, 3)
&& hasBlendFuncExtended
if (has33)
{
theCtx.core33 = (OpenGl_GlCore33* )this;
- if (!isCoreProfile)
- {
- theCtx.core33back = (OpenGl_GlCore33Back* )this;
- }
}
else
{
if (has41)
{
theCtx.core41 = (OpenGl_GlCore41* )this;
- if (!isCoreProfile)
- {
- theCtx.core41back = (OpenGl_GlCore41Back* )this;
- }
}
else
{
if (has42)
{
theCtx.core42 = (OpenGl_GlCore42* )this;
- if (!isCoreProfile)
- {
- theCtx.core42back = (OpenGl_GlCore42Back* )this;
- }
}
else
{
if (has43)
{
theCtx.core43 = (OpenGl_GlCore43* )this;
- if (!isCoreProfile)
- {
- theCtx.core43back = (OpenGl_GlCore43Back* )this;
- }
}
else
{
if (has44)
{
theCtx.core44 = (OpenGl_GlCore44* )this;
- if (!isCoreProfile)
- {
- theCtx.core44back = (OpenGl_GlCore44Back* )this;
- }
}
else
{
{
theCtx.core45 = (OpenGl_GlCore45* )this;
theCtx.arbClipControl = true;
- if (!isCoreProfile)
- {
- theCtx.core45back = (OpenGl_GlCore45Back* )this;
- }
}
else
{
if (has46)
{
theCtx.core46 = (OpenGl_GlCore46* )this;
- if (!isCoreProfile)
- {
- theCtx.core46back = (OpenGl_GlCore46Back* )this;
- }
}
else
{
PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC glCompressedTexSubImage1D;
PFNGLGETCOMPRESSEDTEXIMAGEPROC glGetCompressedTexImage;
- PFNGLCLIENTACTIVETEXTUREPROC glClientActiveTexture;
- PFNGLMULTITEXCOORD1DPROC glMultiTexCoord1d;
- PFNGLMULTITEXCOORD1DVPROC glMultiTexCoord1dv;
- PFNGLMULTITEXCOORD1FPROC glMultiTexCoord1f;
- PFNGLMULTITEXCOORD1FVPROC glMultiTexCoord1fv;
- PFNGLMULTITEXCOORD1IPROC glMultiTexCoord1i;
- PFNGLMULTITEXCOORD1IVPROC glMultiTexCoord1iv;
- PFNGLMULTITEXCOORD1SPROC glMultiTexCoord1s;
- PFNGLMULTITEXCOORD1SVPROC glMultiTexCoord1sv;
- PFNGLMULTITEXCOORD2DPROC glMultiTexCoord2d;
- PFNGLMULTITEXCOORD2DVPROC glMultiTexCoord2dv;
- PFNGLMULTITEXCOORD2FPROC glMultiTexCoord2f;
- PFNGLMULTITEXCOORD2FVPROC glMultiTexCoord2fv;
- PFNGLMULTITEXCOORD2IPROC glMultiTexCoord2i;
- PFNGLMULTITEXCOORD2IVPROC glMultiTexCoord2iv;
- PFNGLMULTITEXCOORD2SPROC glMultiTexCoord2s;
- PFNGLMULTITEXCOORD2SVPROC glMultiTexCoord2sv;
- PFNGLMULTITEXCOORD3DPROC glMultiTexCoord3d;
- PFNGLMULTITEXCOORD3DVPROC glMultiTexCoord3dv;
- PFNGLMULTITEXCOORD3FPROC glMultiTexCoord3f;
- PFNGLMULTITEXCOORD3FVPROC glMultiTexCoord3fv;
- PFNGLMULTITEXCOORD3IPROC glMultiTexCoord3i;
- PFNGLMULTITEXCOORD3IVPROC glMultiTexCoord3iv;
- PFNGLMULTITEXCOORD3SPROC glMultiTexCoord3s;
- PFNGLMULTITEXCOORD3SVPROC glMultiTexCoord3sv;
- PFNGLMULTITEXCOORD4DPROC glMultiTexCoord4d;
- PFNGLMULTITEXCOORD4DVPROC glMultiTexCoord4dv;
- PFNGLMULTITEXCOORD4FPROC glMultiTexCoord4f;
- PFNGLMULTITEXCOORD4FVPROC glMultiTexCoord4fv;
- PFNGLMULTITEXCOORD4IPROC glMultiTexCoord4i;
- PFNGLMULTITEXCOORD4IVPROC glMultiTexCoord4iv;
- PFNGLMULTITEXCOORD4SPROC glMultiTexCoord4s;
- PFNGLMULTITEXCOORD4SVPROC glMultiTexCoord4sv;
- PFNGLLOADTRANSPOSEMATRIXFPROC glLoadTransposeMatrixf;
- PFNGLLOADTRANSPOSEMATRIXDPROC glLoadTransposeMatrixd;
- PFNGLMULTTRANSPOSEMATRIXFPROC glMultTransposeMatrixf;
- PFNGLMULTTRANSPOSEMATRIXDPROC glMultTransposeMatrixd;
-
public: //! @name OpenGL 1.4
PFNGLBLENDFUNCSEPARATEPROC glBlendFuncSeparate;
public: //! @name GL_ARB_vertex_type_2_10_10_10_rev (added to OpenGL 3.3 core)
- PFNGLVERTEXP2UIPROC glVertexP2ui;
- PFNGLVERTEXP2UIVPROC glVertexP2uiv;
- PFNGLVERTEXP3UIPROC glVertexP3ui;
- PFNGLVERTEXP3UIVPROC glVertexP3uiv;
- PFNGLVERTEXP4UIPROC glVertexP4ui;
- PFNGLVERTEXP4UIVPROC glVertexP4uiv;
- PFNGLTEXCOORDP1UIPROC glTexCoordP1ui;
- PFNGLTEXCOORDP1UIVPROC glTexCoordP1uiv;
- PFNGLTEXCOORDP2UIPROC glTexCoordP2ui;
- PFNGLTEXCOORDP2UIVPROC glTexCoordP2uiv;
- PFNGLTEXCOORDP3UIPROC glTexCoordP3ui;
- PFNGLTEXCOORDP3UIVPROC glTexCoordP3uiv;
- PFNGLTEXCOORDP4UIPROC glTexCoordP4ui;
- PFNGLTEXCOORDP4UIVPROC glTexCoordP4uiv;
- PFNGLMULTITEXCOORDP1UIPROC glMultiTexCoordP1ui;
- PFNGLMULTITEXCOORDP1UIVPROC glMultiTexCoordP1uiv;
- PFNGLMULTITEXCOORDP2UIPROC glMultiTexCoordP2ui;
- PFNGLMULTITEXCOORDP2UIVPROC glMultiTexCoordP2uiv;
- PFNGLMULTITEXCOORDP3UIPROC glMultiTexCoordP3ui;
- PFNGLMULTITEXCOORDP3UIVPROC glMultiTexCoordP3uiv;
- PFNGLMULTITEXCOORDP4UIPROC glMultiTexCoordP4ui;
- PFNGLMULTITEXCOORDP4UIVPROC glMultiTexCoordP4uiv;
- PFNGLNORMALP3UIPROC glNormalP3ui;
- PFNGLNORMALP3UIVPROC glNormalP3uiv;
- PFNGLCOLORP3UIPROC glColorP3ui;
- PFNGLCOLORP3UIVPROC glColorP3uiv;
- PFNGLCOLORP4UIPROC glColorP4ui;
- PFNGLCOLORP4UIVPROC glColorP4uiv;
- PFNGLSECONDARYCOLORP3UIPROC glSecondaryColorP3ui;
- PFNGLSECONDARYCOLORP3UIVPROC glSecondaryColorP3uiv;
PFNGLVERTEXATTRIBP1UIPROC glVertexAttribP1ui;
PFNGLVERTEXATTRIBP1UIVPROC glVertexAttribP1uiv;
PFNGLVERTEXATTRIBP2UIPROC glVertexAttribP2ui;
{
for (OpenGl_MapOfHatchStylesAndIds::Iterator anIter (myStyles); anIter.More(); anIter.Next())
{
- theGlCtx->core11->glDeleteLists ((GLuint)anIter.Value(), 1);
+ theGlCtx->core11ffp->glDeleteLists ((GLuint)anIter.Value(), 1);
}
}
#else
const Handle(Graphic3d_HatchStyle)& theStyle)
{
#if !defined(GL_ES_VERSION_2_0)
- const unsigned int aListId = theGlCtx->core11->glGenLists(1);
- theGlCtx->core11->glNewList ((GLuint)aListId, GL_COMPILE);
- theGlCtx->core11->glPolygonStipple ((const GLubyte*)theStyle->Pattern());
- theGlCtx->core11->glEndList();
+ const unsigned int aListId = theGlCtx->core11ffp->glGenLists(1);
+ theGlCtx->core11ffp->glNewList ((GLuint)aListId, GL_COMPILE);
+ theGlCtx->core11ffp->glPolygonStipple ((const GLubyte*)theStyle->Pattern());
+ theGlCtx->core11ffp->glEndList();
return aListId;
#else
(void )theGlCtx;
{
if (theStyle.IsNull()
|| theStyle->HatchType() == Aspect_HS_SOLID
- || theGlCtx->core11 == NULL)
+ || theGlCtx->core11ffp == NULL)
{
return false;
}
}
#if !defined(GL_ES_VERSION_2_0)
- theGlCtx->core11->glCallList ((GLuint)aGpuListId);
+ theGlCtx->core11ffp->glCallList ((GLuint)aGpuListId);
#endif
return true;
}
: myDrawMode;
#if !defined(GL_ES_VERSION_2_0)
if (aGlContext->ActiveProgram().IsNull()
- && aGlContext->core11 != NULL)
+ && aGlContext->core11ffp != NULL)
{
- glDisable (GL_LIGHTING);
+ aGlContext->core11fwd->glDisable (GL_LIGHTING);
}
#endif
for (Standard_Integer aGroupIter = 0; aGroupIter < myBounds->NbBounds; ++aGroupIter)
{
const GLint aNbElemsInGroup = myBounds->Bounds[aGroupIter];
- glDrawElements (aDrawMode, aNbElemsInGroup, myVboIndices->GetDataType(), anOffset);
+ aGlContext->core11fwd->glDrawElements (aDrawMode, aNbElemsInGroup, myVboIndices->GetDataType(), anOffset);
anOffset += aStride * aNbElemsInGroup;
}
}
// draw one (or sequential) primitive by the indices
else
{
- glDrawElements (aDrawMode, myVboIndices->GetElemsNb(), myVboIndices->GetDataType(), anOffset);
+ aGlContext->core11fwd->glDrawElements (aDrawMode, myVboIndices->GetElemsNb(), myVboIndices->GetDataType(), anOffset);
}
myVboIndices->Unbind (aGlContext);
}
for (Standard_Integer aGroupIter = 0; aGroupIter < myBounds->NbBounds; ++aGroupIter)
{
const GLint aNbElemsInGroup = myBounds->Bounds[aGroupIter];
- glDrawArrays (aDrawMode, aFirstElem, aNbElemsInGroup);
+ aGlContext->core11fwd->glDrawArrays (aDrawMode, aFirstElem, aNbElemsInGroup);
aFirstElem += aNbElemsInGroup;
}
}
else
{
- glDrawArrays (aDrawMode, 0, !myVboAttribs.IsNull() ? myVboAttribs->GetElemsNb() : myAttribs->NbElements);
+ aGlContext->core11fwd->glDrawArrays (aDrawMode, 0, !myVboAttribs.IsNull() ? myVboAttribs->GetElemsNb() : myAttribs->NbElements);
}
// unbind buffers
}
#if !defined(GL_ES_VERSION_2_0)
- if (aCtx->core11 != NULL)
+ if (aCtx->core11ffp != NULL)
{
aCtx->core11fwd->glEnable (GL_ALPHA_TEST);
aCtx->core11fwd->glAlphaFunc (GL_GEQUAL, 0.1f);
{
for (Standard_Integer anIter = 0; anIter < myAttribs->NbElements; anIter++)
{
- aCtx->core11->glRasterPos3fv (myAttribs->Value<Graphic3d_Vec3> (anIter).GetData());
+ aCtx->core11ffp->glRasterPos3fv (myAttribs->Value<Graphic3d_Vec3> (anIter).GetData());
aSprite->DrawBitmap (theWorkspace->GetGlContext());
}
}
aCtx->core11fwd->glDisable (GL_BLEND);
#if !defined(GL_ES_VERSION_2_0)
- if (aCtx->core11 != NULL)
+ if (aCtx->core11ffp != NULL)
{
if (aCtx->ShaderManager()->MaterialState().AlphaCutoff() >= ShortRealLast())
{
(void )theTexture;
(void )theParams;
#else
- if (theCtx->core11 == NULL
+ if (theCtx->core11ffp == NULL
|| theParams->TextureUnit() >= theCtx->MaxTextureUnitsFFP())
{
return;
{
case Graphic3d_TOTM_OBJECT:
{
- theCtx->core11->glTexGeni (GL_S, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR);
- theCtx->core11->glTexGenfv (GL_S, GL_OBJECT_PLANE, theParams->GenPlaneS().GetData());
+ theCtx->core11ffp->glTexGeni (GL_S, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR);
+ theCtx->core11ffp->glTexGenfv (GL_S, GL_OBJECT_PLANE, theParams->GenPlaneS().GetData());
if (theTexture.GetTarget() != GL_TEXTURE_1D)
{
- theCtx->core11->glTexGeni (GL_T, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR);
- theCtx->core11->glTexGenfv (GL_T, GL_OBJECT_PLANE, theParams->GenPlaneT().GetData());
+ theCtx->core11ffp->glTexGeni (GL_T, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR);
+ theCtx->core11ffp->glTexGenfv (GL_T, GL_OBJECT_PLANE, theParams->GenPlaneT().GetData());
}
break;
}
case Graphic3d_TOTM_SPHERE:
{
- theCtx->core11->glTexGeni (GL_S, GL_TEXTURE_GEN_MODE, GL_SPHERE_MAP);
+ theCtx->core11ffp->glTexGeni (GL_S, GL_TEXTURE_GEN_MODE, GL_SPHERE_MAP);
if (theTexture.GetTarget() != GL_TEXTURE_1D)
{
- theCtx->core11->glTexGeni (GL_T, GL_TEXTURE_GEN_MODE, GL_SPHERE_MAP);
+ theCtx->core11ffp->glTexGeni (GL_T, GL_TEXTURE_GEN_MODE, GL_SPHERE_MAP);
}
break;
}
theCtx->WorldViewState.SetIdentity();
theCtx->ApplyWorldViewMatrix();
- theCtx->core11->glTexGeni (GL_S, GL_TEXTURE_GEN_MODE, GL_EYE_LINEAR);
- theCtx->core11->glTexGenfv (GL_S, GL_EYE_PLANE, theParams->GenPlaneS().GetData());
+ theCtx->core11ffp->glTexGeni (GL_S, GL_TEXTURE_GEN_MODE, GL_EYE_LINEAR);
+ theCtx->core11ffp->glTexGenfv (GL_S, GL_EYE_PLANE, theParams->GenPlaneS().GetData());
if (theTexture.GetTarget() != GL_TEXTURE_1D)
{
- theCtx->core11->glTexGeni (GL_T, GL_TEXTURE_GEN_MODE, GL_EYE_LINEAR);
- theCtx->core11->glTexGenfv (GL_T, GL_EYE_PLANE, theParams->GenPlaneT().GetData());
+ theCtx->core11ffp->glTexGeni (GL_T, GL_TEXTURE_GEN_MODE, GL_EYE_LINEAR);
+ theCtx->core11ffp->glTexGenfv (GL_T, GL_EYE_PLANE, theParams->GenPlaneT().GetData());
}
theCtx->WorldViewState.Pop();
if (theCtx->core20fwd != NULL)
{
theCtx->core11fwd->glEnable (GL_POINT_SPRITE);
- glTexEnvi (GL_POINT_SPRITE, GL_COORD_REPLACE, GL_TRUE);
+ theCtx->core11ffp->glTexEnvi (GL_POINT_SPRITE, GL_COORD_REPLACE, GL_TRUE);
anEnvMode = GL_REPLACE;
}
break;
}
// setup lighting
- glTexEnvi (GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, anEnvMode);
+ theCtx->core11ffp->glTexEnvi (GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, anEnvMode);
switch (theTexture.GetTarget())
{
(void )theTexture;
(void )theParams;
#else
- if (theCtx->core11 == NULL)
+ if (theCtx->core11ffp == NULL)
{
return;
}
// reset texture matrix because some code may expect it is identity
GLint aMatrixMode = GL_TEXTURE;
theCtx->core11fwd->glGetIntegerv (GL_MATRIX_MODE, &aMatrixMode);
- theCtx->core11->glMatrixMode (GL_TEXTURE);
- theCtx->core11->glLoadIdentity();
- theCtx->core11->glMatrixMode (aMatrixMode);
+ theCtx->core11ffp->glMatrixMode (GL_TEXTURE);
+ theCtx->core11ffp->glLoadIdentity();
+ theCtx->core11ffp->glMatrixMode (aMatrixMode);
switch (theTexture.GetTarget())
{
// the light is a headlight?
if (theLight.IsHeadlight())
{
- theCtx->core11->glMatrixMode (GL_MODELVIEW);
- theCtx->core11->glLoadIdentity();
+ theCtx->core11ffp->glMatrixMode (GL_MODELVIEW);
+ theCtx->core11ffp->glLoadIdentity();
}
// setup light type
const OpenGl_Vec4 anInfDir = -theLight.PackedDirectionRange();
// to create a realistic effect, set the GL_SPECULAR parameter to the same value as the GL_DIFFUSE.
- theCtx->core11->glLightfv (theLightGlId, GL_AMBIENT, THE_DEFAULT_AMBIENT);
- theCtx->core11->glLightfv (theLightGlId, GL_DIFFUSE, aLightColor.GetData());
- theCtx->core11->glLightfv (theLightGlId, GL_SPECULAR, aLightColor.GetData());
- theCtx->core11->glLightfv (theLightGlId, GL_POSITION, anInfDir.GetData());
- theCtx->core11->glLightfv (theLightGlId, GL_SPOT_DIRECTION, THE_DEFAULT_SPOT_DIR);
- theCtx->core11->glLightf (theLightGlId, GL_SPOT_EXPONENT, THE_DEFAULT_SPOT_EXPONENT);
- theCtx->core11->glLightf (theLightGlId, GL_SPOT_CUTOFF, THE_DEFAULT_SPOT_CUTOFF);
+ theCtx->core11ffp->glLightfv (theLightGlId, GL_AMBIENT, THE_DEFAULT_AMBIENT);
+ theCtx->core11ffp->glLightfv (theLightGlId, GL_DIFFUSE, aLightColor.GetData());
+ theCtx->core11ffp->glLightfv (theLightGlId, GL_SPECULAR, aLightColor.GetData());
+ theCtx->core11ffp->glLightfv (theLightGlId, GL_POSITION, anInfDir.GetData());
+ theCtx->core11ffp->glLightfv (theLightGlId, GL_SPOT_DIRECTION, THE_DEFAULT_SPOT_DIR);
+ theCtx->core11ffp->glLightf (theLightGlId, GL_SPOT_EXPONENT, THE_DEFAULT_SPOT_EXPONENT);
+ theCtx->core11ffp->glLightf (theLightGlId, GL_SPOT_CUTOFF, THE_DEFAULT_SPOT_CUTOFF);
break;
}
case Graphic3d_TOLS_POSITIONAL:
{
// to create a realistic effect, set the GL_SPECULAR parameter to the same value as the GL_DIFFUSE
const OpenGl_Vec4 aPosition (static_cast<float>(theLight.Position().X()), static_cast<float>(theLight.Position().Y()), static_cast<float>(theLight.Position().Z()), 1.0f);
- theCtx->core11->glLightfv (theLightGlId, GL_AMBIENT, THE_DEFAULT_AMBIENT);
- theCtx->core11->glLightfv (theLightGlId, GL_DIFFUSE, aLightColor.GetData());
- theCtx->core11->glLightfv (theLightGlId, GL_SPECULAR, aLightColor.GetData());
- theCtx->core11->glLightfv (theLightGlId, GL_POSITION, aPosition.GetData());
- theCtx->core11->glLightfv (theLightGlId, GL_SPOT_DIRECTION, THE_DEFAULT_SPOT_DIR);
- theCtx->core11->glLightf (theLightGlId, GL_SPOT_EXPONENT, THE_DEFAULT_SPOT_EXPONENT);
- theCtx->core11->glLightf (theLightGlId, GL_SPOT_CUTOFF, THE_DEFAULT_SPOT_CUTOFF);
- theCtx->core11->glLightf (theLightGlId, GL_CONSTANT_ATTENUATION, theLight.ConstAttenuation());
- theCtx->core11->glLightf (theLightGlId, GL_LINEAR_ATTENUATION, theLight.LinearAttenuation());
- theCtx->core11->glLightf (theLightGlId, GL_QUADRATIC_ATTENUATION, 0.0f);
+ theCtx->core11ffp->glLightfv (theLightGlId, GL_AMBIENT, THE_DEFAULT_AMBIENT);
+ theCtx->core11ffp->glLightfv (theLightGlId, GL_DIFFUSE, aLightColor.GetData());
+ theCtx->core11ffp->glLightfv (theLightGlId, GL_SPECULAR, aLightColor.GetData());
+ theCtx->core11ffp->glLightfv (theLightGlId, GL_POSITION, aPosition.GetData());
+ theCtx->core11ffp->glLightfv (theLightGlId, GL_SPOT_DIRECTION, THE_DEFAULT_SPOT_DIR);
+ theCtx->core11ffp->glLightf (theLightGlId, GL_SPOT_EXPONENT, THE_DEFAULT_SPOT_EXPONENT);
+ theCtx->core11ffp->glLightf (theLightGlId, GL_SPOT_CUTOFF, THE_DEFAULT_SPOT_CUTOFF);
+ theCtx->core11ffp->glLightf (theLightGlId, GL_CONSTANT_ATTENUATION, theLight.ConstAttenuation());
+ theCtx->core11ffp->glLightf (theLightGlId, GL_LINEAR_ATTENUATION, theLight.LinearAttenuation());
+ theCtx->core11ffp->glLightf (theLightGlId, GL_QUADRATIC_ATTENUATION, 0.0f);
break;
}
case Graphic3d_TOLS_SPOT:
{
const OpenGl_Vec4 aPosition (static_cast<float>(theLight.Position().X()), static_cast<float>(theLight.Position().Y()), static_cast<float>(theLight.Position().Z()), 1.0f);
- theCtx->core11->glLightfv (theLightGlId, GL_AMBIENT, THE_DEFAULT_AMBIENT);
- theCtx->core11->glLightfv (theLightGlId, GL_DIFFUSE, aLightColor.GetData());
- theCtx->core11->glLightfv (theLightGlId, GL_SPECULAR, aLightColor.GetData());
- theCtx->core11->glLightfv (theLightGlId, GL_POSITION, aPosition.GetData());
- theCtx->core11->glLightfv (theLightGlId, GL_SPOT_DIRECTION, theLight.PackedDirectionRange().GetData());
- theCtx->core11->glLightf (theLightGlId, GL_SPOT_EXPONENT, theLight.Concentration() * 128.0f);
- theCtx->core11->glLightf (theLightGlId, GL_SPOT_CUTOFF, (theLight.Angle() * 180.0f) / GLfloat(M_PI));
- theCtx->core11->glLightf (theLightGlId, GL_CONSTANT_ATTENUATION, theLight.ConstAttenuation());
- theCtx->core11->glLightf (theLightGlId, GL_LINEAR_ATTENUATION, theLight.LinearAttenuation());
- theCtx->core11->glLightf (theLightGlId, GL_QUADRATIC_ATTENUATION, 0.0f);
+ theCtx->core11ffp->glLightfv (theLightGlId, GL_AMBIENT, THE_DEFAULT_AMBIENT);
+ theCtx->core11ffp->glLightfv (theLightGlId, GL_DIFFUSE, aLightColor.GetData());
+ theCtx->core11ffp->glLightfv (theLightGlId, GL_SPECULAR, aLightColor.GetData());
+ theCtx->core11ffp->glLightfv (theLightGlId, GL_POSITION, aPosition.GetData());
+ theCtx->core11ffp->glLightfv (theLightGlId, GL_SPOT_DIRECTION, theLight.PackedDirectionRange().GetData());
+ theCtx->core11ffp->glLightf (theLightGlId, GL_SPOT_EXPONENT, theLight.Concentration() * 128.0f);
+ theCtx->core11ffp->glLightf (theLightGlId, GL_SPOT_CUTOFF, (theLight.Angle() * 180.0f) / GLfloat(M_PI));
+ theCtx->core11ffp->glLightf (theLightGlId, GL_CONSTANT_ATTENUATION, theLight.ConstAttenuation());
+ theCtx->core11ffp->glLightf (theLightGlId, GL_LINEAR_ATTENUATION, theLight.LinearAttenuation());
+ theCtx->core11ffp->glLightf (theLightGlId, GL_QUADRATIC_ATTENUATION, 0.0f);
break;
}
}
// restore matrix in case of headlight
if (theLight.IsHeadlight())
{
- theCtx->core11->glLoadMatrixf (theModelView.GetData());
+ theCtx->core11ffp->glLoadMatrixf (theModelView.GetData());
}
glEnable (theLightGlId);
if (theProgram == myFfpProgram)
{
#if !defined(GL_ES_VERSION_2_0)
- if (myContext->core11 == NULL)
+ if (myContext->core11ffp == NULL)
{
return;
}
const Graphic3d_Vec4 anAmbient = !myLightSourceState.LightSources().IsNull()
? myLightSourceState.LightSources()->AmbientColor()
: Graphic3d_Vec4 (0.0f, 0.0f, 0.0f, 1.0f);
- myContext->core11->glLightModelfv (GL_LIGHT_MODEL_AMBIENT, anAmbient.GetData());
+ myContext->core11ffp->glLightModelfv (GL_LIGHT_MODEL_AMBIENT, anAmbient.GetData());
// GL_LIGHTING is managed by drawers to switch between shaded / no lighting output,
// therefore managing the state here does not have any effect - do it just for consistency.
if (aLightGlId != GL_LIGHT0)
{
- ::glEnable (GL_LIGHTING);
+ myContext->core11fwd->glEnable (GL_LIGHTING);
}
else
{
- ::glDisable (GL_LIGHTING);
+ myContext->core11fwd->glDisable (GL_LIGHTING);
}
// switch off unused lights
for (; aLightGlId <= GL_LIGHT7; ++aLightGlId)
{
- ::glDisable (aLightGlId);
+ myContext->core11fwd->glDisable (aLightGlId);
}
#endif
return;
if (theProgram == myFfpProgram)
{
#if !defined(GL_ES_VERSION_2_0)
- if (myContext->core11 != NULL)
+ if (myContext->core11ffp != NULL)
{
- myContext->core11->glMatrixMode (GL_PROJECTION);
- myContext->core11->glLoadMatrixf (myProjectionState.ProjectionMatrix());
+ myContext->core11ffp->glMatrixMode (GL_PROJECTION);
+ myContext->core11ffp->glLoadMatrixf (myProjectionState.ProjectionMatrix());
}
#endif
return;
if (theProgram == myFfpProgram)
{
#if !defined(GL_ES_VERSION_2_0)
- if (myContext->core11 != NULL)
+ if (myContext->core11ffp != NULL)
{
const OpenGl_Mat4 aModelView = myWorldViewState.WorldViewMatrix() * myModelWorldState.ModelWorldMatrix();
- myContext->core11->glMatrixMode (GL_MODELVIEW);
- myContext->core11->glLoadMatrixf (aModelView.GetData());
+ myContext->core11ffp->glMatrixMode (GL_MODELVIEW);
+ myContext->core11ffp->glLoadMatrixf (aModelView.GetData());
theProgram->UpdateState (OpenGl_WORLD_VIEW_STATE, myWorldViewState.Index());
}
#endif
if (theProgram == myFfpProgram)
{
#if !defined(GL_ES_VERSION_2_0)
- if (myContext->core11 != NULL)
+ if (myContext->core11ffp != NULL)
{
const OpenGl_Mat4 aModelView = myWorldViewState.WorldViewMatrix() * myModelWorldState.ModelWorldMatrix();
- myContext->core11->glMatrixMode (GL_MODELVIEW);
- myContext->core11->glLoadMatrixf (aModelView.GetData());
+ myContext->core11ffp->glMatrixMode (GL_MODELVIEW);
+ myContext->core11ffp->glLoadMatrixf (aModelView.GetData());
theProgram->UpdateState (OpenGl_MODEL_WORLD_STATE, myModelWorldState.Index());
}
#endif
if (theProgram == myFfpProgram)
{
#if !defined(GL_ES_VERSION_2_0)
- if (myContext->core11 == NULL)
+ if (myContext->core11ffp == NULL)
{
return;
}
{
// set either identity or pure view matrix
toRestoreModelView = Standard_True;
- myContext->core11->glMatrixMode (GL_MODELVIEW);
- myContext->core11->glLoadMatrixf (myWorldViewState.WorldViewMatrix().GetData());
+ myContext->core11ffp->glMatrixMode (GL_MODELVIEW);
+ myContext->core11ffp->glLoadMatrixf (myWorldViewState.WorldViewMatrix().GetData());
}
- ::glEnable (anFfpPlaneID);
- myContext->core11->glClipPlane (anFfpPlaneID, aPlaneEq);
+ myContext->core11fwd->glEnable (anFfpPlaneID);
+ myContext->core11ffp->glClipPlane (anFfpPlaneID, aPlaneEq);
++aPlaneId;
}
// switch off unused lights
for (; aPlaneId < aNbMaxPlanes; ++aPlaneId)
{
- ::glDisable (GL_CLIP_PLANE0 + aPlaneId);
+ myContext->core11fwd->glDisable (GL_CLIP_PLANE0 + aPlaneId);
}
// restore combined model-view matrix
if (toRestoreModelView)
{
const OpenGl_Mat4 aModelView = myWorldViewState.WorldViewMatrix() * myModelWorldState.ModelWorldMatrix();
- myContext->core11->glLoadMatrixf (aModelView.GetData());
+ myContext->core11ffp->glLoadMatrixf (aModelView.GetData());
}
#endif
return;
if (theProgram == myFfpProgram)
{
#if !defined(GL_ES_VERSION_2_0)
- if (myContext->core11 == NULL)
+ if (myContext->core11ffp == NULL)
{
return;
}
if (myMaterialState.AlphaCutoff() < ShortRealLast())
{
- glAlphaFunc (GL_GEQUAL, myMaterialState.AlphaCutoff());
- glEnable (GL_ALPHA_TEST);
+ myContext->core11fwd->glAlphaFunc (GL_GEQUAL, myMaterialState.AlphaCutoff());
+ myContext->core11fwd->glEnable (GL_ALPHA_TEST);
}
else
{
- glDisable (GL_ALPHA_TEST);
+ myContext->core11fwd->glDisable (GL_ALPHA_TEST);
}
const GLenum aFrontFace = myMaterialState.ToDistinguish() ? GL_FRONT : GL_FRONT_AND_BACK;
const OpenGl_MaterialCommon& aFrontMat = aMat.Common[0];
const OpenGl_MaterialCommon& aBackMat = aMat.Common[1];
const Graphic3d_Vec4 aSpec4 (aFrontMat.SpecularShininess.rgb(), 1.0f);
- myContext->core11->glMaterialfv(aFrontFace, GL_AMBIENT, aFrontMat.Ambient.GetData());
- myContext->core11->glMaterialfv(aFrontFace, GL_DIFFUSE, aFrontMat.Diffuse.GetData());
- myContext->core11->glMaterialfv(aFrontFace, GL_SPECULAR, aSpec4.GetData());
- myContext->core11->glMaterialfv(aFrontFace, GL_EMISSION, aFrontMat.Emission.GetData());
- myContext->core11->glMaterialf (aFrontFace, GL_SHININESS, aFrontMat.Shine());
+ myContext->core11ffp->glMaterialfv(aFrontFace, GL_AMBIENT, aFrontMat.Ambient.GetData());
+ myContext->core11ffp->glMaterialfv(aFrontFace, GL_DIFFUSE, aFrontMat.Diffuse.GetData());
+ myContext->core11ffp->glMaterialfv(aFrontFace, GL_SPECULAR, aSpec4.GetData());
+ myContext->core11ffp->glMaterialfv(aFrontFace, GL_EMISSION, aFrontMat.Emission.GetData());
+ myContext->core11ffp->glMaterialf (aFrontFace, GL_SHININESS, aFrontMat.Shine());
if (myMaterialState.ToDistinguish())
{
const Graphic3d_Vec4 aSpec4Back (aBackMat.SpecularShininess.rgb(), 1.0f);
- myContext->core11->glMaterialfv(GL_BACK, GL_AMBIENT, aBackMat.Ambient.GetData());
- myContext->core11->glMaterialfv(GL_BACK, GL_DIFFUSE, aBackMat.Diffuse.GetData());
- myContext->core11->glMaterialfv(GL_BACK, GL_SPECULAR, aSpec4Back.GetData());
- myContext->core11->glMaterialfv(GL_BACK, GL_EMISSION, aBackMat.Emission.GetData());
- myContext->core11->glMaterialf (GL_BACK, GL_SHININESS, aBackMat.Shine());
+ myContext->core11ffp->glMaterialfv(GL_BACK, GL_AMBIENT, aBackMat.Ambient.GetData());
+ myContext->core11ffp->glMaterialfv(GL_BACK, GL_DIFFUSE, aBackMat.Diffuse.GetData());
+ myContext->core11ffp->glMaterialfv(GL_BACK, GL_SPECULAR, aSpec4Back.GetData());
+ myContext->core11ffp->glMaterialfv(GL_BACK, GL_EMISSION, aBackMat.Emission.GetData());
+ myContext->core11ffp->glMaterialf (GL_BACK, GL_SHININESS, aBackMat.Shine());
}
#endif
return;
}
}
#if !defined(GL_ES_VERSION_2_0)
- else if (myContext->core11 != NULL)
+ else if (myContext->core11ffp != NULL)
{
// manage FFP lighting
myContext->SetShadeModel (theShadingModel);
if (theShadingModel == Graphic3d_TOSM_UNLIT)
{
- glDisable (GL_LIGHTING);
+ myContext->core11fwd->glDisable (GL_LIGHTING);
}
else
{
- glEnable (GL_LIGHTING);
+ myContext->core11fwd->glEnable (GL_LIGHTING);
}
}
#else
return true;
}
#else
- if (theCtx->core30fwd != NULL)
+ if (theCtx->core30 != NULL)
{
- theCtx->core30fwd->glUniform2uiv (theLocation, 1, theValue.GetData());
+ theCtx->core30->glUniform2uiv (theLocation, 1, theValue.GetData());
return true;
}
#endif
return true;
}
#else
- if (theCtx->core30fwd != NULL)
+ if (theCtx->core30 != NULL)
{
- theCtx->core30fwd->glUniform2uiv (theLocation, theCount, theValue->GetData());
+ theCtx->core30->glUniform2uiv (theLocation, theCount, theValue->GetData());
return true;
}
#endif
aBoundBoxVertBuffer->UnbindAttribute(aCtx, Graphic3d_TOA_POS);
}
#if !defined(GL_ES_VERSION_2_0)
- else if (aCtx->core11 != NULL)
+ else if (aCtx->core11ffp != NULL)
{
const Graphic3d_Vec3d aMind = myBndBox.CornerMin() + aMoveVec;
const Graphic3d_Vec3d aMaxd = myBndBox.CornerMax() + aMoveVec;
aCtx->ShaderManager()->BindLineProgram (Handle(OpenGl_TextureSet)(), Aspect_TOL_SOLID, Graphic3d_TOSM_UNLIT, Graphic3d_AlphaMode_Opaque, false, Handle(OpenGl_ShaderProgram)());
aCtx->SetColor4fv (theWorkspace->InteriorColor());
aCtx->core11fwd->glDisable (GL_LIGHTING);
- aCtx->core11->glEnableClientState (GL_VERTEX_ARRAY);
- aCtx->core11->glVertexPointer (3, GL_FLOAT, 0, aVerts[0].GetData());
+ aCtx->core11ffp->glEnableClientState (GL_VERTEX_ARRAY);
+ aCtx->core11ffp->glVertexPointer (3, GL_FLOAT, 0, aVerts[0].GetData());
aCtx->core11fwd->glDrawArrays (GL_LINE_STRIP, 0, 16);
- aCtx->core11->glDisableClientState (GL_VERTEX_ARRAY);
+ aCtx->core11ffp->glDisableClientState (GL_VERTEX_ARRAY);
}
#endif
aCtx->BindTextures (aPrevTexture, Handle(OpenGl_ShaderProgram)());
const Standard_Boolean anOldGlNormalize = aCtx->IsGlNormalizeEnabled();
#if !defined(GL_ES_VERSION_2_0)
// detect scale transform
- if (aCtx->core11 != NULL
+ if (aCtx->core11ffp != NULL
&& !myTrsf.IsNull())
{
const Standard_Real aScale = myTrsf->Trsf().ScaleFactor();
#if !defined(GL_ES_VERSION_2_0)
if (!aCtx->IsGlNormalizeEnabled()
- && aCtx->core11 != NULL)
+ && aCtx->core11ffp != NULL)
{
const Standard_Real aScale = Graphic3d_TransformUtils::ScaleFactor<Standard_ShortReal> (aWorldView);
if (Abs (aScale - 1.0) > Precision::Confusion())
// restore Z buffer settings
if (theWorkspace->UseZBuffer())
{
- glEnable (GL_DEPTH_TEST);
+ aCtx->core11fwd->glEnable (GL_DEPTH_TEST);
}
}
for (Standard_Integer anIter = 0; anIter < myTextures.Length(); ++anIter)
{
const GLuint aTexId = myTextures.Value (anIter);
- glBindTexture (GL_TEXTURE_2D, aTexId);
+ theCtx->core11fwd->glBindTexture (GL_TEXTURE_2D, aTexId);
const Handle(OpenGl_VertexBuffer)& aVerts = myVertsVbo.Value (anIter);
const Handle(OpenGl_VertexBuffer)& aTCrds = myTCrdsVbo.Value (anIter);
aVerts->BindAttribute (theCtx, Graphic3d_TOA_POS);
aTCrds->BindAttribute (theCtx, Graphic3d_TOA_UV);
- glDrawArrays (GL_TRIANGLES, 0, GLsizei(aVerts->GetElemsNb()));
+ theCtx->core11fwd->glDrawArrays (GL_TRIANGLES, 0, GLsizei(aVerts->GetElemsNb()));
aTCrds->UnbindAttribute (theCtx, Graphic3d_TOA_UV);
aVerts->UnbindAttribute (theCtx, Graphic3d_TOA_POS);
}
- glBindTexture (GL_TEXTURE_2D, 0);
+ theCtx->core11fwd->glBindTexture (GL_TEXTURE_2D, 0);
}
// =======================================================================
Handle(OpenGl_ShaderProgram)());
#if !defined(GL_ES_VERSION_2_0)
- if (theCtx->core11 != NULL
+ if (theCtx->core11ffp != NULL
&& theCtx->ActiveProgram().IsNull())
{
- glBindTexture (GL_TEXTURE_2D, 0);
+ theCtx->core11fwd->glBindTexture (GL_TEXTURE_2D, 0);
}
#endif
theCtx->SetColor4fv (theColorSubs);
}
#if !defined(GL_ES_VERSION_2_0)
- if (theCtx->core11 != NULL
+ if (theCtx->core11ffp != NULL
&& theCtx->caps->ffpEnable)
{
- glDisable (GL_LIGHTING);
+ theCtx->core11fwd->glDisable (GL_LIGHTING);
}
#endif
#if !defined(GL_ES_VERSION_2_0)
// activate texture unit
GLint aTexEnvParam = GL_REPLACE;
- if (theCtx->core11 != NULL)
+ if (theCtx->core11ffp != NULL)
{
- glDisable (GL_TEXTURE_1D);
- glEnable (GL_TEXTURE_2D);
- glGetTexEnviv (GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, &aTexEnvParam);
+ theCtx->core11fwd->glDisable (GL_TEXTURE_1D);
+ theCtx->core11fwd->glEnable (GL_TEXTURE_2D);
+ theCtx->core11ffp->glGetTexEnviv (GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, &aTexEnvParam);
if (aTexEnvParam != GL_REPLACE)
{
- glTexEnvi (GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
+ theCtx->core11ffp->glTexEnvi (GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
}
}
#endif
case Aspect_TODT_BLEND:
{
#if !defined(GL_ES_VERSION_2_0)
- glEnable (GL_COLOR_LOGIC_OP);
- glLogicOp (GL_XOR);
+ theCtx->core11fwd->glEnable (GL_COLOR_LOGIC_OP);
+ theCtx->core11ffp->glLogicOp (GL_XOR);
#endif
break;
}
}
#if !defined(GL_ES_VERSION_2_0)
- if (theCtx->core11 != NULL)
+ if (theCtx->core11ffp != NULL)
{
- glTexEnvi (GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, aTexEnvParam);
+ theCtx->core11ffp->glTexEnvi (GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, aTexEnvParam);
}
#endif
{
if (theTextAspect.Aspect()->AlphaMode() == Graphic3d_AlphaMode_MaskBlend)
{
- glDisable (GL_BLEND);
+ theCtx->core11fwd->glDisable (GL_BLEND);
}
if (!myIs2d)
{
- glDisable (GL_DEPTH_TEST);
+ theCtx->core11fwd->glDisable (GL_DEPTH_TEST);
}
#if !defined(GL_ES_VERSION_2_0)
- if (theCtx->core11 != NULL)
+ if (theCtx->core11ffp != NULL)
{
- glDisable (GL_TEXTURE_2D);
+ theCtx->core11fwd->glDisable (GL_TEXTURE_2D);
}
#endif
const bool aColorMaskBack = theCtx->SetColorMask (false);
- glClear (GL_STENCIL_BUFFER_BIT);
- glEnable (GL_STENCIL_TEST);
- glStencilFunc (GL_ALWAYS, 1, 0xFF);
- glStencilOp (GL_KEEP, GL_KEEP, GL_REPLACE);
+ theCtx->core11fwd->glClear (GL_STENCIL_BUFFER_BIT);
+ theCtx->core11fwd->glEnable (GL_STENCIL_TEST);
+ theCtx->core11fwd->glStencilFunc (GL_ALWAYS, 1, 0xFF);
+ theCtx->core11fwd->glStencilOp (GL_KEEP, GL_KEEP, GL_REPLACE);
drawRect (theCtx, theTextAspect, OpenGl_Vec4 (1.0f, 1.0f, 1.0f, 1.0f));
- glStencilFunc (GL_ALWAYS, 0, 0xFF);
+ theCtx->core11fwd->glStencilFunc (GL_ALWAYS, 0, 0xFF);
theCtx->SetColorMask (aColorMaskBack);
}
{
theCtx->core11fwd->glDisable (GL_BLEND);
}
- glDisable (GL_STENCIL_TEST);
+ theCtx->core11fwd->glDisable (GL_STENCIL_TEST);
#if !defined(GL_ES_VERSION_2_0)
- glDisable (GL_COLOR_LOGIC_OP);
+ theCtx->core11fwd->glDisable (GL_COLOR_LOGIC_OP);
#endif
// model view matrix was modified
#if defined(GL_ES_VERSION_2_0)
const bool useRedRedAlpha = false;
#else
- const bool useRedRedAlpha = (theCtx->core11 == NULL);
+ const bool useRedRedAlpha = (theCtx->core11ffp == NULL);
#endif
switch (theFormat)
{
// =======================================================================
void OpenGl_VertexBuffer::unbindFixedColor (const Handle(OpenGl_Context)& theCtx)
{
- theCtx->core11->glDisableClientState (GL_COLOR_ARRAY);
+ theCtx->core11ffp->glDisableClientState (GL_COLOR_ARRAY);
theCtx->core11fwd->glDisable (GL_COLOR_MATERIAL);
// invalidate FFP material state after GL_COLOR_MATERIAL has modified it (took values from the vertex color)
if (theCtx->ActiveProgram().IsNull())
{
#if !defined(GL_ES_VERSION_2_0)
- if (theCtx->core11 != NULL)
+ if (theCtx->core11ffp != NULL)
{
bindFixed (theCtx, theAttribute, theNbComp, theDataType, theStride, theOffset);
}
{
case Graphic3d_TOA_POS:
{
- theCtx->core11->glEnableClientState (GL_VERTEX_ARRAY);
- theCtx->core11->glVertexPointer (theNbComp, theDataType, theStride, theOffset);
+ theCtx->core11ffp->glEnableClientState (GL_VERTEX_ARRAY);
+ theCtx->core11ffp->glVertexPointer (theNbComp, theDataType, theStride, theOffset);
return;
}
case Graphic3d_TOA_NORM:
{
- theCtx->core11->glEnableClientState (GL_NORMAL_ARRAY);
- theCtx->core11->glNormalPointer (theDataType, theStride, theOffset);
+ theCtx->core11ffp->glEnableClientState (GL_NORMAL_ARRAY);
+ theCtx->core11ffp->glNormalPointer (theDataType, theStride, theOffset);
return;
}
case Graphic3d_TOA_UV:
{
- theCtx->core11->glEnableClientState (GL_TEXTURE_COORD_ARRAY);
- theCtx->core11->glTexCoordPointer (theNbComp, theDataType, theStride, theOffset);
+ theCtx->core11ffp->glEnableClientState (GL_TEXTURE_COORD_ARRAY);
+ theCtx->core11ffp->glTexCoordPointer (theNbComp, theDataType, theStride, theOffset);
return;
}
case Graphic3d_TOA_COLOR:
{
- theCtx->core11->glEnableClientState (GL_COLOR_ARRAY);
- theCtx->core11->glColorPointer (theNbComp, theDataType, theStride, theOffset);
- theCtx->core11->glColorMaterial (GL_FRONT_AND_BACK,GL_AMBIENT_AND_DIFFUSE);
+ theCtx->core11ffp->glEnableClientState (GL_COLOR_ARRAY);
+ theCtx->core11ffp->glColorPointer (theNbComp, theDataType, theStride, theOffset);
+ theCtx->core11ffp->glColorMaterial (GL_FRONT_AND_BACK,GL_AMBIENT_AND_DIFFUSE);
theCtx->core11fwd->glEnable (GL_COLOR_MATERIAL);
return;
}
if (theCtx->ActiveProgram().IsNull())
{
#if !defined(GL_ES_VERSION_2_0)
- if (theCtx->core11 != NULL)
+ if (theCtx->core11ffp != NULL)
{
unbindFixed (theCtx, theAttribute);
}
{
switch (theMode)
{
- case Graphic3d_TOA_POS: theCtx->core11->glDisableClientState (GL_VERTEX_ARRAY); return;
- case Graphic3d_TOA_NORM: theCtx->core11->glDisableClientState (GL_NORMAL_ARRAY); return;
- case Graphic3d_TOA_UV: theCtx->core11->glDisableClientState (GL_TEXTURE_COORD_ARRAY); return;
+ case Graphic3d_TOA_POS: theCtx->core11ffp->glDisableClientState (GL_VERTEX_ARRAY); return;
+ case Graphic3d_TOA_NORM: theCtx->core11ffp->glDisableClientState (GL_NORMAL_ARRAY); return;
+ case Graphic3d_TOA_UV: theCtx->core11ffp->glDisableClientState (GL_TEXTURE_COORD_ARRAY); return;
case Graphic3d_TOA_COLOR: unbindFixedColor (theCtx); return;
case Graphic3d_TOA_CUSTOM:
{
#endif
myXRSession->SubmitEye ((void* )(size_t )anXRFbo->ColorTexture()->TextureId(),
aGraphicsLib, Aspect_ColorSpace_sRGB, Aspect_Eye_Right);
- ::glFinish();
+ aCtx->core11fwd->glFinish();
if (myRenderParams.ToMirrorComposer)
{
myWorkspace->UseZBuffer() = Standard_True;
myWorkspace->UseDepthWrite() = Standard_True;
- glDepthFunc (GL_LEQUAL);
- glDepthMask (GL_TRUE);
- glEnable (GL_DEPTH_TEST);
-#if !defined(GL_ES_VERSION_2_0)
- glClearDepth (1.0);
-#else
- glClearDepthf (1.0f);
-#endif
+ aCtx->core11fwd->glDepthFunc (GL_LEQUAL);
+ aCtx->core11fwd->glDepthMask (GL_TRUE);
+ aCtx->core11fwd->glEnable (GL_DEPTH_TEST);
+ aCtx->core11fwd->glClearDepth (1.0);
render (theProjection, theDrawFbo, theOitAccumFbo, Standard_True);
#if !defined(GL_ES_VERSION_2_0)
// Disable current clipping planes
- if (aContext->core11 != NULL)
+ if (aContext->core11ffp != NULL)
{
const Standard_Integer aMaxPlanes = aContext->MaxClipPlanes();
for (Standard_Integer aClipPlaneId = GL_CLIP_PLANE0; aClipPlaneId < GL_CLIP_PLANE0 + aMaxPlanes; ++aClipPlaneId)
#if !defined(GL_ES_VERSION_2_0)
// Switch off lighting by default
- if (aContext->core11 != NULL
+ if (aContext->core11ffp != NULL
&& aContext->caps->ffpEnable)
{
- glDisable(GL_LIGHTING);
+ aContext->core11fwd->glDisable (GL_LIGHTING);
}
#endif
myIsImmediateDrawn = Standard_False;
#if !defined(GL_ES_VERSION_2_0)
const Handle(OpenGl_Context)& aCtx = myWorkspace->GetGlContext();
- if (aCtx->core11 == NULL)
+ if (aCtx->core11ffp == NULL)
{
return false;
}
}
}
- aCtx->core11->glRasterPos2i (0, 0);
- aCtx->core11->glCopyPixels (0, 0, myWindow->Width() + 1, myWindow->Height() + 1, GL_COLOR);
- //aCtx->core11->glCopyPixels (0, 0, myWidth + 1, myHeight + 1, GL_DEPTH);
+ aCtx->core11ffp->glRasterPos2i (0, 0);
+ aCtx->core11ffp->glCopyPixels (0, 0, myWindow->Width() + 1, myWindow->Height() + 1, GL_COLOR);
+ //aCtx->core11ffp->glCopyPixels (0, 0, myWidth + 1, myHeight + 1, GL_DEPTH);
aCtx->EnableFeatures();
myGlContext->ResizeViewport (aViewport);
#if !defined(GL_ES_VERSION_2_0)
myGlContext->SetDrawBuffer (GL_BACK);
- if (myGlContext->core11 != NULL)
+ if (myGlContext->core11ffp != NULL)
{
glMatrixMode (GL_MODELVIEW);
}
::glViewport (0, 0, myWidth, myHeight);
#if !defined(GL_ES_VERSION_2_0)
::glDrawBuffer (GL_BACK);
- if (myGlContext->core11 != NULL)
+ if (myGlContext->core11ffp != NULL)
{
::glMatrixMode (GL_MODELVIEW);
}
// General initialization of the context
#if !defined(GL_ES_VERSION_2_0)
- if (myGlContext->core11 != NULL)
+ if (myGlContext->core11ffp != NULL)
{
// enable two-side lighting by default
- glLightModeli ((GLenum )GL_LIGHT_MODEL_TWO_SIDE, GL_TRUE);
- glHint (GL_POINT_SMOOTH_HINT, GL_FASTEST);
+ myGlContext->core11ffp->glLightModeli ((GLenum )GL_LIGHT_MODEL_TWO_SIDE, GL_TRUE);
+ myGlContext->core11fwd->glHint (GL_POINT_SMOOTH_HINT, GL_FASTEST);
if (myGlContext->caps->ffpEnable)
{
- glHint (GL_FOG_HINT, GL_FASTEST);
+ myGlContext->core11fwd->glHint (GL_FOG_HINT, GL_FASTEST);
}
}
- glHint (GL_LINE_SMOOTH_HINT, GL_FASTEST);
- glHint (GL_POLYGON_SMOOTH_HINT, GL_FASTEST);
+ myGlContext->core11fwd->glHint (GL_LINE_SMOOTH_HINT, GL_FASTEST);
+ myGlContext->core11fwd->glHint (GL_POLYGON_SMOOTH_HINT, GL_FASTEST);
if (myGlContext->Vendor() == "microsoft corporation"
&& !myGlContext->IsGlGreaterEqual (1, 2))
{
ViewMatrix_applied = &myDefaultMatrix;
StructureMatrix_applied = &myDefaultMatrix;
- if (myGlContext->core11 == NULL)
+ if (myGlContext->core11ffp == NULL)
{
if (myGlContext->caps->ffpEnable)
{