android support
git-svn-id: svn://db.shs.com.ru/libs@257 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
@@ -13,7 +13,9 @@ else()
|
||||
endif ()
|
||||
endif()
|
||||
|
||||
find_package(OpenGL REQUIRED)
|
||||
if (NOT DEFINED ANDROID_PLATFORM)
|
||||
find_package(OpenGL REQUIRED)
|
||||
endif()
|
||||
if (MINGW)
|
||||
find_package(MinGW REQUIRED)
|
||||
endif()
|
||||
@@ -87,9 +89,11 @@ macro(qad_project NAME _MODULES _LIBS)
|
||||
qt_target_link_libraries(${PROJ_NAME} ${_LIBS})
|
||||
qad_install(${PROJ_NAME} "${out_HDR}")
|
||||
message(STATUS "Building ${PROJ_NAME}")
|
||||
if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/plugin")
|
||||
set(_${NAME}_PLUGIN_LIBS "${_LIBS}")
|
||||
add_subdirectory(plugin)
|
||||
if (NOT DEFINED ANDROID_PLATFORM)
|
||||
if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/plugin")
|
||||
set(_${NAME}_PLUGIN_LIBS "${_LIBS}")
|
||||
add_subdirectory(plugin)
|
||||
endif()
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
|
||||
@@ -227,7 +227,11 @@ void Graphic::canvasPaintEvent(QPaintEvent * ) {
|
||||
//phei = hei;
|
||||
QPainter p;
|
||||
if (isOGL) {
|
||||
#ifdef ANDROID
|
||||
p.fillRect(canvas->rect(), Qt::black);
|
||||
#else
|
||||
glClearColor(0.f, 0.f, 0.f, 0.f);
|
||||
#endif
|
||||
p.begin(canvas);
|
||||
} else p.begin(buffer);
|
||||
p.fillRect(canvas->rect(), back_color);
|
||||
@@ -242,8 +246,10 @@ void Graphic::canvasPaintEvent(QPaintEvent * ) {
|
||||
}
|
||||
p.setRenderHint(QPainter::Antialiasing, aalias);
|
||||
if (isOGL) {
|
||||
#ifndef ANDROID
|
||||
if (aalias) glEnable(GL_MULTISAMPLE);
|
||||
else glDisable(GL_MULTISAMPLE);
|
||||
#endif
|
||||
}
|
||||
//p.setRenderHint(QPainter::HighQualityAntialiasing, aalias);
|
||||
if (!aalias) p.translate(-0.5, -0.5);
|
||||
|
||||
Reference in New Issue
Block a user