Commit 1bc94bb5 by Christophe Geuzaine

fix mobile build

parent 2fb727c8
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.geuz.onelab"
android:versionName="2.0.0"
android:versionCode="37"
android:versionName="2.1.0"
android:versionCode="38"
android:installLocation="auto" >
<uses-sdk android:minSdkVersion="14"
......
......@@ -20,7 +20,6 @@ if("${APPNAME}" STREQUAL "BBEMG")
file(GLOB BENCHMARKSDIR ${BENCHMARKSDIR}/benchmarks_private/bbemg*)
else("${APPNAME}" STREQUAL "BBEMG")
find_path(BENCHMARKSDIR models/ HINTS ../../../onelab_doc/)
message("HEY ${BENCHMARKSDIR}")
file(GLOB BENCHMARKSDIR ${BENCHMARKSDIR}/models/*)
endif("${APPNAME}" STREQUAL "BBEMG")
......@@ -116,14 +115,6 @@ if(ENABLE_BUILD_IOS_EMULATOR OR ENABLE_BUILD_IOS)
get_filename_component(DIRNAME ${DIR} NAME)
add_custom_command(TARGET xcodeProject POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_directory
${DIR} ${CMAKE_CURRENT_BINARY_DIR}/${APPNAME}/${APPNAME}/files/${DIRNAME})
file(GLOB PNG ${DIR}/*.png)
foreach(IMG ${PNG})
get_filename_component(IMGNAME ${IMG} NAME)
if(NOT (IMGNAME MATCHES ".*_128.png"))
add_custom_command(TARGET xcodeProject POST_BUILD COMMAND ${CMAKE_COMMAND} -E remove
"${CMAKE_CURRENT_BINARY_DIR}/${APPNAME}/${APPNAME}/files/${DIRNAME}/${IMGNAME}")
endif()
endforeach(IMG)
endforeach(DIR)
if("${APPNAME}" STREQUAL "BBEMG")
add_custom_command(TARGET xcodeProject POST_BUILD COMMAND
......@@ -220,14 +211,6 @@ if(ENABLE_BUILD_ANDROID)
get_filename_component(DIRNAME ${DIR} NAME)
add_custom_command(TARGET androidProject POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_directory
${DIR} ${CMAKE_CURRENT_BINARY_DIR}/models/${DIRNAME})
file(GLOB PNG ${DIR}/*.png)
foreach(IMG ${PNG})
get_filename_component(IMGNAME ${IMG} NAME)
if(NOT (IMGNAME MATCHES ".*_128.png"))
add_custom_command(TARGET androidProject POST_BUILD COMMAND ${CMAKE_COMMAND} -E remove
"${CMAKE_CURRENT_BINARY_DIR}/models/${DIRNAME}/${IMGNAME}")
endif()
endforeach(IMG)
endforeach(DIR)
find_program(ZIP_COMMAND zip)
add_custom_command(TARGET androidProject POST_BUILD COMMAND cd ${CMAKE_CURRENT_BINARY_DIR}/models/ && zip -r
......
......@@ -40,7 +40,7 @@ void drawGeomEdge(GEdge *e)
if(e->geomType() == GEntity::PartitionCurve) return;
if(e->geomType() == GEntity::BoundaryLayerCurve) return;
unsigned int col = CTX::instance()->color.geom.line;
unsigned int col = CTX::instance()->color.geom.curve;
glColor4ub((GLubyte)CTX::instance()->unpackRed(col),
(GLubyte)CTX::instance()->unpackGreen(col),
(GLubyte)CTX::instance()->unpackBlue(col),
......@@ -58,7 +58,7 @@ void drawGeomEdge(GEdge *e)
edge[i*3] = p.x(); edge[i*3+1] = p.y(); edge[i*3+2] = p.z();
}
// Then print the VA
glLineWidth((GLfloat)CTX::instance()->geom.lineWidth);
glLineWidth((GLfloat)CTX::instance()->geom.curveWidth);
glVertexPointer(3, GL_FLOAT, 0, &edge[0]);
glEnableClientState(GL_VERTEX_ARRAY);
glEnable(GL_LINE_SMOOTH);
......@@ -79,7 +79,7 @@ void drawContext::drawGeom()
if(!m->getVisibility()) continue;
if(CTX::instance()->geom.points || CTX::instance()->geom.pointsNum)
std::for_each(m->firstVertex(), m->lastVertex(), drawGeomVertex);
if(CTX::instance()->geom.lines || CTX::instance()->geom.linesNum ||
if(CTX::instance()->geom.curves || CTX::instance()->geom.curvesNum ||
CTX::instance()->geom.tangents)
std::for_each(m->firstEdge(), m->lastEdge(), drawGeomEdge);
if(CTX::instance()->geom.surfaces || CTX::instance()->geom.surfacesNum ||
......
......@@ -30,9 +30,9 @@ void drawMeshVertex(GVertex *e)
if(CTX::instance()->mesh.colorCarousel == 0 ||
CTX::instance()->mesh.volumesFaces || CTX::instance()->mesh.surfacesFaces) {
if(v->getPolynomialOrder() > 1)
col = CTX::instance()->color.mesh.vertexSup;
col = CTX::instance()->color.mesh.nodeSup;
else
col = CTX::instance()->color.mesh.vertex;
col = CTX::instance()->color.mesh.node;
}
else
col = getColorByEntity(e);
......
......@@ -35,11 +35,11 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>2.0.1</string>
<string>2.1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>2.0.1.1</string>
<string>2.1.0.0</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UIFileSharingEnabled</key>
......
......@@ -151,7 +151,7 @@
}
else if(indexPath.row == 1) {
[lblOptions setText:@"Show geometry lines"];
[showHideOptions setOn:(CTX::instance()->geom.lines)];
[showHideOptions setOn:(CTX::instance()->geom.curves)];
[showHideOptions addTarget:self action:@selector(setShowGeomLines:)
forControlEvents:UIControlEventValueChanged];
}
......@@ -225,7 +225,7 @@
- (void)setShowGeomLines:(UISwitch*)sender
{
CTX::instance()->geom.lines = sender.on;
CTX::instance()->geom.curves = sender.on;
[[NSNotificationCenter defaultCenter] postNotificationName:@"requestRender" object:nil];
}
......
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