// =======================================================================
GLenum OpenGl_TextureBufferArb::GetTarget() const
{
- return GL_TEXTURE_BUFFER_ARB; // GL_TEXTURE_BUFFER for OpenGL 3.1+
+ return GL_TEXTURE_BUFFER; // GL_TEXTURE_BUFFER for OpenGL 3.1+, OpenGL ES 3.2
}
// =======================================================================
const GLsizei theElemsNb,
const GLfloat* theData)
{
-#if !defined(GL_ES_VERSION_2_0)
- if (theComponentsNb < 1
- || theComponentsNb > 4)
+ if (theGlCtx->arbTBO == NULL)
+ {
+ return false;
+ }
+ else if (theComponentsNb < 1
+ || theComponentsNb > 4)
{
// unsupported format
return false;
UnbindTexture (theGlCtx);
Unbind (theGlCtx);
return true;
-#else
- return false;
-#endif
}
// =======================================================================
const GLsizei theElemsNb,
const GLuint* theData)
{
-#if !defined(GL_ES_VERSION_2_0)
- if (theComponentsNb < 1
- || theComponentsNb > 4)
+ if (theGlCtx->arbTBO == NULL)
+ {
+ return false;
+ }
+ else if (theComponentsNb < 1
+ || theComponentsNb > 4)
{
// unsupported format
return false;
UnbindTexture (theGlCtx);
Unbind (theGlCtx);
return true;
-#else
- return false;
-#endif
}
// =======================================================================