CUGL 2.1
Cornell University Game Library
|
Namespaces | |
audio | |
filetool | |
physics2 | |
poly2 | |
scene2 | |
strtool | |
Typedefs | |
typedef std::function< void(const std::string &key, bool success)> | LoaderCallback |
typedef Sint64 | TouchID |
typedef Vec2 | Point2 |
typedef Vec3 | Point3 |
Functions | |
SDL_FORCE_INLINE Uint16 | marshall (Sint16 value) |
SDL_FORCE_INLINE Uint16 | marshall (Uint16 value) |
SDL_FORCE_INLINE Uint32 | marshall (Sint32 value) |
SDL_FORCE_INLINE Uint32 | marshall (Uint32 value) |
SDL_FORCE_INLINE Uint64 | marshall (Sint64 value) |
SDL_FORCE_INLINE Uint64 | marshall (Uint64 value) |
SDL_FORCE_INLINE float | marshall (float value) |
SDL_FORCE_INLINE double | marshall (double value) |
Vec2 & | operator*= (Vec2 &v, const Affine2 &m) |
const Vec2 | operator* (const Vec2 v, const Affine2 &m) |
const Affine2 | operator* (float scalar, const Affine2 &m) |
const Color4f | operator* (float s, const Color4f c) |
const Color4 | operator* (float s, Color4 c) |
Vec2 & | operator*= (Vec2 &v, const Mat4 &m) |
const Vec2 | operator* (const Vec2 v, const Mat4 &m) |
Vec3 & | operator*= (Vec3 &v, const Mat4 &m) |
const Vec3 | operator* (const Vec3 v, const Mat4 &m) |
Vec4 & | operator*= (Vec4 &v, const Mat4 &m) |
const Vec4 | operator* (const Vec4 v, const Mat4 &m) |
const Mat4 | operator* (float scalar, const Mat4 &m) |
Vec3 & | operator*= (Vec3 &v, const Quaternion &quat) |
const Vec3 | operator* (const Vec3 v, const Quaternion &quat) |
const Quaternion | operator* (float s, const Quaternion &quat) |
const Vec2 | operator* (float x, const Vec2 v) |
const Vec2 | operator/ (float x, const Vec2 v) |
const Vec3 | operator* (float x, const Vec3 v) |
const Vec3 | operator/ (float x, const Vec3 v) |
const Vec4 | operator* (float x, const Vec4 v) |
const Vec4 | operator/ (float x, const Vec4 v) |
int | operator* (Font::Style value) |
Font::Style | operator| (Font::Style lhs, Font::Style rhs) |
Font::Style | operator& (Font::Style lhs, Font::Style rhs) |
Font::Style | operator^ (Font::Style lhs, Font::Style rhs) |
Font::Style | operator~ (Font::Style lhs) |
std::string | gl_error_name (GLenum error) |
std::string | gl_type_name (GLenum error) |
The primary CUGL namespace
This namespace is for all classes and functions internal to the CUGL game engine. It does not include external tools like Box 2d or poly2tri.
This type represents a callback for asynchronous asset loading
This callback is associated with an asset at the time of the asychronous load request. When the asset either loads, or fails to load, this callback is called with the asset status.
In the case of JSON asset directories, a single callback may be associated with several assets. In that case, the callback funtion is called each time that an asset loads or fails to load. If an entire node in the asset directory fails to load, the callback function will be notified using the key for that JSON node.
The function type is equivalent to
std::function<void(const std::string& key, bool success)>
key | The key to associate with the asset (or asset category) |
success | Whether the asset was successfully loaded |
typedef Vec2 cugl::Point2 |
Provide an alternative name for Vec2
typedef Vec3 cugl::Point3 |
Provide an alternative name for Vec3
typedef Sint64 cugl::TouchID |
This is the type representing a finger or touch
|
strong |
This enum represents a core gesture type.
Core gestures are the primary two-finger gestures: pan, spin, and spread. This simple enumeration indicates which gestures have been recognized.
These types are currently exclusive (e.g. you cannot have a pan at the same time as a pinch). This is because the purpose of the core gesture device is to intelligently choose between gestures.
|
strong |
! This enum represents the category of the key
Categories are used to group key codes in rough groups
|
strong |
This is enum represents a key on a keyboard.
The keys available are subset of the full range of available keys. Because of our goal of cross-platform support, we only support keys that are found on most common keyboards.
The Input dispatcher will convert from an SDL keycode this enum. That means it is possible to receive a KeyCode that is not present in the enum. Any switch statement for this enum should have a default value.
enum cugl::NetworkType : uint8_t |
Represents the type of the of a serialized value.
Whenever you write a value to NetworkSerializer, it is prefixed by a message type indicating what has been encoded. You should use this enum in conjunction with NetworkDeserializer to determine the next value to read.
Enumerator | |
---|---|
NoneType | Represents null in jsons |
BooleanTrue | Represents a true boolean value In order to minimize data transfer, booleans are encoded directly into their message header. |
BooleanFalse | Represents a false boolean value In order to minimize data transfer, booleans are encoded directly into their message header. |
FloatType | Represents a float value |
DoubleType | Represents a double value |
UInt32Type | Represents an unsigned 32 bit int |
SInt32Type | Represents a signed 32 bit int |
UInt64Type | Represents an unsigned 64 bit int |
SInt64Type | Represents a signed 64 bit int |
StringType | Represents a (C++) string value |
JsonType | Represents a shared pointer to a JsonValue object |
ArrayType | A type modifier to represent vector types. Add this value to the base enum to get a vector of that type. For eample, a vector of floats is (ArrayType+FloatType). You should use BooleanTrue to represent a vector of bool. |
InvalidType | Represents a read into the data string at an invalid position |
enum cugl::StencilEffect |
An enum to support stenciling effects.
A SpriteBatch can support many types of stencil effects. Classic stencil effects including clipping (limiting drawing to a specific region) or masking (prohibiting drawing to a specific region). The stencil effects supported are designed with scene2::CanvasNode in mind as the primary use case.
In particular, stencil effects are designed to support simple constructive area geometry operations. You can union, intersect, or subtract stencil regions to produce the relevant effects. However, this is only used for drawing and does not actually construct the associated geometries.
To support the CAG operations, the sprite batch stencil buffer has two areas: low and high. Operations can be applied to one or both of these regions. All binary operations are operations between these two regions. For example, CLIP_MASK will restrict all drawing to the stencil region defined in the low buffer, while also prohibiting any drawing to the stencil region in the high buffer. This has the visible effect of "subtracting" the high buffer from the low buffer.
The CAG operations are only supported at the binary level, as we only have two halves of the stencil buffer. However, using non-drawing effects like CLIP_WIPE or CLIP_CARVE, it is possible to produce more interesting nested expressions.
Note that when using split-buffer operations, only one of the operations will modify the stencil buffer. That is why there no effects such as FILL_WIPE
or CLAMP_STAMP
.
Enumerator | |
---|---|
NATIVE | Differs the to the existing OpenGL stencil settings. (DEFAULT) This effect neither enables nor disables the stencil buffer. Instead it uses the existing OpenGL settings. This is the effect that you should use when you need to manipulate the stencil buffer directly. |
NONE | Disables any stencil effects. This effect directs a SpriteBatch to ignore the stencil buffer (both halves) when drawing. However, it does not clear the contents of the stencil buffer. To clear the stencil buffer, you will need to call SpriteBatch#clearStencil. |
CLIP | Restrict all drawing to the unified stencil region. In order for this effect to do anything, you must have created a stencil region with STAMP or one of its variants. This effect will process the drawing commands normally, but restrict all drawing to the stencil region. This can be used to quickly draw non-convex shapes by making a stencil and drawing a rectangle over the stencil. This effect is the same as CLIP_JOIN in that it respects the union of the two halves of the stencil buffer. |
MASK | Prohibits all drawing to the unified stencil region. In order for this effect to do anything, you must have created a stencil region with STAMP or one of its variants. This effect will process the drawing commands normally, but reject any attempts to draw to the stencil region. This can be used to quickly draw shape borders on top of a solid shape. This effect is the same as MASK_JOIN in that it respects the union of the two halves of the stencil buffer. |
FILL | Restrict all drawing to the unified stencil region. In order for this effect to do anything, you must have created a stencil region with STAMP or one of its variants. This effect will process the drawing commands normally, but restrict all drawing to the stencil region. This can be used to quickly draw non-convex shapes by making a stencil and drawing a rectangle over the stencil. This effect is different from CLIP in that it will zero out the pixels it draws in the stencil buffer, effectively removing them from the stencil region. In many applications, this is a fast way to clear the stencil buffer once it is no longer needed. This effect is the same as FILL_JOIN in that it respects the union of the two halves of the stencil buffer. |
WIPE | Erases from the unified stencil region. This effect will not draw anything to the screen. Instead, it will only draw to the stencil buffer directly. Any pixel drawn will be zeroed in the buffer, removing it from the stencil region. The effect FILL is a combination of this and CLIP. Again, this is a potential optimization for clearing the stencil buffer. However, on most tiled-based GPUs, it is probably faster to simply clear the whole buffer. |
STAMP | Adds a stencil region the unified buffer This effect will not have any immediate visible effects. Instead it creates a stencil region for the effects such as CLIP, MASK, and the like. The shapes are drawn to the stencil buffer using a nonzero fill rule. This has the advantage that (unlike an even-odd fill rule) stamps are additive and can be drawn on top of each other. However, it has the disadvantage that it requires both halves of the stencil buffer to store the stamp (which part of the stamp is in which half is undefined). While this effect implements a nonzero fill rule faithfully, there are technical limitations. The size of the stencil buffer means that more than 256 overlapping polygons of the same orientation will cause unpredictable effects. If this is a problem, use an even odd fill rule instead like STAMP_NONE (which has no such limitations). |
CARVE | Adds a stencil region the lower buffer This effect will not have any immediate visible effects. Instead it creates a stencil region for the effects such as CLIP, MASK, and the like. Like STAMP, shapes are drawn to the stencil buffer instead of the screen. But unlike stamp, this effect is always additive. It ignores path orientation, and does not support holes. This allows the effect to implement a nonzero fill rule while using only half of the buffer. This effect is equivalent to CARVE_NONE in that it uses only the lower half. The primary application of this effect is to create stencils from extruded paths so that overlapping sections are not drawn twice (which has negative effects on alpha blending). |
CLAMP | Limits drawing so that each pixel is updated once. This effect is a variation of CARVE that also draws as it writes to the stencil buffer. This guarantees that each pixel is updated exactly once. This is used by extruded paths so that overlapping sections are not drawn twice (which has negative effects on alpha blending). This effect is equivalent to CLAMP_NONE in that it uses only the lower half. |
NONE_CLIP | Applies CLIP using the upper stencil buffer only. As with CLIP, this effect restricts drawing to the stencil region. However, this effect only uses the stencil region present in the upper stencil buffer. This effect is designed to be used with stencil regions created by NONE_STAMP. While it can be used by a stencil region created by STAMP, the lower stencil buffer is ignored, and hence the results are unpredictable. |
NONE_MASK | Applies MASK using the upper stencil buffer only. As with MASK, this effect prohibits drawing to the stencil region. However, this effect only uses the stencil region present in the upper stencil buffer. This effect is designed to be used with stencil regions created by NONE_STAMP. While it can be used by a stencil region created by STAMP, the lower stencil buffer is ignored, and hence the results are unpredictable. |
NONE_FILL | Applies FILL using the upper stencil buffer only. As with FILL, this effect limits drawing to the stencil region. However, this effect only uses the stencil region present in the upper stencil buffer. It also only zeroes out the upper stencil buffer. This effect is designed to be used with stencil regions created by NONE_STAMP. While it can be used by a stencil region created by STAMP, the lower stencil buffer is ignored, and hence the results are unpredictable. |
NONE_WIPE | Applies WIPE using the upper stencil buffer only. As with WIPE, this effect zeroes out the stencil region, erasing parts of it. However, its effects are limited to the upper stencil region. This effect is designed to be used with stencil regions created by NONE_STAMP. While it can be used by a stencil region created by STAMP, the lower stencil buffer is ignored, and hence the results are unpredictable. |
NONE_STAMP | Adds a stencil region to the upper buffer This effect will not have any immediate visible effect on the screen screen. Instead, it creates a stencil region for the effects such as CLIP, MASK, and the like. Unlike STAMP, the region created is limited to the upper half of the stencil buffer. That is because the shapes are drawn to the buffer with an even-odd fill rule (which does not require the full stencil buffer to implement). This has the disadvantage that stamps drawn on top of each other have an "erasing" effect. However, it has the advantage that the this stamp supports a wider array of effects than the simple stamp effect. Use NONE_CLAMP if you have an simple stencil with no holes that you wish to write to the upper half of the buffer. |
NONE_CARVE | Adds a stencil region to the upper buffer This value will not have any immediate visible effect on the screen. Instead, it creates a stencil region for the effects such as CLIP, MASK, and the like. Like STAMP, shapes are drawn to the stencil buffer instead of the screen. But unlike stamp, this effect is always additive. It ignores path orientation, and does not support holes. This allows the effect to implement a nonzero fill rule while using only the upper half of the buffer. The primary application of this effect is to create stencils from extruded paths so that overlapping sections are not drawn twice (which has negative effects on alpha blending). |
NONE_CLAMP | Uses the upper buffer to limit each pixel to single update. This effect is a variation of NONE_CARVE that also draws as it writes to the upper stencil buffer. This guarantees that each pixel is updated exactly once. This is used by extruded paths so that overlapping sections are not drawn twice (which has negative effects on alpha blending). |
CLIP_JOIN | Restrict all drawing to the unified stencil region. This effect is the same as CLIP in that it respects the union of the two halves of the stencil buffer. |
CLIP_MEET | Restrict all drawing to the intersecting stencil region. This effect is the same as CLIP, except that it limits drawing to the intersection of the stencil regions in the two halves of the stencil buffer. If a unified stencil region was created by STAMP, then the results of this effect are unpredictable. |
CLIP_NONE | Applies CLIP using the lower stencil buffer only. As with CLIP, this effect restricts drawing to the stencil region. However, this effect only uses the stencil region present in the lower stencil buffer. This effect is designed to be used with stencil regions created by STAMP_NONE. While it can be used by a stencil region created by STAMP, the upper stencil buffer is ignored, and hence the results are unpredictable. |
CLIP_MASK | Applies a lower buffer CLIP with an upper MASK. This command restricts drawing to the stencil region in the lower buffer while prohibiting any drawing to the stencil region in the upper buffer. If this effect is applied to a unified stencil region created by STAMP, then the results are unpredictable. |
CLIP_FILL | Applies a lower buffer CLIP with an upper FILL. This command restricts drawing to the stencil region in the unified stencil region of the two buffers. However, it only zeroes pixels in the stencil region of the upper buffer; the lower buffer is untouched. If this effect is applied to a unified stencil region created by STAMP, then the results are unpredictable. |
CLIP_WIPE | Applies a lower buffer CLIP with an upper WIPE. As with WIPE, this command does not do any drawing on screen. Instead, it zeroes out the upper stencil buffer. However, it is clipped by the stencil region in the lower buffer, so that it does not zero out any pixel outside this region. Hence this is a way to erase the lower buffer stencil region from the upper buffer stencil region. |
CLIP_STAMP | Applies a lower buffer CLIP with an upper STAMP. As with NONE_CLAMP, this writes a shape to the upper stencil buffer using an even-odd fill rule. This means that adding a shape on top of existing shape has an erasing effect. However, it also restricts its operation to the stencil region in the lower stencil buffer. Note that if a pixel is clipped while drawing, it will not be added the stencil region in the upper buffer. |
CLIP_CARVE | Applies a lower buffer CLIP with an upper CARVE. As with NONE_CARVE, this writes an additive shape to the upper stencil buffer. However, it also restricts its operation to the stencil region in the lower stencil buffer. Note that if a pixel is clipped while drawing, it will not be added the stencil region in the upper buffer. Hence this is a way to copy the lower buffer stencil region into the upper buffer. |
CLIP_CLAMP | Applies a lower buffer CLIP with an upper CLAMP. As with NONE_CLAMP, this draws a nonoverlapping shape using the upper stencil buffer. However, it also restricts its operation to the stencil region in the lower stencil buffer. Note that if a pixel is clipped while drawing, it will not be added the stencil region in the upper buffer. |
MASK_JOIN | Prohibits all drawing to the unified stencil region. This effect is the same as MASK in that it respects the union of the two halves of the stencil buffer. |
MASK_MEET | Prohibits all drawing to the intersecting stencil region. This effect is the same as MASK, except that it limits drawing to the intersection of the stencil regions in the two halves of the stencil buffer. If a unified stencil region was created by STAMP, then the results of this effect are unpredictable. |
MASK_NONE | Applies MASK using the lower stencil buffer only. As with MASK, this effect prohibits drawing to the stencil region. However, this effect only uses the stencil region present in the lower stencil buffer. This effect is designed to be used with stencil regions created by STAMP_NONE. While it can be used by a stencil region created by STAMP, the upper stencil buffer is ignored, and hence the results are unpredictable. |
MASK_CLIP | Applies a lower buffer MASK with an upper CLIP. This command restricts drawing to the stencil region in the upper buffer while prohibiting any drawing to the stencil region in the lower buffer. If this effect is applied to a unified stencil region created by STAMP, then the results are unpredictable. |
MASK_FILL | Applies a lower buffer MASK with an upper FILL. This command restricts drawing to the stencil region in the upper buffer while prohibiting any drawing to the stencil region in the lower buffer. However, it only zeroes the stencil region in the upper buffer; the lower buffer is untouched. In addition, it will only zero those pixels that were drawn. If this effect is applied to a unified stencil region created by STAMP, then the results are unpredictable. |
MASK_WIPE | Applies a lower buffer MASK with an upper WIPE. As with WIPE, this command does not do any drawing on screen. Instead, it zeroes out the upper stencil buffer. However, it is masked by the stencil region in the lower buffer, so that it does not zero out any pixel inside this region. |
MASK_STAMP | Applies a lower buffer MASK with an upper STAMP. As with NONE_STAMP, this writes a shape to the upper stencil buffer using an even-odd fill rule. This means that adding a shape on top of existing shape has an erasing effect. However, it also masks its operation by the stencil region in the lower stencil buffer. Note that if a pixel is masked while drawing, it will not be added the stencil region in the upper buffer. |
MASK_CARVE | Applies a lower buffer MASK with an upper CARVE. As with NONE_CARVE, this writes an additive shape to the upper stencil buffer. However, it also prohibits any drawing to the stencil region in the lower stencil buffer. Note that if a pixel is masked while drawing, it will not be added the stencil region in the upper buffer. |
MASK_CLAMP | Applies a lower buffer MASK with an upper CLAMP. As with NONE_CLAMP, this draws a nonoverlapping shape using the upper stencil buffer. However, it also prohibits any drawing to the stencil region in the lower stencil buffer. Note that if a pixel is masked while drawing, it will not be added the stencil region in the upper buffer. |
FILL_JOIN | Restrict all drawing to the unified stencil region. This effect is the same as FILL in that it respects the union of the two halves of the stencil buffer. |
FILL_MEET | Restrict all drawing to the intersecting stencil region. This effect is the same as FILL, except that it limits drawing to the intersection of the stencil regions in the two halves of the stencil buffer. When zeroing out pixels, this operation zeroes out both halves of the stencil buffer. If a unified stencil region was created by STAMP, the results of this effect are unpredictable. |
FILL_NONE | Applies FILL using the lower stencil buffer only. As with FILL, this effect restricts drawing to the stencil region. However, this effect only uses the stencil region present in the lower stencil buffer. It also only zeroes the stencil region in this lower buffer. This effect is designed to be used with stencil regions created by STAMP_NONE. While it can be used by a stencil region created by STAMP, the upper stencil buffer is ignored, and hence the results are unpredictable. |
FILL_MASK | Applies a lower buffer FILL with an upper MASK. This command restricts drawing to the stencil region in the lower buffer while prohibiting any drawing to the stencil region in the upper buffer. When zeroing out the stencil region, this part of the effect is only applied to the lower buffer. If this effect is applied to a unified stencil region created by STAMP, then the results are unpredictable. |
FILL_CLIP | Applies a lower buffer FILL with an upper CLIP. This command restricts drawing to the stencil region in the unified stencil region of the two buffers. However, it only zeroes pixels in the stencil region of the lower buffer; the lower buffer is untouched. If this effect is applied to a unified stencil region created by STAMP, then the results are unpredictable. |
WIPE_NONE | Applies WIPE using the lower stencil buffer only. As with WIPE, this effect zeroes out the stencil region, erasing parts of it. However, its effects are limited to the lower stencil region. This effect is designed to be used with stencil regions created by STAMP_NONE. While it can be used by a stencil region created by STAMP, the upper stencil buffer is ignored, and hence the results are unpredictable. |
WIPE_MASK | Applies a lower buffer WIPE with an upper MASK. This command erases from the stencil region in the lower buffer. However, it limits its erasing to locations that are not masked by the stencil region in the upper buffer. If this effect is applied to a unified stencil region created by STAMP, the results are unpredictable. |
WIPE_CLIP | Applies a lower buffer WIPE with an upper CLIP. This command erases from the stencil region in the lower buffer. However, it limits its erasing to locations that are contained in the stencil region in the upper buffer. If this effect is applied to a unified stencil region created by STAMP, the results are unpredictable. |
STAMP_NONE | Adds a stencil region to the lower buffer This effect will not have any immediate visible effect on the screen screen. Instead, it creates a stencil region for the effects such as CLIP, MASK, and the like. Unlike STAMP, the region created is limited to the lower half of the stencil buffer. That is because the shapes are drawn to the buffer with an even-odd fill rule (which does not require the full stencil buffer to implement). This has the disadvantage that stamps drawn on top of each other have an "erasing" effect. However, it has the advantage that the this stamp supports a wider array of effects than the simple stamp effect. |
STAMP_CLIP | Applies a lower buffer STAMP with an upper CLIP. As with STAMP_NONE, this writes a shape to the lower stencil buffer using an even-odd fill rule. This means that adding a shape on top of existing shape has an erasing effect. However, it also restricts its operation to the stencil region in the upper stencil buffer. Note that if a pixel is clipped while drawing, it will not be added the stencil region in the lower buffer. |
STAMP_MASK | Applies a lower buffer STAMP with an upper MASK. As with STAMP_NONE, this writes a shape to the lower stencil buffer using an even-odd fill rule. This means that adding a shape on top of existing shape has an erasing effect. However, it also masks its operation by the stencil region in the upper stencil buffer. Note that if a pixel is masked while drawing, it will not be added the stencil region in the lower buffer. |
STAMP_BOTH | Adds a stencil region to both the lower and the upper buffer This effect will not have any immediate visible effect on the screen screen. Instead, it creates a stencil region for the effects such as CLIP, MASK, and the like. Unlike STAMP, the region is create twice and put in both the upper and the lower stencil buffer. That is because the shapes are drawn to the buffer with an even-odd fill rule (which does not require the full stencil buffer to implement). This has the disadvantage that stamps drawn on top of each other have an "erasing" effect. However, it has the advantage that the this stamp supports a wider array of effects than the simple stamp effect. The use of both buffers to provide a greater degree of flexibility. |
CARVE_NONE | Adds a stencil region to the lower buffer This effect is equivalent to CARVE, since it only uses half of the stencil buffer. |
CARVE_CLIP | Applies a lower buffer CARVE with an upper CLIP. As with CARVE_NONE, this writes an additive shape to the lower stencil buffer. However, it also restricts its operation to the stencil region in the upper stencil buffer. Note that if a pixel is clipped while drawing, it will not be added the stencil region in the lower buffer. Hence this is a way to copy the upper buffer stencil region into the lower buffer. |
CARVE_MASK | Applies a lower buffer CARVE with an upper MASK. As with CARVE_NONE, this writes an additive shape to the lower stencil buffer. However, it also prohibits any drawing to the stencil region in the upper stencil buffer. Note that if a pixel is masked while drawing, it will not be added the stencil region in the lower buffer. |
CARVE_BOTH | Adds a stencil region to both the lower and upper buffer This effect is similar to CARVE, except that it uses both buffers. This is to give a wider degree of flexibility. |
CLAMP_NONE | Uses the lower buffer to limit each pixel to single update. This effect is equivalent to CLAMP, since it only uses half of the stencil buffer. |
CLAMP_CLIP | Applies a lower buffer CLAMP with an upper CLIP. As with CLAMP_NONE, this draws a nonoverlapping shape using the lower stencil buffer. However, it also restricts its operation to the stencil region in the upper stencil buffer. Note that if a pixel is clipped while drawing, it will not be added the stencil region in the lower buffer. |
CLAMP_MASK | Applies a lower buffer CLAMP with an upper MASK. As with CLAMP_NONE, this draws a nonoverlapping shape using the lower stencil buffer. However, it also prohibits any drawing to the stencil region in the upper stencil buffer. Note that if a pixel is masked while drawing, it will not be added the stencil region in the lower buffer. |
std::string cugl::gl_error_name | ( | GLenum | error | ) |
Returns a string description of an OpenGL error type
error | The OpenGL error type |
std::string cugl::gl_type_name | ( | GLenum | error | ) |
Returns a string description of an OpenGL data type
error | The OpenGL error type |
SDL_FORCE_INLINE double cugl::marshall | ( | double | value | ) |
Returns the given value encoded in network order
On a big-endian system, this function has no effect. On a little-endian system, it swaps the bytes to put them in big-endian order.
This function is idempotent. To decode an encoded value, call this function on the value again.
value | The value to encode |
SDL_FORCE_INLINE float cugl::marshall | ( | float | value | ) |
Returns the given value encoded in network order
On a big-endian system, this function has no effect. On a little-endian system, it swaps the bytes to put them in big-endian order.
This function is idempotent. To decode an encoded value, call this function on the value again.
value | The value to encode |
SDL_FORCE_INLINE Uint16 cugl::marshall | ( | Sint16 | value | ) |
Returns the given value encoded in network order
On a big-endian system, this function has no effect. On a little-endian system, it swaps the bytes to put them in big-endian order.
This function is idempotent. To decode an encoded value, call this function on the value again.
value | The value to encode |
SDL_FORCE_INLINE Uint32 cugl::marshall | ( | Sint32 | value | ) |
Returns the given value encoded in network order
On a big-endian system, this function has no effect. On a little-endian system, it swaps the bytes to put them in big-endian order.
This function is idempotent. To decode an encoded value, call this function on the value again.
value | The value to encode |
SDL_FORCE_INLINE Uint64 cugl::marshall | ( | Sint64 | value | ) |
Returns the given value encoded in network order
On a big-endian system, this function has no effect. On a little-endian system, it swaps the bytes to put them in big-endian order.
This function is idempotent. To decode an encoded value, call this function on the value again.
value | The value to encode |
SDL_FORCE_INLINE Uint16 cugl::marshall | ( | Uint16 | value | ) |
Returns the given value encoded in network order
On a big-endian system, this function has no effect. On a little-endian system, it swaps the bytes to put them in big-endian order.
This function is idempotent. To decode an encoded value, call this function on the value again.
value | The value to encode |
SDL_FORCE_INLINE Uint32 cugl::marshall | ( | Uint32 | value | ) |
Returns the given value encoded in network order
On a big-endian system, this function has no effect. On a little-endian system, it swaps the bytes to put them in big-endian order.
This function is idempotent. To decode an encoded value, call this function on the value again.
value | The value to encode |
SDL_FORCE_INLINE Uint64 cugl::marshall | ( | Uint64 | value | ) |
Returns the given value encoded in network order
On a big-endian system, this function has no effect. On a little-endian system, it swaps the bytes to put them in big-endian order.
This function is idempotent. To decode an encoded value, call this function on the value again.
value | The value to encode |
|
inline |
Returns the bitwise and of two font styles.
Returns a copy of the vector after it is transformed.
v | The point to transform. |
m | The transform to apply. |
Returns a copy of the vector transformed by the given matrix.
The vector is treated as a point, which means that translation is applied to the result.
v | The point to transform. |
m | The matrix to transform by. |
Returns a copy of the vector transformed by the given matrix.
The vector is treated as a point, which means that translation is applied to the result.
v | The point to transform. |
m | The matrix to transform by. |
|
inline |
Returns a copy of the vector rotated by the quaternion.
The rotation is defined by the matrix associated with the vector. As per the convention for Mat4, we only allow vectors to be multiplied on the right by quaternions.
v | The vector to rotate. |
quat | The rotation quaternion. |
Returns a copy of the vector transformed by the given matrix.
The vector is treated as is. Hence whether or not translation is applied depends on the value of w.
v | The point to transform. |
m | The matrix to transform by. |
Returns the scalar product of the given color with the given value.
The scaling is clamped so that this remains a valid color.
This version of scaling always multiplies the alpha values.
s | The value to scale by. |
c | The color to scale. |
Returns the scalar product of the given color with the given value.
The scaling is clamped so that this remains a valid color.
This version of scaling always multiplies the alpha values.
s | The value to scale by. |
c | The color to scale. |
|
inline |
Returns the scalar product of the quaternion with the given value.
s | The value to scale by. |
quat | The quaternion to scale. |
Multiplies the components of the given matrix by the specified scalar.
The scalar is applied to BOTH the core matrix and the offset.
scalar | The scalar value. |
m | The transform to scale. |
Multiplies the components of the given matrix by the specified scalar.
scalar | The scalar value. |
m | The matrix to transform by. |
Returns the scalar product of the given vector with the given value.
x | The value to scale by. |
v | The vector to scale. |
Returns the scalar product of the given vector with the given value.
x | The value to scale by. |
v | The vector to scale. |
Returns the scalar product of the given vector with the given value.
x | The value to scale by. |
v | The vector to scale. |
|
inline |
Returns the int equivalent of a font style.
Transforms the given point in place.
v | The point to transform. |
m | The transform to apply. |
Transforms the given point by the given matrix.
The vector is treated as a point, which means that translation is applied to the result.
v | The point to transform. |
m | The matrix to transform by. |
Transforms the given point by the given matrix.
The vector is treated as a point, which means that translation is applied to the result.
v | The point to transform. |
m | The matrix to transform by. |
|
inline |
Rotates the vector in place by the quaternion.
The rotation is defined by the matrix associated with the vector. As per the convention for Mat4, we only allow vectors to be multiplied on the right by quaternions.
v | The vector to rotate. |
quat | The rotation quaternion. |
Transforms the given point by the given matrix.
The vector is treated as is. Hence whether or not translation is applied depends on the value of w.
v | The point to transform. |
m | The matrix to transform by. |
Returns the division of the given value by the vector.
x | The value to divide |
v | The vector to divide by. |
Returns the division of the given value by the vector.
x | The value to divide |
v | The vector to divide by. |
Returns the division of the given value by the vector.
x | The value to divide |
v | The vector to divide by. |
|
inline |
Returns the bitwise exclusive or of two font styles.
|
inline |
Returns the bitwise or of two font styles.
|
inline |
Returns the bitwise complement of a font style.