Skip to content

Commit 43c608c

Browse files
README: Small updates including some URI details.
1 parent b448e2c commit 43c608c

File tree

1 file changed

+20
-11
lines changed

1 file changed

+20
-11
lines changed

README.md

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -94,15 +94,15 @@ ctest
9494

9595

9696

97-
####On Windows
97+
#### On Windows
9898

9999
I'd recommend building natively with the [Build Tools for Visual Studio 2019](https://visualstudio.microsoft.com/downloads/) toolchain (and not mingw or WSL etc which is unsupported). I recommend [gitbash](https://git-scm.com/downloads) for executing the bash snippets on this page and cloning Pangolin. You can work from within their provided console or the fancy new [Windows Terminal](https://devblogs.microsoft.com/commandline/introducing-windows-terminal/) which is a huge improvement to the developer experience on Windows.
100100

101101
#### With Python
102102

103103
You have to be careful about what python version Pangolin has found and is attempting to link against. It will tell you during the `cmake ..` step and you can change it by explicitly telling it the python executable with `cmake -DPYTHON_EXECUTABLE=/path/to/python ..`or ``cmake -DPYTHON_EXECUTABLE=`which python3` `` to use the python accessed through the `python3` alias.
104104

105-
==NOTE== The python wheel is only currently working on MacOS. On Linux, you'll need to load the .so manually `import sys; sys.path.append('path/of/pypangolin.so')`. On Windows, you're out of luck right now. Help appreciated!
105+
**NOTE** The python wheel is only currently working on MacOS. On Linux, you'll need to load the .so manually `import sys; sys.path.append('path/of/pypangolin.so')`. On Windows, you're out of luck right now. Help appreciated!
106106

107107
#### On the Web
108108

@@ -132,13 +132,13 @@ Please note; most Pangolin dependencies are optional - to disable a dependency w
132132

133133
#### Common Runtime Problems
134134

135-
==Framebuffer with requested attributes not available.==: You're building against an old or unaccelerated OpenGL version. Either your graphics drivers are not correctly installed or you are on an unusual platform (such as within Docker, in a VM, working over an X forwarding SSH session) which has limited graphics acceleration. For the former case, you need to make sure your system is using appropriate drivers (you can test glxgears / glxinfo on linux for instance). There isn't much you can do about the latter except changing your setup (e.g. finding a VM which can better accelerate your graphics, or perhaps using the [nvidia-docker](https://github.com/NVIDIA/nvidia-docker) wrapper around docker to correctly pass through the graphics driver)
135+
<u>Framebuffer with requested attributes not available</u>: You're building against an old or unaccelerated OpenGL version. Either your graphics drivers are not correctly installed or you are on an unusual platform (such as within Docker, in a VM, working over an X forwarding SSH session) which has limited graphics acceleration. For the former case, you need to make sure your system is using appropriate drivers (you can test glxgears / glxinfo on linux for instance). There isn't much you can do about the latter except changing your setup (e.g. finding a VM which can better accelerate your graphics, or perhaps using the [nvidia-docker](https://github.com/NVIDIA/nvidia-docker) wrapper around docker to correctly pass through the graphics driver)
136136

137137
#### Common Python Problems
138138

139-
==error: unknown target 'pypangolin_wheels'== : cmake didn't find your python. Go back and adjust your cmake variables (such as the tip above) until you see something like "Selected Python: '/opt/local/bin/python3.9'" in the output.
139+
<u>error: unknown target 'pypangolin_wheels'</u> : cmake didn't find your python. Go back and adjust your cmake variables (such as the tip above) until you see something like "Selected Python: '/opt/local/bin/python3.9'" in the output.
140140

141-
==ModuleNotFoundError: No module named 'pypangolin'==: Did you install the wheel (see the bash comment under build)? Are you running using the same Python as Pangolin found during the `cmake ..` step?
141+
<u>ModuleNotFoundError: No module named 'pypangolin'</u>: Did you install the wheel (see the bash comment under build)? Are you running using the same Python as Pangolin found during the `cmake ..` step?
142142

143143

144144

@@ -150,25 +150,34 @@ To contribute to Pangolin, I would appreciate pull requests against the master b
150150

151151

152152

153-
## Scheme syntax for windowing and video
153+
## Extensibility & Factories
154154

155-
Pangolin uses 'URI' syntax for modularising video drivers and windowing backends. The syntax follows along the lines of `module_name:[option1=value1,option2=value2,...]//module_resource_to_open`.
155+
Pangolin uses an extensible factory mechanism for modularising video drivers, windowing backends and console interpreters. Concrete instances are instantiated from a particular factory using a URI string which identifies which factory to use and what parameters it should use. As strings, URI's are a useful mechanism for providing and validating configuration from an end user. The URI form is:
156+
`module_name:[option1=value1,option2=value2,...]//module_resource_to_open`.
156157

157-
Some examples for using this URI syntax with the VideoViewer tool is as follows:
158+
#### Video URI's
159+
160+
The *VideoViewer* tool takes these URI's directly in order to specify what images or video to load and show:
158161

159162
```bash
160163
VideoViewer test://
161164
VideoViewer uvc:[size=640x480]///dev/video0
162165
VideoViewer flip://debayer:[tile=rggb,method=downsample]//file://~/somefile.pango
163166
```
164167

165-
Notice that for video, some modules support chaining to construct a simple filter graph. See include/pangolin/video/video.h for more examples.
168+
Notice that for video, some modules support chaining to construct a simple filter graph.
169+
170+
#### Window URI's
166171

167-
For windowing, you can also customize default arguments for Pangolin applications by setting the `PANGOLIN_WINDOW_URI` environment variable. For instance, on high-DPI screens (in this example on OSX), you could set:
172+
Windowing in Pangolin is also backed by a factory. When an application calls CreateWindowAndBind() or similar, the default:// URI is specified. This can be overriden to use different windowing options by setting the`PANGOLIN_WINDOW_URI` environment variable. e.g.
168173

169174

170175
```bash
171-
setenv PANGOLIN_WINDOW_URI "cocoa:[HIGHRES=true]//"
176+
# Use the X11 Window Driver and override the default window size
177+
PANGOLIN_WINDOW_URI="x11:[width=1024,height=768]//" ./some_pangolin_app
178+
179+
# Create a 'virtual' window using a framebuffer
180+
PANGOLIN_WINDOW_URI="headless://" ./another_pangolin_app
172181
```
173182

174183
Some window parameters that may be interesting to override are `DISPLAYNAME`, `DOUBLEBUFFER`, `SAMPLE_BUFFERS`, `SAMPLES`, `HIGHRES`. Window modules currently include `x11`, `winapi`, `cocoa`.

0 commit comments

Comments
 (0)