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. 22
      example/src/main.cpp

97
example/bin/data/ofxpimapper.xml

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

22
example/src/main.cpp

@ -15,8 +15,24 @@ int main(int argc, char * argv[]){
} }
} }
Settings::instance()->setFullscreen(fullscreen); 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
ofSetupOpenGL(1024, 768, OF_WINDOW); auto app = std::make_shared<ofApp>();
ofRunApp(new ofApp()); ofRunApp(window, app);
Settings::instance()->setFullscreen(fullscreen);
ofRunMainLoop();
} }

Loading…
Cancel
Save