2010-03-23 47 views
7

在MacOSX上,「man glRotate」調出glRotate聯機幫助頁。如何獲取Ubuntu上的OpenGL手冊頁,如「man glRotate」?

在ubuntu上,manpages-dev和manpages-posix-dev insatlled,「man glRotate」沒有提供glRotate聯機幫助頁(儘管我可以構建和編譯gl應用程序)。

我錯過了什麼?我如何設置?

+1

希望man頁面將在未來的Ubuntu版本: https://bugs.launchpad.net/ubuntu/+source/mesa/+bug/32042 閱讀評論找到一種方式來手動安裝 – sisis 2010-03-23 02:26:18

+0

「man glRotate」對我來說工作得很好! ...我將它輸入谷歌搜索欄,這是否改變了什麼? – codewarrior 2010-03-26 08:46:22

回答

2

將Khronos OpenGL-Refpages repositorythe PKGBUILD script合併爲the Arch opengl-man-pages package

# $Id$ 
# Maintainer: AndyRTR <[email protected]> 

pkgname=opengl-man-pages 
pkgver=20170404 
_commit=03552a8094ae3017e0b8b2ad44c602f81c03e848 
pkgrel=1 
pkgdesc="OpenGL Man Pages" 
arch=('any') 
url="https://github.com/KhronosGroup/OpenGL-Refpages" 
license=('custom') 
# OpenGL 4.x (current) API and GLSL pages - libxslt' 'docbook-xsl' 
# OpenGL 3.x and older 'w3c-mathml2' 'docbook-mathml' 
makedepends=('libxslt' 'docbook-xsl' 'w3c-mathml2' 'docbook-mathml' 'git') 
source=(${pkgname}::git+https://github.com/KhronosGroup/OpenGL-Refpages#commit=$_commit 
     'LICENSE') 
sha256sums=('SKIP' 
      'a7b2f6669d7ead91dcaf5a03620cdf9d37c54d83fd1899b4ef84683c7e6d4024') 
# gl2.1 = OpenGL 2.1 (including fixed functionality) 
# es3 = OpenGL ES 3.x (will always be the latest ES, currently 3.2) 
# gl4 = OpenGL 4.x (current) API and GLSL pages 
_mandirs=(gl4 es3 gl2.1) 

pkgver() { 
    date +%Y%m%d 
} 

build() { 
    export WD=`pwd` 
    xmlcatalog --create --noout \ 
    --add public "-//W3C//DTD MathML 2.0//EN" "file:///usr/share/xml/w3c/mathml2/mathml2.dtd" \ 
    --add public "-//W3C//DTD MathML//EN" "file:///usr/share/xml/w3c/mathml2/mathml2.dtd" \ 
    --add system "http://www.w3.org/TR/MathML2/dtd/mathml2.dtd" "file:///usr/share/xml/w3c/mathml2/mathml2.dtd" \ 
    mathml2.cat 
    export XML_CATALOG_FILES="$WD/mathml2.cat /etc/xml/catalog" 

    for manpages in ${_mandirs[@]}; do 
    cd "${srcdir}/${pkgname}/${manpages}" 
    for file in gl*.xml; do 
     xsltproc --noout --nonet /usr/share/xml/docbook/xsl-stylesheets-*/manpages/docbook.xsl ${file} 
    done 
    done 
} 

package() { 
    install -d "${pkgdir}/usr/share/man/man3" 
    for manpages in ${_mandirs[@]}; do 
    cd "${srcdir}/${pkgname}/${manpages}" 
    install -m644 *.3G "${pkgdir}/usr/share/man/man3/" 
    done 
    # license 
    install -D -m644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" 
} 

我必須對我的Debian段盒安裝一些額外的軟件包來構建文檔:

sudo apt-get install xsltproc docbook-xsl docbook-xsl-ns w3-dtd-mathml docbook-mathml 
+1

請注意,該軟件包似乎最近在2009年進行了更新。 – Ruslan 2017-05-17 12:00:02

+0

@Ruslan:已更新爲使用OpenGL-Refpages存儲庫。 – genpfault 2017-05-17 15:17:29

+0

我試圖下載軟件包(從Arch軟件包頁面中的_Download From Mirror_鏈接),只能注意到其中很多手冊頁的格式不正確。見例如'man/path/to/glTexStorage2DMultisample.3G.gz'。如果您將它與Ciro答案中引用的Ubuntu'opengl-4-man-doc'進行比較,您會發現Ubuntu的很不錯(檢查Trusty包)。不知道Ubuntu從哪裏獲取它們。 – Ruslan 2017-05-17 16:07:09

4
sudo apt-get install opengl-4-man-doc opencl-1.2-man-doc 

包含了許多人的網頁,例如:

man glDrawArrays 

但不包含man glRotate。我認爲這是因爲不贊成的直接API不包括在內。

apt-file search glRotate顯示一些點擊,但他們似乎不「官方」。

在Ubuntu 16.04上測試。

+0

'gluOrtho2D'也找不到。 – helal 2018-02-13 16:54:22

+0

@helal可能是因爲它不是OpenGL API的一部分,而是GLU庫的一部分。不幸的是,它顯然沒有與freeglut-dev打包在一起,freeglut是Linux的主要實現。讓我知道你是否找到一個包含它的包。 – 2018-02-13 16:58:52

+0

我邀請你。 https://stackoverflow.com/questions/48771076/how-to-make-a-3d-window-for-drawing-3d-points-in-c-using-opengl-functions – helal 2018-02-13 17:01:44