: 1
sha256sum: 6e5321cc6cf7e0da1dc25799459cd23ffb0c2e330e0283f3c87a99a9304bdd4e
:
name: libdrm-uapi-helper
version: 2.0.0-b.27
upstream-version: 2.0-rc27
type: lib,binless
language: c
project: intel-drm-uapi-helper
summary: Linux DRM uAPI C headers with the Intel PRELIM i915 extensions
license: GPL-2.0-only WITH Linux-syscall-note, MIT; Most are MIT, rest\
 GPL-2.0.
topics: drm, i915, intel gpu, linux kernel, uapi
description:
\
# Drm Uapi Helper for intel-dgpu releases

## Main URLs:

[Intel® GPGPU Documents and Releases](https://dgpu-docs.intel.com/ "Intel®\
 software for general purpose GPU capabilities").

[Intel® DGPU Linux Kernel Source Reference](https://github.com/intel-gpu/kern\
el)

## Goals

* Provide an **unified** view of the i915/xe uAPI available on these\
 reference releases. In special with the "PRELIM" uAPIs available in\
 i915_drm_prelim.h/xe_drm_prelim.h.
* Establish a **synchronized** update flow of uAPIs with all the user space\
 drivers available in the [Intel® GPGPU Documents and Releases](https://dgpu-\
docs.intel.com/ "Intel® software for general purpose GPU capabilities") for\
 i915.
* Provides uAPIs for user space consumers of preview xe driver available at\
 https://github.com/intel-gpu/xekmd-backports.


## Directory structure

* drm-uapi: make headers_install INSTALL_HDR_PATH=drm-uapi

* i915-shared-headers: Other i915 headers that are usually copied to user\
 space components.

## branches

* **master:**
   i915 uAPIs syncronized with [Intel® GPGPU Documents and\
 Releases](https://dgpu-docs.intel.com/ "Intel® software for general purpose\
 GPU capabilities")

*   **xe:** xe uAPIs syncronized with [xekmd-backports](https://github.com/in\
tel-gpu/xekmd-backports ).

\
description-type: text/markdown;variant=GFM
package-description:
\
# libdrm-uapi-helper - Linux DRM uAPI C headers with the Intel PRELIM i915\
 extensions

This is a `build2` package for the
[`drm-uapi-helper`](https://github.com/intel-gpu/drm-uapi-helper) C library.
It provides a unified view of the Linux DRM and i915 kernel uAPI available in
the Intel GPGPU (DGPU) releases, in particular the "PRELIM" uAPI extensions
in `i915_drm_prelim.h`, as well as other i915 headers that are usually copied
to user space components.


## Usage

To start using `libdrm-uapi-helper` in your project, add the following\
 `depends`
value to your `manifest`, adjusting the version constraint as appropriate:

```
depends: libdrm-uapi-helper ^2.0.0-b.27
```

Then import the library in your `buildfile`:

```
import libs = libdrm-uapi-helper%lib{drm-uapi-helper}
```


## Importable targets

This package provides the following importable targets:

```
lib{drm-uapi-helper}
```

The headers, included with the upstream directory as the prefix
(`#include <drm-uapi/drm.h>`, `#include <drm-uapi/i915_drm.h>`, which also
includes `i915_drm_prelim.h`, `#include <i915-shared-headers/iaf_netlink.h>`,
and so on). The package version maps the upstream release candidates to
betas (`2.0.0-b.27` is `v2.0-rc27`).

The headers are only supported on Linux, where they include the kernel's
`<linux/types.h>` and `<asm/ioctl.h>` from the system (the Linux API headers
package, for example `linux-libc-dev` on Debian). The xe uAPI from the
separate upstream `xe` branch is not included. As in the kernel, `i810_drm.h`
and `msm_drm.h` use C++ keywords as member names and are C only.


## Configuration variables

This package provides no configuration variables.

\
package-description-type: text/markdown;variant=GFM
url: https://github.com/intel-gpu/drm-uapi-helper
package-url: https://github.com/build2-packaging/intel-drm-uapi-helper
package-email: packaging@build2.org; Mailing list.
depends: * build2 >= 0.18.0
depends: * bpkg >= 0.18.0
build-include: linux**
build-exclude: **; Only supported on Linux.
bootstrap-build:
\
project = libdrm-uapi-helper

using version
using config
using test
using install
using dist

\
root-build:
\
# Uncomment to suppress warnings coming from external libraries.
#
#c.internal.scope = current

using c

h{*}: extension = h
c{*}: extension = c

# The test target for cross-testing (running tests under Wine, etc).
#
test.target = $c.target

\
location: intel-drm-uapi-helper/libdrm-uapi-helper-2.0.0-b.27.tar.gz
sha256sum: d01e5a6dd9f130a44db18670d1d17f9495c3364717cd226e1df04dee8f4ab422
:
name: libmetrics-discovery
version: 1.16.197
language: c++
language: c
project: intel-metrics-discovery
summary: Intel Metrics Discovery API (MDAPI) C++ library
license: MIT; MIT License.
topics: intel gpu, performance counters, profiling, mdapi
description:
\
# Intel(R) Metrics Discovery Application Programming Interface

## Introduction

This software is a user mode library that provides access to GPU performance\
 data.

The library has OS abstraction layer that allows for interoperability in\
 different environments.

## License

Intel(R) Metrics Discovery Application Programming Interface is distributed\
 under the MIT License.

You may obtain a copy of the License at:
https://opensource.org/licenses/MIT

## Supported Platforms

- Intel(R) Processors with Xe3P graphics devices (formerly Crescent Island,\
 Nova Lake-P)
- Intel(R) Processors with Xe3 graphics devices (formerly Panther Lake,\
 Wildcat Lake, Nova Lake)
- Intel(R) Processors with Xe2 graphics devices (formerly Lunar Lake)
- Intel(R) Processors with Arc graphics devices (formerly Alchemist,\
 Battlemage)
- Intel(R) Processors with Xe graphics devices (formerly Tiger Lake, Rocket\
 Lake, DG1, Alder Lake, Ponte Vecchio, Meteor Lake, Arrow Lake)

Since version 1.14.181, support for Gen7.5, Gen8, Gen9 and Gen11 platforms\
 has been discontinued. For these platforms, use version 1.14.180 or earlier.

## Supported Operating Systems

Intel(R) Metrics Discovery Application Programming Interface is supported on\
 Linux family operating systems with minimum kernel version 5.7.
Event based measurements require minimum Mesa version 18.2.

### Detailed minimum version requirements

| Platform | Code Name | Minimum Linux Kernel Version | Minimum Mesa Version |
|--|--|--|--|
| Xe3P-LPG | Nova Lake-P | 7.1 | 26.1 |
| Xe3P-XPC | Crescent Island | 6.19 | ---- |
| Xe3-LPG | Nova Lake | 6.19 | 26.0 |
| Xe3-LPG | Wildcat Lake | 6.18 | 25.3 |
| Xe3-LPG | Panther Lake | 6.15 | 25.1 |
| Xe2-HPG | Battlemage | 6.11 | 24.2 |
| Xe2-LPG | Lunar Lake | 6.11 | 24.2 |
| Xe-LPG | Arrow Lake-H | 6.9 | 24.1 |
| Xe-LPG | Arrow Lake-S | 6.7 | 24.1 |
| Xe-LPG | Arrow Lake-U | 6.9 | 24.1 |
| Xe-LPG | Meteor Lake | 6.7 | 23.1 |
| Xe-HPG | Alchemist | 6.2 | 22.2 |
| Xe-HPC | Ponte Vecchio | 5.20 | 18.2 |
| Xe-LP | Alder Lake-S | 5.16 | 22.0 |
| Xe-LP | Alder Lake-N | 5.18 | 22.0 |
| Xe-LP | Alder Lake-P | 5.17 | 22.0 |
| Xe-LP | DG1 | 5.16 | 22.1.5 |
| Xe-LP | Rocket Lake | 5.13 | 20.2 |
| Xe-LP | Tiger Lake | 5.7 | 21.0 |

## Build and Install

1\. Download sources.

2\. Install libdrm-dev.

```shell
sudo apt install libdrm-dev
```
or
```shell
sudo dnf install libdrm-devel
```

3\. Run CMake generation:

```shell
mkdir build && cd build
cmake ..
```

4\. Build:

```shell
make -j$(nproc)
```

5\. Built library will be here (for 64-bit Linux):

```shell
(project_root)/dump/linux64/release/metrics_discovery/libigdmd.so
```

6\. Install:

If using native package manager (yum, dnf, etc..) skip to step 7

```shell
sudo make install
```

7\. Packaging:

```shell
make package
```

After the process completes, there should be a set of files such as
```code
intel-metrics-discovery-[VERSION].x86_64.rpm
intel-metrics-discovery-devel-[VERSION].x86_64.rpm
intel-metrics-discovery-pkgconfig-[VERSION].x86_64.rpm
```

*Note: To clear CMake params remove CMakeCache.txt, then regenerate.*

## Support

Please file a GitHub issue to report an issue or ask questions.

## How to Contribute

Contributions to the Metrics-Discovery are welcomed and encouraged.
Please see [CONTRIBUTING](CONTRIBUTING.md) for details how to
contribute to the project.

##
___(*) Other names and brands my be claimed as property of others.___

\
description-type: text/markdown;variant=GFM
package-description:
\
# libmetrics-discovery - Intel Metrics Discovery API (MDAPI) C++ library

This is a `build2` package for the
[`metrics-discovery`](https://github.com/intel/metrics-discovery) C++
library. It provides the Intel Metrics Discovery Application Programming
Interface (MDAPI) library, a user mode library that provides access to GPU
performance data.


## Usage

To start using `libmetrics-discovery` in your project, add the following\
 `depends`
value to your `manifest`, adjusting the version constraint as appropriate:

```
depends: libmetrics-discovery ^1.16.197
```

Then import the library in your `buildfile`:

```
import libs = libmetrics-discovery%lib{igdmd}
```


## Importable targets

This package provides the following importable targets:

```
lib{igdmd}
```

The MDAPI library. Its interface is the `metrics_discovery_api.h` header
(`#include <metrics_discovery_api.h>`) of the `libmetrics-discovery-headers`
package, an interface dependency of this library. The library exports the
factory functions (`OpenAdapterGroup()`, `OpenMetricsDevice()`,
`CloseMetricsDevice()`, and `OpenMetricsDeviceFromFile()`), which the header
only declares as function pointer types (`OpenAdapterGroup_fn`, etc), since
applications normally resolve them by name after loading the library at
runtime. As in upstream, the shared library of a release is named
`libigdmd.so.<version>` with the `libigdmd.so.<major>` SONAME
(`libigdmd.so.1`).

Only Linux is supported, as in upstream. The library requires the system
`libdrm` library. The DRM uAPI headers that upstream bundles come from the
`libdrm-uapi-helper` package, except for the xe kernel mode driver uAPI\
 header,
for which the library uses the system kernel uAPI header (`<drm/xe_drm.h>`).
As a result, the support for the xe kernel mode driver depends on the
version of the system kernel uAPI headers that the library is built with:

* Linux 7.0 or later: complete support.

* Linux 6.17 to 6.19: no OA unit GT IDs (the library derives the GT IDs
  itself, as it does with kernels that do not report them) and no MERT OA
  units.

* Older than Linux 6.17 (including no `<drm/xe_drm.h>`, which is older than
  Linux 6.8): no xe support, the library only supports the i915 kernel mode
  driver and reports xe devices as unsupported.


## Configuration variables

This package provides no configuration variables.

\
package-description-type: text/markdown;variant=GFM
url: https://github.com/intel/metrics-discovery
package-url: https://github.com/build2-packaging/intel-metrics-discovery
package-email: packaging@build2.org; Mailing list.
depends: * build2 >= 0.18.0
depends: * bpkg >= 0.18.0
depends: libmetrics-discovery-headers == 1.16.197
depends: libdrm-uapi-helper ^2.0.0-b.27
build-include: linux**
build-exclude: **; Only supported on Linux.
bootstrap-build:
\
project = libmetrics-discovery

using version
using config
using test
using install
using dist

\
root-build:
\
# Suppress warnings coming from external libraries (the drm-uapi-helper and
# MDAPI headers).
#
cc.internal.scope = current

cxx.std = latest

using cxx

hxx{*}: extension = h
cxx{*}: extension = cpp

using c

h{*}: extension = h
c{*}: extension = c

# The test target for cross-testing (running tests under Wine, etc).
#
test.target = $cxx.target

\
location: intel-metrics-discovery/libmetrics-discovery-1.16.197.tar.gz
sha256sum: ade142aab354a6d4693358894fa3d95cc123d645044f5c82a6e77a6e4f4c4986
:
name: libmetrics-discovery-headers
version: 1.16.197
type: lib,binless
language: c++
project: intel-metrics-discovery
summary: Intel Metrics Discovery API (MDAPI) C++ header
license: MIT; MIT License.
topics: intel gpu, performance counters, profiling, mdapi
description:
\
# Intel(R) Metrics Discovery Application Programming Interface

## Introduction

This software is a user mode library that provides access to GPU performance\
 data.

The library has OS abstraction layer that allows for interoperability in\
 different environments.

## License

Intel(R) Metrics Discovery Application Programming Interface is distributed\
 under the MIT License.

You may obtain a copy of the License at:
https://opensource.org/licenses/MIT

## Supported Platforms

- Intel(R) Processors with Xe3P graphics devices (formerly Crescent Island,\
 Nova Lake-P)
- Intel(R) Processors with Xe3 graphics devices (formerly Panther Lake,\
 Wildcat Lake, Nova Lake)
- Intel(R) Processors with Xe2 graphics devices (formerly Lunar Lake)
- Intel(R) Processors with Arc graphics devices (formerly Alchemist,\
 Battlemage)
- Intel(R) Processors with Xe graphics devices (formerly Tiger Lake, Rocket\
 Lake, DG1, Alder Lake, Ponte Vecchio, Meteor Lake, Arrow Lake)

Since version 1.14.181, support for Gen7.5, Gen8, Gen9 and Gen11 platforms\
 has been discontinued. For these platforms, use version 1.14.180 or earlier.

## Supported Operating Systems

Intel(R) Metrics Discovery Application Programming Interface is supported on\
 Linux family operating systems with minimum kernel version 5.7.
Event based measurements require minimum Mesa version 18.2.

### Detailed minimum version requirements

| Platform | Code Name | Minimum Linux Kernel Version | Minimum Mesa Version |
|--|--|--|--|
| Xe3P-LPG | Nova Lake-P | 7.1 | 26.1 |
| Xe3P-XPC | Crescent Island | 6.19 | ---- |
| Xe3-LPG | Nova Lake | 6.19 | 26.0 |
| Xe3-LPG | Wildcat Lake | 6.18 | 25.3 |
| Xe3-LPG | Panther Lake | 6.15 | 25.1 |
| Xe2-HPG | Battlemage | 6.11 | 24.2 |
| Xe2-LPG | Lunar Lake | 6.11 | 24.2 |
| Xe-LPG | Arrow Lake-H | 6.9 | 24.1 |
| Xe-LPG | Arrow Lake-S | 6.7 | 24.1 |
| Xe-LPG | Arrow Lake-U | 6.9 | 24.1 |
| Xe-LPG | Meteor Lake | 6.7 | 23.1 |
| Xe-HPG | Alchemist | 6.2 | 22.2 |
| Xe-HPC | Ponte Vecchio | 5.20 | 18.2 |
| Xe-LP | Alder Lake-S | 5.16 | 22.0 |
| Xe-LP | Alder Lake-N | 5.18 | 22.0 |
| Xe-LP | Alder Lake-P | 5.17 | 22.0 |
| Xe-LP | DG1 | 5.16 | 22.1.5 |
| Xe-LP | Rocket Lake | 5.13 | 20.2 |
| Xe-LP | Tiger Lake | 5.7 | 21.0 |

## Build and Install

1\. Download sources.

2\. Install libdrm-dev.

```shell
sudo apt install libdrm-dev
```
or
```shell
sudo dnf install libdrm-devel
```

3\. Run CMake generation:

```shell
mkdir build && cd build
cmake ..
```

4\. Build:

```shell
make -j$(nproc)
```

5\. Built library will be here (for 64-bit Linux):

```shell
(project_root)/dump/linux64/release/metrics_discovery/libigdmd.so
```

6\. Install:

If using native package manager (yum, dnf, etc..) skip to step 7

```shell
sudo make install
```

7\. Packaging:

```shell
make package
```

After the process completes, there should be a set of files such as
```code
intel-metrics-discovery-[VERSION].x86_64.rpm
intel-metrics-discovery-devel-[VERSION].x86_64.rpm
intel-metrics-discovery-pkgconfig-[VERSION].x86_64.rpm
```

*Note: To clear CMake params remove CMakeCache.txt, then regenerate.*

## Support

Please file a GitHub issue to report an issue or ask questions.

## How to Contribute

Contributions to the Metrics-Discovery are welcomed and encouraged.
Please see [CONTRIBUTING](CONTRIBUTING.md) for details how to
contribute to the project.

##
___(*) Other names and brands my be claimed as property of others.___

\
description-type: text/markdown;variant=GFM
package-description:
\
# libmetrics-discovery-headers - Intel Metrics Discovery API (MDAPI) C++\
 header

This is a `build2` package for the
[`metrics-discovery`](https://github.com/intel/metrics-discovery) C++
library. It provides the header of the Intel Metrics Discovery Application
Programming Interface (MDAPI), a user mode library that provides access to
GPU performance data.


## Usage

To start using `libmetrics-discovery-headers` in your project, add the\
 following `depends`
value to your `manifest`, adjusting the version constraint as appropriate:

```
depends: libmetrics-discovery-headers ^1.16.197
```

Then import the library in your `buildfile`:

```
import libs = libmetrics-discovery-headers%lib{metrics-discovery-headers}
```


## Importable targets

This package provides the following importable targets:

```
lib{metrics-discovery-headers}
```

The MDAPI header, included without a subdirectory prefix, as installed by
upstream (`#include <metrics_discovery_api.h>`). The header requires C++ (it
declares the API in the `MetricsDiscovery` namespace).

This package is headers only and supports all platforms. Applications load
the MDAPI library at runtime (`libigdmd.so.1` on Linux, `igdmd64.dll` on
64-bit Windows, where it comes with the Intel graphics driver), resolve its
factory functions by name (`OpenAdapterGroup()`, etc), and use the
interfaces that these functions return. The header declares the types of
these functions (`OpenAdapterGroup_fn`, etc). On Linux the library itself is
provided by the `libmetrics-discovery` package.


## Configuration variables

This package provides no configuration variables.

\
package-description-type: text/markdown;variant=GFM
url: https://github.com/intel/metrics-discovery
package-url: https://github.com/build2-packaging/intel-metrics-discovery
package-email: packaging@build2.org; Mailing list.
depends: * build2 >= 0.18.0
depends: * bpkg >= 0.18.0
bootstrap-build:
\
project = libmetrics-discovery-headers

using version
using config
using test
using install
using dist

\
root-build:
\
# Uncomment to suppress warnings coming from external libraries.
#
#cxx.internal.scope = current

cxx.std = latest

using cxx

hxx{*}: extension = h
cxx{*}: extension = cpp

# The test target for cross-testing (running tests under Wine, etc).
#
test.target = $cxx.target

\
location: intel-metrics-discovery/libmetrics-discovery-headers-1.16.197.tar.gz
sha256sum: 943a983f49a051edfdf922d1ead83f042f955834a85f39c4d982118db9b10d7c
:
name: libtinyobjloader
version: 2.0.0-b.10+1
upstream-version: 2.0.0-rc.10 ; Version from 'upstream/CMakeLists.txt'
type: lib,binless
language: c++
project: tinyobjloader
summary: Tiny but powerful single file wavefront obj loader written in C++03
license: MIT
description:
\
# tinyobjloader

[![Build Status](https://travis-ci.org/tinyobjloader/tinyobjloader.svg?branch\
=master)](https://travis-ci.org/tinyobjloader/tinyobjloader)

[![AZ Build Status](https://dev.azure.com/tinyobjloader/tinyobjloader/_apis/b\
uild/status/tinyobjloader.tinyobjloader?branchName=master)](https://dev.azure\
.com/tinyobjloader/tinyobjloader/_build/latest?definitionId=1&branchName=mast\
er)

[![AppVeyor Build status](https://ci.appveyor.com/api/projects/status/m6wfkvk\
et7gth8wn/branch/master?svg=true)](https://ci.appveyor.com/project/syoyo/tiny\
objloader-6e4qf/branch/master)

[![Coverage Status](https://coveralls.io/repos/github/syoyo/tinyobjloader/bad\
ge.svg?branch=master)](https://coveralls.io/github/syoyo/tinyobjloader?branch\
=master)

[![AUR version](https://img.shields.io/aur/version/tinyobjloader?logo=arch-li\
nux)](https://aur.archlinux.org/packages/tinyobjloader)

Tiny but powerful single file wavefront obj loader written in C++03. No\
 dependency except for C++ STL. It can parse over 10M polygons with moderate\
 memory and time.

`tinyobjloader` is good for embedding .obj loader to your (global\
 illumination) renderer ;-)

If you are looking for C89 version, please see https://github.com/syoyo/tinyo\
bjloader-c .

Version notice
--------------

We recommend to use `master`(`main`) branch. Its v2.0 release candidate. Most\
 features are now nearly robust and stable(Remaining task for release v2.0 is\
 polishing C++ and Python API, and fix built-in triangulation code).

We have released new version v1.0.0 on 20 Aug, 2016.
Old version is available as `v0.9.x` branch https://github.com/syoyo/tinyobjl\
oader/tree/v0.9.x

## What's new

* 29 Jul, 2021 : Added Mapbox's earcut for robust triangulation. Also fixes\
 triangulation bug(still there is some issue in built-in triangulation\
 algorithm: https://github.com/tinyobjloader/tinyobjloader/issues/319).
* 19 Feb, 2020 : The repository has been moved to https://github.com/tinyobjl\
oader/tinyobjloader !
* 18 May, 2019 : Python binding!(See `python` folder. Also see\
 https://pypi.org/project/tinyobjloader/)
* 14 Apr, 2019 : Bump version v2.0.0 rc0. New C++ API and python\
 bindings!(1.x API still exists for backward compatibility)
* 20 Aug, 2016 : Bump version v1.0.0. New data structure and API!

## Requirements

* C++03 compiler

### Old version

Previous old version is available in `v0.9.x` branch.

## Example

![Rungholt](images/rungholt.jpg)

tinyobjloader can successfully load 6M triangles Rungholt scene.
http://casual-effects.com/data/index.html

![](images/sanmugel.png)

* [examples/viewer/](examples/viewer) OpenGL .obj viewer
* [examples/callback_api/](examples/callback_api/) Callback API example
* [examples/voxelize/](examples/voxelize/) Voxelizer example

## Use case

TinyObjLoader is successfully used in ...

### New version(v1.0.x)

* Double precision support through `TINYOBJLOADER_USE_DOUBLE` thanks to noma
* Loading models in Vulkan Tutorial https://vulkan-tutorial.com/Loading_models
* .obj viewer with Metal https://github.com/middlefeng/NuoModelViewer/tree/ma\
ster
* Vulkan Cookbook https://github.com/PacktPublishing/Vulkan-Cookbook
* cudabox: CUDA Solid Voxelizer Engine https://github.com/gaspardzoss/cudavox
* Drake: A planning, control, and analysis toolbox for nonlinear dynamical\
 systems https://github.com/RobotLocomotion/drake
* VFPR - a Vulkan Forward Plus Renderer : https://github.com/WindyDarian/Vulk\
an-Forward-Plus-Renderer
* glslViewer: https://github.com/patriciogonzalezvivo/glslViewer
* Lighthouse2: https://github.com/jbikker/lighthouse2
* rayrender(an open source R package for raytracing scenes in created in R):\
 https://github.com/tylermorganwall/rayrender
* liblava - A modern C++ and easy-to-use framework for the Vulkan API. [MIT]:\
 https://github.com/liblava/liblava
* rtxON - Simple Vulkan raytracing tutorials  https://github.com/iOrange/rtxON
* metal-ray-tracer - Writing ray-tracer using Metal Performance Shaders\
 https://github.com/sergeyreznik/metal-ray-tracer https://sergeyreznik.github\
.io/metal-ray-tracer/index.html
* Your project here! (Letting us know via github issue is welcome!)

### Old version(v0.9.x)

* bullet3 https://github.com/erwincoumans/bullet3
* pbrt-v2 https://github.com/mmp/pbrt-v2
* OpenGL game engine development http://swarminglogic.com/jotting/2013_10_gam\
edev01
* mallie https://lighttransport.github.io/mallie
* IBLBaker (Image Based Lighting Baker). http://www.derkreature.com/iblbaker/
* Stanford CS148 http://web.stanford.edu/class/cs148/assignments/assignment3.\
pdf
* Awesome Bump http://awesomebump.besaba.com/about/
* sdlgl3-wavefront OpenGL .obj viewer https://github.com/chrisliebert/sdlgl3-\
wavefront
* pbrt-v3 https://github.com/mmp/pbrt-v3
* cocos2d-x https://github.com/cocos2d/cocos2d-x/
* Android Vulkan demo https://github.com/SaschaWillems/Vulkan
* voxelizer https://github.com/karimnaaji/voxelizer
* Probulator https://github.com/kayru/Probulator
* OptiX Prime baking https://github.com/nvpro-samples/optix_prime_baking
* FireRays SDK https://github.com/GPUOpen-LibrariesAndSDKs/FireRays_SDK
* parg, tiny C library of various graphics utilities and GL demos\
 https://github.com/prideout/parg
* Opengl unit of ChronoEngine https://github.com/projectchrono/chrono-opengl
* Point Based Global Illumination on modern GPU https://pbgi.wordpress.com/co\
de-source/
* Fast OBJ file importing and parsing in CUDA http://researchonline.jcu.edu.a\
u/42515/1/2015.CVM.OBJCUDA.pdf
* Sorted Shading for Uni-Directional Pathtracing by Joshua Bainbridge\
 https://nccastaff.bournemouth.ac.uk/jmacey/MastersProjects/MSc15/02Josh/josh\
ua_bainbridge_thesis.pdf
* GeeXLab http://www.geeks3d.com/hacklab/20160531/geexlab-0-12-0-0-released-f\
or-windows/


## Features

* Group(parse multiple group name)
* Vertex
  * Vertex color(as an extension: https://blender.stackexchange.com/questions\
/31997/how-can-i-get-vertex-painted-obj-files-to-import-into-blender)
* Texcoord
* Normal
* Crease tag('t'). This is OpenSubdiv specific(not in wavefront .obj\
 specification)
* Callback API for custom loading.
* Double precision support(for HPC application).
* Smoothing group
* Python binding : See `python` folder.
  * Precompiled binary(manylinux1-x86_64 only) is hosted at pypi\
 https://pypi.org/project/tinyobjloader/)

### Primitives

* [x] face(`f`)
* [x] lines(`l`)
* [ ] points(`p`)
* [ ] curve
* [ ] 2D curve
* [ ] surface.
* [ ] Free form curve/surfaces

### Material

* PBR material extension for .MTL. Its proposed here: http://exocortex.com/bl\
og/extending_wavefront_mtl_to_support_pbr
* Texture options
* Unknown material attributes are returned as key-value(value is string) map.

## TODO

* [ ] Fix obj_sticker example.
* [ ] More unit test codes.

## License

TinyObjLoader is licensed under MIT license.

### Third party licenses.

* pybind11 : BSD-style license.
* mapbox earcut.hpp: ISC License.

## Usage

### Installation

One option is to simply copy the header file into your project and to make\
 sure that `TINYOBJLOADER_IMPLEMENTATION` is defined exactly once.

### Building tinyobjloader - Using vcpkg(not recommended though)

Although it is not a recommended way, you can download and install\
 tinyobjloader using the [vcpkg](https://github.com/Microsoft/vcpkg)\
 dependency manager:

    git clone https://github.com/Microsoft/vcpkg.git
    cd vcpkg
    ./bootstrap-vcpkg.sh
    ./vcpkg integrate install
    ./vcpkg install tinyobjloader

The tinyobjloader port in vcpkg is kept up to date by Microsoft team members\
 and community contributors. If the version is out of date, please [create an\
 issue or pull request](https://github.com/Microsoft/vcpkg) on the vcpkg\
 repository.

### Data format

`attrib_t` contains single and linear array of vertex data(position, normal\
 and texcoord).

```
attrib_t::vertices => 3 floats per vertex

       v[0]        v[1]        v[2]        v[3]               v[n-1]
  +-----------+-----------+-----------+-----------+      +-----------+
  | x | y | z | x | y | z | x | y | z | x | y | z | .... | x | y | z |
  +-----------+-----------+-----------+-----------+      +-----------+

attrib_t::normals => 3 floats per vertex

       n[0]        n[1]        n[2]        n[3]               n[n-1]
  +-----------+-----------+-----------+-----------+      +-----------+
  | x | y | z | x | y | z | x | y | z | x | y | z | .... | x | y | z |
  +-----------+-----------+-----------+-----------+      +-----------+

attrib_t::texcoords => 2 floats per vertex

       t[0]        t[1]        t[2]        t[3]               t[n-1]
  +-----------+-----------+-----------+-----------+      +-----------+
  |  u  |  v  |  u  |  v  |  u  |  v  |  u  |  v  | .... |  u  |  v  |
  +-----------+-----------+-----------+-----------+      +-----------+

attrib_t::colors => 3 floats per vertex(vertex color. optional)

       c[0]        c[1]        c[2]        c[3]               c[n-1]
  +-----------+-----------+-----------+-----------+      +-----------+
  | x | y | z | x | y | z | x | y | z | x | y | z | .... | x | y | z |
  +-----------+-----------+-----------+-----------+      +-----------+

```

Each `shape_t::mesh_t` does not contain vertex data but contains array index\
 to `attrib_t`.
See `loader_example.cc` for more details.


```

mesh_t::indices => array of vertex indices.

  +----+----+----+----+----+----+----+----+----+----+     +--------+
  | i0 | i1 | i2 | i3 | i4 | i5 | i6 | i7 | i8 | i9 | ... | i(n-1) |
  +----+----+----+----+----+----+----+----+----+----+     +--------+

Each index has an array index to attrib_t::vertices, attrib_t::normals and\
 attrib_t::texcoords.

mesh_t::num_face_vertices => array of the number of vertices per face(e.g. 3\
 = triangle, 4 = quad , 5 or more = N-gons).


  +---+---+---+        +---+
  | 3 | 4 | 3 | ...... | 3 |
  +---+---+---+        +---+
    |   |   |            |
    |   |   |            +-----------------------------------------+
    |   |   |                                                      |
    |   |   +------------------------------+                       |
    |   |                                  |                       |
    |   +------------------+               |                       |
    |                      |               |                       |
    |/                     |/              |/                      |/

 mesh_t::indices

  |    face[0]   |       face[1]     |    face[2]   |     |      face[n-1]   \
        |
  +----+----+----+----+----+----+----+----+----+----+     +--------+--------+\
--------+
  | i0 | i1 | i2 | i3 | i4 | i5 | i6 | i7 | i8 | i9 | ... | i(n-3) | i(n-2) |\
 i(n-1) |
  +----+----+----+----+----+----+----+----+----+----+     +--------+--------+\
--------+

```

Note that when `triangulate` flag is true in `tinyobj::LoadObj()` argument,\
 `num_face_vertices` are all filled with 3(triangle).

### float data type

TinyObjLoader now use `real_t` for floating point data type.
Default is `float(32bit)`.
You can enable `double(64bit)` precision by using `TINYOBJLOADER_USE_DOUBLE`\
 define.

### Robust triangulation

When you enable `triangulation`(default is enabled),
TinyObjLoader triangulate polygons(faces with 4 or more vertices).

Built-in trinagulation code may not work well in some polygon shape.

You can define `TINYOBJLOADER_USE_MAPBOX_EARCUT` for robust triangulation\
 using `mapbox/earcut.hpp`.
This requires C++11 compiler though. And you need to copy `mapbox/earcut.hpp`\
 to your project.
If you have your own `mapbox/earcut.hpp` file incuded in your project, you\
 can define `TINYOBJLOADER_DONOT_INCLUDE_MAPBOX_EARCUT` so that\
 `mapbox/earcut.hpp` is not included inside of `tiny_obj_loader.h`.

#### Example code (Deprecated API)

```c++
#define TINYOBJLOADER_IMPLEMENTATION // define this in only *one* .cc
// Optional. define TINYOBJLOADER_USE_MAPBOX_EARCUT gives robust\
 trinagulation. Requires C++11
//#define TINYOBJLOADER_USE_MAPBOX_EARCUT
#include "tiny_obj_loader.h"

std::string inputfile = "cornell_box.obj";
tinyobj::attrib_t attrib;
std::vector<tinyobj::shape_t> shapes;
std::vector<tinyobj::material_t> materials;

std::string warn;
std::string err;

bool ret = tinyobj::LoadObj(&attrib, &shapes, &materials, &warn, &err,\
 inputfile.c_str());

if (!warn.empty()) {
  std::cout << warn << std::endl;
}

if (!err.empty()) {
  std::cerr << err << std::endl;
}

if (!ret) {
  exit(1);
}

// Loop over shapes
for (size_t s = 0; s < shapes.size(); s++) {
  // Loop over faces(polygon)
  size_t index_offset = 0;
  for (size_t f = 0; f < shapes[s].mesh.num_face_vertices.size(); f++) {
    size_t fv = size_t(shapes[s].mesh.num_face_vertices[f]);

    // Loop over vertices in the face.
    for (size_t v = 0; v < fv; v++) {
      // access to vertex
      tinyobj::index_t idx = shapes[s].mesh.indices[index_offset + v];

      tinyobj::real_t vx = attrib.vertices[3*size_t(idx.vertex_index)+0];
      tinyobj::real_t vy = attrib.vertices[3*size_t(idx.vertex_index)+1];
      tinyobj::real_t vz = attrib.vertices[3*size_t(idx.vertex_index)+2];

      // Check if `normal_index` is zero or positive. negative = no normal\
 data
      if (idx.normal_index >= 0) {
        tinyobj::real_t nx = attrib.normals[3*size_t(idx.normal_index)+0];
        tinyobj::real_t ny = attrib.normals[3*size_t(idx.normal_index)+1];
        tinyobj::real_t nz = attrib.normals[3*size_t(idx.normal_index)+2];
      }

      // Check if `texcoord_index` is zero or positive. negative = no\
 texcoord data
      if (idx.texcoord_index >= 0) {
        tinyobj::real_t tx = attrib.texcoords[2*size_t(idx.texcoord_index)+0];
        tinyobj::real_t ty = attrib.texcoords[2*size_t(idx.texcoord_index)+1];
      }
      // Optional: vertex colors
      // tinyobj::real_t red   = attrib.colors[3*size_t(idx.vertex_index)+0];
      // tinyobj::real_t green = attrib.colors[3*size_t(idx.vertex_index)+1];
      // tinyobj::real_t blue  = attrib.colors[3*size_t(idx.vertex_index)+2];
    }
    index_offset += fv;

    // per-face material
    shapes[s].mesh.material_ids[f];
  }
}

```

#### Example code (New Object Oriented API)

```c++
#define TINYOBJLOADER_IMPLEMENTATION // define this in only *one* .cc
// Optional. define TINYOBJLOADER_USE_MAPBOX_EARCUT gives robust\
 trinagulation. Requires C++11
//#define TINYOBJLOADER_USE_MAPBOX_EARCUT
#include "tiny_obj_loader.h"


std::string inputfile = "cornell_box.obj";
tinyobj::ObjReaderConfig reader_config;
reader_config.mtl_search_path = "./"; // Path to material files

tinyobj::ObjReader reader;

if (!reader.ParseFromFile(inputfile, reader_config)) {
  if (!reader.Error().empty()) {
      std::cerr << "TinyObjReader: " << reader.Error();
  }
  exit(1);
}

if (!reader.Warning().empty()) {
  std::cout << "TinyObjReader: " << reader.Warning();
}

auto& attrib = reader.GetAttrib();
auto& shapes = reader.GetShapes();
auto& materials = reader.GetMaterials();

// Loop over shapes
for (size_t s = 0; s < shapes.size(); s++) {
  // Loop over faces(polygon)
  size_t index_offset = 0;
  for (size_t f = 0; f < shapes[s].mesh.num_face_vertices.size(); f++) {
    size_t fv = size_t(shapes[s].mesh.num_face_vertices[f]);

    // Loop over vertices in the face.
    for (size_t v = 0; v < fv; v++) {
      // access to vertex
      tinyobj::index_t idx = shapes[s].mesh.indices[index_offset + v];
      tinyobj::real_t vx = attrib.vertices[3*size_t(idx.vertex_index)+0];
      tinyobj::real_t vy = attrib.vertices[3*size_t(idx.vertex_index)+1];
      tinyobj::real_t vz = attrib.vertices[3*size_t(idx.vertex_index)+2];

      // Check if `normal_index` is zero or positive. negative = no normal\
 data
      if (idx.normal_index >= 0) {
        tinyobj::real_t nx = attrib.normals[3*size_t(idx.normal_index)+0];
        tinyobj::real_t ny = attrib.normals[3*size_t(idx.normal_index)+1];
        tinyobj::real_t nz = attrib.normals[3*size_t(idx.normal_index)+2];
      }

      // Check if `texcoord_index` is zero or positive. negative = no\
 texcoord data
      if (idx.texcoord_index >= 0) {
        tinyobj::real_t tx = attrib.texcoords[2*size_t(idx.texcoord_index)+0];
        tinyobj::real_t ty = attrib.texcoords[2*size_t(idx.texcoord_index)+1];
      }

      // Optional: vertex colors
      // tinyobj::real_t red   = attrib.colors[3*size_t(idx.vertex_index)+0];
      // tinyobj::real_t green = attrib.colors[3*size_t(idx.vertex_index)+1];
      // tinyobj::real_t blue  = attrib.colors[3*size_t(idx.vertex_index)+2];
    }
    index_offset += fv;

    // per-face material
    shapes[s].mesh.material_ids[f];
  }
}

```



## Optimized loader

Optimized multi-threaded .obj loader is available at `experimental/`\
 directory.
If you want absolute performance to load .obj data, this optimized loader\
 will fit your purpose.
Note that the optimized loader uses C++11 thread and it does less error\
 checks but may work most .obj data.

Here is some benchmark result. Time are measured on MacBook 12(Early 2016,\
 Core m5 1.2GHz).

* Rungholt scene(6M triangles)
  * old version(v0.9.x): 15500 msecs.
  * baseline(v1.0.x): 6800 msecs(2.3x faster than old version)
  * optimised: 1500 msecs(10x faster than old version, 4.5x faster than\
 baseline)

## Python binding

### CI + PyPI upload

cibuildwheels + twine upload for each git tagging event is handled in Azure\
 Pipeline.

#### How to bump version(For developer)

* Bump version in CMakeLists.txt
* Update version in `python/setup.py`
* Commit and push `master`. Confirm C.I. build is OK.
* Create tag starting with `v`(e.g. `v2.1.0`)
* `git push --tags`
  * cibuildwheels + pypi upload(through twine) will be automatically\
 triggered in Azure Pipeline.

## Tests

Unit tests are provided in `tests` directory. See `tests/README.md` for\
 details.

\
description-type: text/markdown;variant=GFM
package-description:
\
<h1 align="center">
    build2 Package for tinyobjloader
</h1>

<p align="center">
    This project builds and defines the build2 package for <a\
 href="https://github.com/tinyobjloader/tinyobjloader">tinyobjloader</a>.
    Tiny but powerful single file wavefront obj loader written in C++03.
    No dependency except for C++ STL.
    It can parse over 10M polygons with moderate memory and time.
</p>

<p align="center">
    <a href="https://github.com/tinyobjloader/tinyobjloader">
        <img src="https://img.shields.io/website/https/github.com/tinyobjload\
er/tinyobjloader.svg?down_message=offline&label=Official&style=for-the-badge&\
up_color=blue&up_message=online">
    </a>
    <a href="https://github.com/build2-packaging/tinyobjloader">
        <img src="https://img.shields.io/website/https/github.com/build2-pack\
aging/tinyobjloader.svg?down_message=offline&label=build2&style=for-the-badge\
&up_color=blue&up_message=online">
    </a>
    <a href="https://cppget.org/libtinyobjloader">
        <img src="https://img.shields.io/website/https/cppget.org/libtinyobjl\
oader.svg?down_message=offline&label=cppget.org&style=for-the-badge&up_color=\
blue&up_message=online">
    </a>
    <a href="https://queue.cppget.org/libtinyobjloader">
        <img src="https://img.shields.io/website/https/queue.cppget.org/libti\
nyobjloader.svg?down_message=empty&down_color=blue&label=queue.cppget.org&sty\
le=for-the-badge&up_color=orange&up_message=running">
    </a>
</p>

## Usage
Make sure to add the stable section of the `cppget.org` repository to your\
 project's `repositories.manifest` to be able to fetch this package.

    :
    role: prerequisite
    location: https://pkg.cppget.org/1/beta
    # trust: ...

If the beta section of `cppget.org` is not an option then add this Git\
 repository itself instead as a prerequisite.

    :
    role: prerequisite
    location: https://github.com/build2-packaging/tinyobjloader.git

Add the respective dependency in your project's `manifest` file to make the\
 package available for import.

    depends: libtinyobjloader ^ 2.0.0-

The library can be imported by the following declaration in a `buildfile`.

    import tinyobjloader = libtinyobjloader%lib{tinyobjloader}

## Configuration
There are no configuration options available.

## Issues and Notes
- The precompiled library provided by the original build system is not\
 accessible through this package. While a precompiled version would naively\
 enhance the ease of use for the package consumers, the following reasons\
 speak against it. First, the implementation of the header-only library is\
 configurable and, as a result, we would either need to offer a precompiled\
 library for each possible configuration or add as many configuration\
 variables to the build system. The latter approach drastically complicates\
 the reasoning about `buildfile`s and also the package's consumption in\
 extern `manifest` files. Furthermore, it would only allow for one single\
 implementation configuration for each package that consumes the library. The\
 former approach doesn't suffer from these properties and, as a matter of\
 fact, is totally preferable. However, the process of defining library\
 targets for each possible configuration is neither scalable (already trying\
 to find an intuitive naming scheme may be impossible) nor testable. Second,\
 `tinyobjloader` is only tested and documented as single-header-only library\
 and users will probably rely on the header-only variant anyway.
- For now, examples are not compiled and run by the package's build system as\
 they depend on GLFW and, as a consequence, would restrict our capabilities\
 for testing certain target configurations on the CI server. This might be\
 resolvable as soon as the restriction of test packages does not influence\
 the restriction of their library package when running tests on the CI server.
- Currently, robust triangulation via Mapbox's Earcut is not supported. We\
 need to find a way to handle this kind of in-place dependency that still\
 might be resolved by the system or the user itself.
- The optimized loader is not supported by this package as it is still ranked\
 experimental and no further tests are provided for it. Also, for Unix-based\
 systems, it depends on `pthread`. Probably the package consumer would need\
 to add this dependency by him-/herself.
- Test fuzzers are not compiled and run.
- The library does not seem to support Emscripten.

## Contributing
Thanks in advance for your help and contribution to keep this package\
 up-to-date.
For now, please, file an issue on [GitHub](https://github.com/build2-packagin\
g/tinyobjloader/issues) for everything that is not described below.

### Recommend Updating Version
Please, file an issue on [GitHub](https://github.com/build2-packaging/tinyobj\
loader/issues) with the new recommended version.

### Update Version by Pull Request
1. Fork the repository on [GitHub](https://github.com/build2-packaging/tinyob\
jloader) and clone it to your local machine.
2. Run `git submodule init` and `git submodule update` to get the current\
 upstream directory.
3. Inside the `upstream` directory, checkout the new library version `X.Y.Z`\
 by calling `git checkout vX.Y.Z` that you want to be packaged. Here, it is\
 probably not a version but the newest commit from the master branch instead.
4. If needed, change source files, `buildfiles`, and symbolic links\
 accordingly to create a working build2 package. Make sure not to directly\
 depend on the upstream directory inside the build system but use symbolic\
 links instead.
5. Update library version in `manifest` file if it has changed or add package\
 update by using `+n` for the `n`-th update.
6. Make an appropriate commit message by using imperative mood and a capital\
 letter at the start and push the new commit to the `master` branch.
7. Run `bdep ci` and test for errors.
8. If everything works fine, make a pull request on GitHub and write down the\
 `bdep ci` link to your CI tests.
9. After a successful pull request, we will run the appropriate commands to\
 publish a new package version.

### Update Version Directly if You Have Permissions
1. Inside the `upstream` directory, checkout the new library version `X.Y.Z`\
 by calling `git checkout vX.Y.Z` that you want to be packaged. Here, it is\
 probably not a version but the newest commit from the master branch instead.
2. If needed, change source files, `buildfiles`, and symbolic links\
 accordingly to create a working build2 package. Make sure not to directly\
 depend on the upstream directory inside the build system but use symbolic\
 links instead.
3. Update library version in `manifest` file if it has changed or add package\
 update by using `+n` for the `n`-th update.
4. Make an appropriate commit message by using imperative mood and a capital\
 letter at the start and push the new commit to the `master` branch.
5. Run `bdep ci` and test for errors and warnings.
6. When successful, run `bdep release --tag --push` to push new tag version\
 to repository.
7. Run `bdep publish` to publish the package to [cppget.org](https://cppget.o\
rg).

\
package-description-type: text/markdown;variant=GFM
url: https://github.com/tinyobjloader/tinyobjloader
doc-url: https://github.com/tinyobjloader/tinyobjloader
src-url: https://github.com/tinyobjloader/tinyobjloader
package-url: https://github.com/build2-packaging/tinyobjloader/
email: syoyo@lighttransport.com
package-email: packaging@build2.org
depends: * build2 >= 0.16.0
depends: * bpkg >= 0.16.0
bootstrap-build:
\
project = libtinyobjloader

using version
using config
using test
using install
using dist

\
root-build:
\
cxx.std = latest

using cxx

hxx{*}: extension = h
cxx{*}: extension = cc

hxx{*}: cxx.importable = false

test.target = $cxx.target

\
location: tinyobjloader/libtinyobjloader-2.0.0-b.10+1.tar.gz
sha256sum: e0e3eb71446237ce35e8f66491998eb1610c14b93214ca554887d81818db818c
