mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 02:57:44 +00:00
LibGL+LibSoftGPU: Implement texture coordinate generation
Texture coordinate generation is the concept of automatically generating vertex texture coordinates instead of using the provided coordinates (i.e. `glTexCoord`). This commit implements support for: * The `GL_TEXTURE_GEN_Q/R/S/T` capabilities * The `GL_OBJECT_LINEAR`, `GL_EYE_LINEAR`, `GL_SPHERE_MAP`, `GL_REFLECTION_MAP` and `GL_NORMAL_MAP` modes * Object and eye plane coefficients (write-only at the moment) This changeset allows Tux Racer to render its terrain :^)
This commit is contained in:
parent
69da279073
commit
c19632128c
5 changed files with 236 additions and 8 deletions
|
@ -68,4 +68,21 @@ enum class PrimitiveType {
|
|||
Quads,
|
||||
};
|
||||
|
||||
enum TexCoordGenerationCoordinate {
|
||||
None = 0x0,
|
||||
S = 0x1,
|
||||
T = 0x2,
|
||||
R = 0x4,
|
||||
Q = 0x8,
|
||||
All = 0xF,
|
||||
};
|
||||
|
||||
enum class TexCoordGenerationMode {
|
||||
ObjectLinear,
|
||||
EyeLinear,
|
||||
SphereMap,
|
||||
ReflectionMap,
|
||||
NormalMap,
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue