mirror of
https://github.com/edubart/otclient.git
synced 2025-10-15 03:54:54 +02:00
fix bug running in virtualbox
This commit is contained in:
@@ -73,7 +73,7 @@ uint Texture::internalLoadGLTexture(uchar *pixels, int channels, int width, int
|
||||
std::vector<uint8> tmp;
|
||||
|
||||
// old opengl drivers only accept power of two dimensions
|
||||
if(!g_graphics.isExtensionSupported("GL_ARB_texture_non_power_of_two")) {
|
||||
//if(!g_graphics.isExtensionSupported("GL_ARB_texture_non_power_of_two")) {
|
||||
int glWidth = 1;
|
||||
while(glWidth < width)
|
||||
glWidth = glWidth << 1;
|
||||
@@ -92,8 +92,8 @@ uint Texture::internalLoadGLTexture(uchar *pixels, int channels, int width, int
|
||||
}
|
||||
|
||||
m_glSize.setSize(glWidth, glHeight);
|
||||
} else
|
||||
m_glSize = m_size;
|
||||
//} else
|
||||
// m_glSize = m_size;
|
||||
|
||||
// detect pixels GL format
|
||||
GLenum format = 0;
|
||||
|
@@ -92,6 +92,7 @@ void LuaInterface::registerFunctions()
|
||||
g_lua.bindClassMemberFunction<UIWidget>("getFocusedChild", &UIWidget::getFocusedChild);
|
||||
g_lua.bindClassMemberFunction<UIWidget>("insertChild", &UIWidget::insertChild);
|
||||
g_lua.bindClassMemberFunction<UIWidget>("removeChild", &UIWidget::removeChild);
|
||||
g_lua.bindClassMemberFunction<UIWidget>("hasChild", &UIWidget::hasChild);
|
||||
g_lua.bindClassMemberFunction<UIWidget>("addChild", &UIWidget::addChild);
|
||||
g_lua.bindClassMemberFunction<UIWidget>("focusChild", &UIWidget::focusChild);
|
||||
g_lua.bindClassMemberFunction<UIWidget>("focusNextChild", &UIWidget::focusNextChild);
|
||||
|
@@ -620,7 +620,7 @@ bool Platform::createWindow(int x, int y, int width, int height, int minWidth, i
|
||||
logFatal("RGBA/Double buffered visual not supported");
|
||||
|
||||
// create GLX context
|
||||
x11.glxContext = glXCreateContext(x11.display, x11.visual, NULL, False);
|
||||
x11.glxContext = glXCreateContext(x11.display, x11.visual, NULL, True);
|
||||
if(!x11.glxContext)
|
||||
logFatal("Unable to create GLX context");
|
||||
|
||||
|
Reference in New Issue
Block a user