fglgetmaterial.html
来自「计算机图形学~想必是很多人需要的~在此共享一下」· HTML 代码 · 共 163 行
HTML
163 行
<HTML><BODY><PRE> <STRONG>NAME</STRONG> <STRONG>fglGetMaterialfv,</STRONG> <STRONG>fglGetMaterialiv</STRONG> - return material parameters <STRONG>FORTRAN</STRONG> <STRONG>SPECIFICATION</STRONG> SUBROUTINE <STRONG>fglGetMaterialfv</STRONG>( INTEGER*4 <EM>face</EM>, INTEGER*4 <EM>pname</EM>, CHARACTER*8 <EM>params</EM> ) SUBROUTINE <STRONG>fglGetMaterialiv</STRONG>( INTEGER*4 <EM>face</EM>, INTEGER*4 <EM>pname</EM>, CHARACTER*8 <EM>params</EM> ) <STRONG>PARAMETERS</STRONG> <EM>face</EM> Specifies which of the two materials is being queried. <STRONG>GL_FRONT</STRONG> or <STRONG>GL_BACK</STRONG> are accepted, representing the front and back materials, respectively. <EM>pname</EM> Specifies the material parameter to return. <STRONG>GL_AMBIENT</STRONG>, <STRONG>GL_DIFFUSE</STRONG>, <STRONG>GL_SPECULAR</STRONG>, <STRONG>GL_EMISSION</STRONG>, <STRONG>GL_SHININESS</STRONG>, and <STRONG>GL_COLOR_INDEXES</STRONG> are accepted. <EM>params</EM> Returns the requested data. <STRONG>DESCRIPTION</STRONG> <STRONG>fglGetMaterial</STRONG> returns in <EM>params</EM> the value or values of parameter <EM>pname</EM> of material <EM>face</EM>. Six parameters are defined: <STRONG>GL_AMBIENT</STRONG> <EM>params</EM> returns four integer or floating-point values representing the ambient reflectance of the material. Integer values, when requested, are linearly mapped from the internal floating-point representation such that 1.0 maps to the most positive representable integer value, and -1.0 maps to the most negative representable integer value. If the internal value is outside the range [-1, 1], the corresponding integer return value is undefined. The initial value is (0.2, 0.2, 0.2, 1.0) <STRONG>GL_DIFFUSE</STRONG> <EM>params</EM> returns four integer or floating-point values representing the diffuse reflectance of the material. Integer values, when requested, are linearly mapped from the internal floating-point representation such that 1.0 maps to the most positive representable integer value, and -1.0 maps to the most negative representable integer value. If the internal value is outside the range [-1, 1], the corresponding integer return value is undefined. The initial value is (0.8, 0.8, 0.8, 1.0). <STRONG>GL_SPECULAR</STRONG> <EM>params</EM> returns four integer or floating-point values representing the specular reflectance of the material. Integer values, when requested, are linearly mapped from the internal floating-point representation such that 1.0 maps to the most positive representable integer value, and -1.0 maps to the most negative representable integer value. If the internal value is outside the range [-1, 1], the corresponding integer return value is undefined. The initial value is (0, 0, 0, 1). <STRONG>GL_EMISSION</STRONG> <EM>params</EM> returns four integer or floating-point values representing the emitted light intensity of the material. Integer values, when requested, are linearly mapped from the internal floating-point representation such that 1.0 maps to the most positive representable integer value, and -1.0 maps to the most negative representable integer value. If the internal value is outside the range [-1, 1.0], the corresponding integer return value is undefined. The initial value is (0, 0, 0, 1). <STRONG>GL_SHININESS</STRONG> <EM>params</EM> returns one integer or floating-point value representing the specular exponent of the material. Integer values, when requested, are computed by rounding the internal floating-point value to the nearest integer value. The initial value is 0. <STRONG>GL_COLOR_INDEXES</STRONG> <EM>params</EM> returns three integer or floating-point values representing the ambient, diffuse, and specular indices of the material. These indices are used only for color index lighting. (All the other parameters are used only for RGBA lighting.) Integer values, when requested, are computed by rounding the internal floating- point values to the nearest integer values. <STRONG>NOTES</STRONG> If an error is generated, no change is made to the contents of <EM>params</EM>. <STRONG>ERRORS</STRONG> <STRONG>GL_INVALID_ENUM</STRONG> is generated if <EM>face</EM> or <EM>pname</EM> is not an accepted value. <STRONG>GL_INVALID_OPERATION</STRONG> is generated if <STRONG>fglGetMaterial</STRONG> is executed between the execution of <STRONG>fglBegin</STRONG> and the corresponding execution of <STRONG>fglEnd</STRONG>. <STRONG>SEE</STRONG> <STRONG>ALSO</STRONG> <STRONG>fglMaterial</STRONG></PRE></BODY></HTML>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?