/usr/include/Nux-4.0/NuxGraphics/RenderingPipe.h is in libnux-4.0-dev 4.0.8+16.04.20160209-0ubuntu2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 | /*
* Copyright 2010 Inalogic® Inc.
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License, as
* published by the Free Software Foundation; either version 2.1 or 3.0
* of the License.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranties of
* MERCHANTABILITY, SATISFACTORY QUALITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the applicable version of the GNU Lesser General Public
* License for more details.
*
* You should have received a copy of both the GNU Lesser General Public
* License along with this program. If not, see <http://www.gnu.org/licenses/>
*
* Authored by: Jay Taoko <jaytaoko@inalogic.com>
*
*/
#ifndef RENDERINGPIPE_H
#define RENDERINGPIPE_H
#include "GLResource.h"
namespace nux
{
//! Graphics wraping modes
/*!
Defines the wraping modes of TexCoordXForm.
The values are matched to OpenGL wraping modes.
@sa TexCoordXForm.
*/
typedef enum
{
TEXWRAP_UNKNOWN = 0,
TEXWRAP_REPEAT,
TEXWRAP_CLAMP,
TEXWRAP_CLAMP_TO_EDGE,
TEXWRAP_CLAMP_TO_BORDER,
TEXWRAP_MIRRORED_REPEAT,
TEXWRAP_MIRROR_CLAMP_EXT,
TEXWRAP_MIRROR_CLAMP_TO_EDGE_EXT,
TEXWRAP_MIRROR_CLAMP_TO_BORDER_EXT,
} TexWrap;
//! Graphics filtering modes
/*!
Defines the filtering modes of TexCoordXForm.
The values are matched to openGL filtering modes.
@sa TexCoordXForm.
*/
typedef enum
{
TEXFILTER_UNKNOWN = 0,
TEXFILTER_LINEAR,
TEXFILTER_NEAREST,
TEXFILTER_NEAREST_MIPMAP_NEAREST,
TEXFILTER_LINEAR_MIPMAP_NEAREST,
TEXFILTER_NEAREST_MIPMAP_LINEAR,
TEXFILTER_LINEAR_MIPMAP_LINEAR,
} TexFilter;
//! Graphics blend modes
/*!
Defines the blending modes.
The values are matched to openGL blending modes.
*/
typedef enum
{
ROPBLEND_UNKNOWN = 0,
ROPBLEND_ZERO,
ROPBLEND_ONE,
ROPBLEND_SRC_COLOR,
ROPBLEND_ONE_MINUS_SRC_COLOR,
ROPBLEND_DST_COLOR,
ROPBLEND_ONE_MINUS_DST_COLOR,
ROPBLEND_SRC_ALPHA,
ROPBLEND_ONE_MINUS_SRC_ALPHA,
ROPBLEND_DST_ALPHA,
ROPBLEND_ONE_MINUS_DST_ALPHA,
ROPBLEND_CONSTANT_COLOR,
ROPBLEND_ONE_MINUS_CONSTANT_COLOR,
ROPBLEND_CONSTANT_ALPHA,
ROPBLEND_ONE_MINUS_CONSTANT_ALPHA,
ROPBLEND_SRC_ALPHA_SATURATE,
} RopBlend;
//! Texture parameter and coordinate computation class.
/*!
Defines the texture coordinate computation, wrapping and filtering modes
*/
class TexCoordXForm
{
public:
//! Texture coordinates computation mode
typedef enum
{
OFFSET_SCALE_COORD, //!< Texture coordinates are scaled and offset.
OFFSET_COORD, //!< Textures coordinates are offset. The scaling factor between the texture size and the quad size is preserved.
NORMALIZED_COORD, //!< Provided normalized texture coordinates in u0, v0, u1, v1
UNNORMALIZED_COORD, //!< Provided un-normalized texture coordinates in u0, v0, u1, v1
FIXED_COORD, //!< Provided fix coordinates in u0, v0, u1, v1
} TexCoordType;
TexCoordXForm();
void SetTexCoordType(TexCoordType tex_coord_type);
void FlipUCoord(bool b);
void FlipVCoord(bool b);
void FlipUVCoord(bool flip_u, bool flip_v);
void SetFilter(TexFilter min_fliter, TexFilter mag_filter);
void SetWrap(TexWrap u_wrap, TexWrap v_wrap);
//! Texture coordinates are computed automatically by following the TexCoordType policy or provided by the user
float u0, v0, u1, v1;
float uscale;
float vscale;
float uoffset;
float voffset;
TexWrap uwrap;
TexWrap vwrap;
TexFilter min_filter;
TexFilter mag_filter;
bool flip_u_coord;
bool flip_v_coord;
TexCoordType m_tex_coord_type;
};
//! Compute texture coordinates and wrapping mode according to TexCoordXForm
/*!
@param quad_width Quad width.
@param quad_height Quad height.
@param tex Device texture.
@param texxform Texture coordinates computation mode.
*/
void QRP_Compute_Texture_Coord(int quad_width, int quad_height, ObjectPtr<IOpenGLBaseTexture> tex, TexCoordXForm &texxform);
}
#endif // RENDERINGPIPE_H
|