Difference between revisions of "Mesa"

From ArmadeusWiki
Jump to: navigation, search
m (Use "Under Construction" Template)
(Installation)
 
(12 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
{{Under Construction}}
 
{{Under Construction}}
------
 
<br>
 
 
[[Image:Gears.png]]
 
[[Image:Gears.png]]
 +
 +
==Pre-requisites==
 +
* To compile, mesa requires ''makedepend'' installed on your Host:
 +
<pre class="host">
 +
$ sudo apt-get install xutils-dev
 +
</pre>
  
 
==Installation==
 
==Installation==
 +
* Select it in Buildroot menu:
 +
<pre class="host">
 +
$ make menuconfig
 +
</pre>
  
  armadeus$ make menuconfig
+
<pre class="config">
[[Image:Menuconfig_package.png]]
+
Package Selection for the target --->
 +
    Libraries  --->
 +
        Graphics  --->
 +
            [*] Mesa library
 +
</pre>
 +
It will autoselect GPM too !!
  
* Choose Mesa
+
* Rebuild your rootfs:
 +
<pre class="host">
 +
$ make
 +
</pre>
 +
* and then reflash it.
  
Requires GPM too !!
+
* copy some demo or examples on your target:
 
+
<pre class="host">
* copy demo and examples .... on your rootfs
+
$ cp buildroot/output/build/Mesa-7.0/progs/demos/gears /tftpboot/
 +
</pre>
 +
<pre class="apf">
 +
# cd
 +
# mkdir -p mesa/demos/
 +
# cd mesa/demos/
 +
# tftp -g -r gears 192.168.1.2  (Host IP)
 +
# chmod a+x gears
 +
</pre>
  
 
==Usage==
 
==Usage==
To launch Allegro programs you must do it from a virtual terminal, for example the one opened on the LCD screen after APF boot. <br>'''You won't be able to launch Allegro programs from the serial console !!'''<br>
+
* Prevent framebuffer from going to sleep and cursor from blinking:
This implies that you have a keyboard connected to your board (for the moment only PS/2 one are supported if you have an FPGA onboard).
+
<pre class="apf">
 +
# echo -e '\033[9;0]' > /dev/tty1
 +
# echo 0 > /sys/class/graphics/fbcon/cursor_blink
 +
</pre>
 +
 
 +
* Launch your demos:
 +
<pre class="apf">
 +
# cd mesa/demos/
 +
# ./gears
 +
....
 +
Defaulting to stdin input
 +
48 frames in  5.034 seconds =  9.535 FPS
 +
</pre>
 +
* With only ~10fps (on APF27) for the ''gears'' demo, you will learn that ARM9 cores without 3D nor Floating points unit really suffer to render 3D scenes in software. (Maybe next APF generation will solve the problem ;-) ).
 +
* Demos that are worth to launch: gears, spriteblast, stex3d (long to start), tunnel (textures & fog disactivated)
 +
* Samples that are worth to launch: wave, sphere, olympic
 +
* Demo will take control of the serial console. To quit each demo, press "ESC" on your console.
 +
 
 +
{{Note|If you get a "Segmentation Fault" when launching your OpenGL demos, try to do an <pre class="apf"># export LD_PRELOAD=/lib/libpthread.so.0 </pre> just before.}}
  
 
==Links==
 
==Links==
 
* [http://www.mesa3d.org/ Mesa Website]
 
* [http://www.mesa3d.org/ Mesa Website]
 
* http://www.mesa3d.org/glfbdev-driver.html
 
* http://www.mesa3d.org/glfbdev-driver.html
 
<br>[[Image:FrenchFlag.png]][[Fr:Mesa| Cette page en français]]
 
  
 
[[Category:Software]]
 
[[Category:Software]]
 
[[Category:Graphical User Interface]]
 
[[Category:Graphical User Interface]]
 +
[[Category:3D]]

Latest revision as of 16:57, 6 July 2011

Page under construction... Construction.png Informations on this page are not guaranteed !! Gears.png

Pre-requisites

  • To compile, mesa requires makedepend installed on your Host:
$ sudo apt-get install xutils-dev

Installation

  • Select it in Buildroot menu:
$ make menuconfig
Package Selection for the target  --->
    Libraries  --->
        Graphics  --->
            [*] Mesa library

It will autoselect GPM too !!

  • Rebuild your rootfs:
 $ make
  • and then reflash it.
  • copy some demo or examples on your target:
$ cp buildroot/output/build/Mesa-7.0/progs/demos/gears /tftpboot/
# cd
# mkdir -p mesa/demos/
# cd mesa/demos/
# tftp -g -r gears 192.168.1.2  (Host IP)
# chmod a+x gears

Usage

  • Prevent framebuffer from going to sleep and cursor from blinking:
# echo -e '\033[9;0]' > /dev/tty1
# echo 0 > /sys/class/graphics/fbcon/cursor_blink
  • Launch your demos:
# cd mesa/demos/
# ./gears
....
Defaulting to stdin input
48 frames in  5.034 seconds =  9.535 FPS
  • With only ~10fps (on APF27) for the gears demo, you will learn that ARM9 cores without 3D nor Floating points unit really suffer to render 3D scenes in software. (Maybe next APF generation will solve the problem ;-) ).
  • Demos that are worth to launch: gears, spriteblast, stex3d (long to start), tunnel (textures & fog disactivated)
  • Samples that are worth to launch: wave, sphere, olympic
  • Demo will take control of the serial console. To quit each demo, press "ESC" on your console.
Note Note: If you get a "Segmentation Fault" when launching your OpenGL demos, try to do an
# export LD_PRELOAD=/lib/libpthread.so.0 
just before.


Links