Browse Source

Example update for RPi

Example update for RPi
master
c-mendoza 8 years ago
parent
commit
6f298161c6
  1. 97
      example/bin/data/ofxpimapper.xml
  2. 24
      example/src/main.cpp

97
example/bin/data/ofxpimapper.xml

@ -2,16 +2,16 @@
<surface type="0">
<vertices>
<vertex>
<x>140.000000000</x>
<y>65.000000000</y>
<x>119.000000000</x>
<y>379.000000000</y>
</vertex>
<vertex>
<x>397.625549316</x>
<y>304.812774658</y>
<x>387.000000000</x>
<y>96.000000000</y>
</vertex>
<vertex>
<x>90.374511719</x>
<y>304.812774658</y>
<x>405.000000000</x>
<y>657.000000000</y>
</vertex>
</vertices>
<texCoords>
@ -36,8 +36,8 @@
<surface type="5">
<vertices>
<vertex>
<x>183.000000000</x>
<y>70.000000000</y>
<x>387.000000000</x>
<y>96.000000000</y>
</vertex>
<vertex>
<x>862.290893555</x>
@ -48,8 +48,8 @@
<y>652.968627930</y>
</vertex>
<vertex>
<x>195.000000000</x>
<y>711.000000000</y>
<x>405.000000000</x>
<y>657.000000000</y>
</vertex>
</vertices>
<texCoords>
@ -78,46 +78,91 @@
<perspectiveWarping>1</perspectiveWarping>
</properties>
</surface>
<surface type="1">
<surface type="5">
<vertices>
<vertex>
<x>860.523620605</x>
<y>46.077301025</y>
</vertex>
<vertex>
<x>860.523620605</x>
<y>247.922729492</y>
</vertex>
<vertex>
<x>1379.000000000</x>
<y>533.000000000</y>
</vertex>
<vertex>
<x>1183.476318359</x>
<y>46.077301025</y>
</vertex>
</vertices>
<texCoords>
<texCoord>
<x>0.000000000</x>
<y>0.000000000</y>
</texCoord>
<texCoord>
<x>1.000000000</x>
<y>0.000000000</y>
</texCoord>
<texCoord>
<x>1.000000000</x>
<y>1.000000000</y>
</texCoord>
<texCoord>
<x>0.000000000</x>
<y>1.000000000</y>
</texCoord>
</texCoords>
<source>
<source-type>image</source-type>
<source-name>image2.jpg</source-name>
</source>
<properties>
<perspectiveWarping>1</perspectiveWarping>
</properties>
</surface>
<surface type="5">
<vertices>
<vertex>
<x>219.956512451</x>
<y>481.153137207</y>
<x>1276.000000000</x>
<y>204.000000000</y>
</vertex>
<vertex>
<x>742.043579102</x>
<y>481.153137207</y>
<x>724.000000000</x>
<y>387.000000000</y>
</vertex>
<vertex>
<x>742.043579102</x>
<y>792.846923828</y>
<x>707.000000000</x>
<y>809.000000000</y>
</vertex>
<vertex>
<x>219.956512451</x>
<y>792.846923828</y>
<x>1284.000000000</x>
<y>708.000000000</y>
</vertex>
</vertices>
<texCoords>
<texCoord>
<x>0.106250003</x>
<x>0.101562500</x>
<y>0.000000000</y>
</texCoord>
<texCoord>
<x>0.918749988</x>
<x>0.884374976</x>
<y>0.000000000</y>
</texCoord>
<texCoord>
<x>0.918749988</x>
<y>0.994444430</y>
<x>0.884374976</x>
<y>1.002777815</y>
</texCoord>
<texCoord>
<x>0.106250003</x>
<y>0.994444430</y>
<x>0.101562500</x>
<y>1.002777815</y>
</texCoord>
</texCoords>
<source>
<source-type>video</source-type>
<source-name>earth-and-technicians.mp4</source-name>
<source-name>control-panel-and-operation.mp4</source-name>
</source>
<properties>
<perspectiveWarping>1</perspectiveWarping>

24
example/src/main.cpp

@ -14,9 +14,25 @@ int main(int argc, char * argv[]){
break;
}
}
Settings::instance()->setFullscreen(fullscreen);
ofSetupOpenGL(1024, 768, OF_WINDOW);
ofRunApp(new ofApp());
shared_ptr<ofAppBaseWindow> window;
#ifdef TARGET_OPENGLES
ofGLESWindowSettings esSettings;
esSettings.glesVersion = 2;
esSettings.width = 1440;
esSettings.height = 900;
window = ofCreateWindow(esSettings);
#else
ofGLWindowSettings glSettings;
glSettings.glVersionMajor = 2;
glSettings.glVersionMinor = 1;
glSettings.width = 1440;
glSettings.height = 900;
window = ofCreateWindow(glSettings);
#endif
auto app = std::make_shared<ofApp>();
ofRunApp(window, app);
Settings::instance()->setFullscreen(fullscreen);
ofRunMainLoop();
}

Loading…
Cancel
Save