Commit 878c280c authored by hybrid's avatar hybrid

Some driver cleanup. Fixed the issues with external window usage under OpenGL...

Some driver cleanup. Fixed the issues with external window usage under OpenGL and Linux. Added error checking for VBO usage.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@1443 dfc29bdd-3216-0410-991c-e03cc46cb475
parent c270bd99
This diff is collapsed.
...@@ -393,6 +393,8 @@ namespace video ...@@ -393,6 +393,8 @@ namespace video
HDC HDc; // Private GDI Device Context HDC HDc; // Private GDI Device Context
HWND Window; HWND Window;
HGLRC HRc; // Permanent Rendering Context HGLRC HRc; // Permanent Rendering Context
#elif defined(_IRR_USE_LINUX_DEVICE_)
GLXDrawable Drawable;
#elif defined(_IRR_USE_OSX_DEVICE_) #elif defined(_IRR_USE_OSX_DEVICE_)
CIrrDeviceMacOSX *_device; CIrrDeviceMacOSX *_device;
#endif #endif
......
...@@ -91,7 +91,7 @@ public: ...@@ -91,7 +91,7 @@ public:
Driver->setTexture(0, material.getTexture(0)); Driver->setTexture(0, material.getTexture(0));
Driver->setBasicRenderStates(material, lastMaterial, resetAllRenderstates); Driver->setBasicRenderStates(material, lastMaterial, resetAllRenderstates);
if (material.MaterialType != lastMaterial.MaterialType || resetAllRenderstates) if (resetAllRenderstates || (material.MaterialType != lastMaterial.MaterialType))
{ {
// thanks to Murphy, the following line removed some // thanks to Murphy, the following line removed some
// bugs with several OpenGL implementations. // bugs with several OpenGL implementations.
......
...@@ -406,7 +406,7 @@ const core::dimension2d<s32>& COpenGLTexture::getOriginalSize() const ...@@ -406,7 +406,7 @@ const core::dimension2d<s32>& COpenGLTexture::getOriginalSize() const
} }
//! Returns of the texture. //! Returns size of the texture.
const core::dimension2d<s32>& COpenGLTexture::getSize() const const core::dimension2d<s32>& COpenGLTexture::getSize() const
{ {
if (Image) if (Image)
...@@ -501,7 +501,7 @@ bool COpenGLTexture::isRenderTarget() const ...@@ -501,7 +501,7 @@ bool COpenGLTexture::isRenderTarget() const
} }
void COpenGLTexture::setRenderTarget(bool isTarget) void COpenGLTexture::setIsRenderTarget(bool isTarget)
{ {
IsRenderTarget = isTarget; IsRenderTarget = isTarget;
} }
......
...@@ -99,7 +99,7 @@ public: ...@@ -99,7 +99,7 @@ public:
void unbindFrameBufferObject(); void unbindFrameBufferObject();
//! sets whether this texture is intended to be used as a render target. //! sets whether this texture is intended to be used as a render target.
void setRenderTarget(bool isTarget); void setIsRenderTarget(bool isTarget);
private: private:
......
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