fix bug running in virtualbox
This commit is contained in:
		
							parent
							
								
									1386064d71
								
							
						
					
					
						commit
						9ca1637677
					
				|  | @ -31,7 +31,7 @@ IF(CMAKE_COMPILER_IS_GNUCXX) | |||
|     SET(CXX_WARNS "-Wall -Wextra -Werror -Wno-unused-parameter -Wno-unused-but-set-variable -Wno-unused-variable -Wno-switch") | ||||
|     SET(CMAKE_CXX_FLAGS "-std=gnu++0x -pipe ${CXX_WARNS}") | ||||
|     SET(CMAKE_CXX_FLAGS_DEBUG "-O0 -g3 -ggdb3 -fno-inline") | ||||
|     SET(CMAKE_CXX_FLAGS_RELEASE "-O2 -rdynamic") | ||||
|     SET(CMAKE_CXX_FLAGS_RELEASE "-O2") | ||||
|     SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O1 -g -fno-inline") | ||||
| ENDIF(CMAKE_COMPILER_IS_GNUCXX) | ||||
| 
 | ||||
|  | @ -178,6 +178,7 @@ IF(WIN32) | |||
|                        -o ${CMAKE_CURRENT_BINARY_DIR}/icon.o) | ||||
|     SET(SOURCES ${SOURCES} icon.o) | ||||
| ELSE(WIN32) | ||||
|     SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -rdynamic") | ||||
|     SET(ADDITIONAL_LIBRARIES -lpthread) | ||||
|     SET(SOURCES ${SOURCES} src/framework/platform/x11platform.cpp) | ||||
| ENDIF(WIN32) | ||||
|  |  | |||
|  | @ -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"); | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	 Eduardo Bart
						Eduardo Bart