Commit f1dacd56 authored by nadro's avatar nadro

- Wrapped glDrawBuffer function (it's required for OGL ES drivers).

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5179 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 9d73bba0
......@@ -12,7 +12,7 @@
#include "IRenderTarget.h"
#include "dimension2d.h"
#include "COpenGLExtensionHandler.h"
#include "os.h"
#include <d3d9.h>
......
......@@ -237,9 +237,9 @@ public:
const u32 textureSize = Texture.size();
if (textureSize == 0)
glDrawBuffer(GL_NONE);
Driver->irrGlDrawBuffer(GL_NONE);
else if (textureSize == 1 || MultipleRenderTarget == 0)
glDrawBuffer(GL_COLOR_ATTACHMENT0);
Driver->irrGlDrawBuffer(GL_COLOR_ATTACHMENT0);
else
{
const u32 bufferCount = core::min_(MultipleRenderTarget, core::min_(textureSize, AssignedTexture.size()));
......
......@@ -1137,6 +1137,7 @@ class COpenGLExtensionHandler
void irrGlFramebufferRenderbuffer(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
void irrGlGenerateMipmap(GLenum target);
void irrGlActiveStencilFace(GLenum face);
void irrGlDrawBuffer(GLenum mode);
void irrGlDrawBuffers(GLsizei n, const GLenum *bufs);
// vertex buffer object
......@@ -2228,6 +2229,11 @@ inline void COpenGLExtensionHandler::irrGlActiveStencilFace(GLenum face)
#endif
}
inline void COpenGLExtensionHandler::irrGlDrawBuffer(GLenum mode)
{
glDrawBuffer(mode);
}
inline void COpenGLExtensionHandler::irrGlDrawBuffers(GLsizei n, const GLenum *bufs)
{
#ifdef _IRR_OPENGL_USE_EXTPOINTER_
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment