'\" t .\" Title: bitfieldInsert .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 .\" Date: 05/21/2015 .\" Manual: [FIXME: manual] .\" Source: [FIXME: source] .\" Language: English .\" .TH "BITFIELDINSERT" "3G" "05/21/2015" "[FIXME: source]" "[FIXME: manual]" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" bitfieldInsert \- insert a range of bits into an integer .SH "DECLARATION" .HP \w'genIType\ bitfieldInsert('u .BI "genIType bitfieldInsert(genIType\ " "base" ", genIType\ " "insert" ", int\ " "offset" ", int\ " "bits" ");" .HP \w'genUType\ bitfieldInsert('u .BI "genUType bitfieldInsert(genUType\ " "base" ", genUType\ " "insert" ", int\ " "offset" ", int\ " "bits" ");" .SH "PARAMETERS" .PP \fIbase\fR .RS 4 Specifies the integer into which to insert \fIinsert\fR\&. .RE .PP \fIinsert\fR .RS 4 Specifies the the value of the bits to insert\&. .RE .PP \fIoffset\fR .RS 4 Specifies the index of the first bit to insert\&. .RE .PP \fIbits\fR .RS 4 Specifies the number of bits to insert\&. .RE .SH "DESCRIPTION" .PP \fBbitfieldInsert\fR inserts the \fIbits\fR least significant bits of \fIinsert\fR into \fIbase\fR at offset \fIoffset\fR\&. The returned value will have bits [\fIoffset\fR, \fIoffset\fR + \fIbits\fR + 1] taken from [0, \fIbits\fR \- 1] of \fIinsert\fR and all other bits taken directly from the corresponding bits of \fIbase\fR\&. If \fIbits\fR is zero, the result will simply be the original value of \fIbase\fR\&. The result will be undefined if \fIoffset\fR or \fIbits\fR is negative, or if the sum of \fIoffset\fR and \fIbits\fR is greater than the number of bits used to store the operand\&. .SH "VERSION SUPPORT" .TS allbox tab(:); lB cB s s s s s s s s s s s lB cB cB cB cB cB cB cB cB cB cB cB cB. T{ T}:T{ \fBOpenGL Shading Language Version\fR T} T{ \fBFunction Name\fR T}:T{ \fB1\&.10\fR T}:T{ \fB1\&.20\fR T}:T{ \fB1\&.30\fR T}:T{ \fB1\&.40\fR T}:T{ \fB1\&.50\fR T}:T{ \fB3\&.30\fR T}:T{ \fB4\&.00\fR T}:T{ \fB4\&.10\fR T}:T{ \fB4\&.20\fR T}:T{ \fB4\&.30\fR T}:T{ \fB4\&.40\fR T}:T{ \fB4\&.50\fR T} .T& l c c c c c c c c c c c c. T{ bitfieldInsert T}:T{ \- T}:T{ \- T}:T{ \- T}:T{ \- T}:T{ \- T}:T{ \- T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T} .TE .sp .SH "SEE ALSO" .PP \fBbitfieldExtract\fR() .SH "COPYRIGHT" .PP Copyright \(co 2011\-2014 Khronos Group\&. This material may be distributed subject to the terms and conditions set forth in the Open Publication License, v 1\&.0, 8 June 1999\&. \m[blue]\fBhttp://opencontent\&.org/openpub/\fR\m[]\&. .SH "COPYRIGHT" .br Copyright \(co 2011-2014 Khronos Group .br