mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 00:58:05 +02:00
set the texture border color for the depth texture
This commit is contained in:
parent
900da88dae
commit
1979b6b2de
1 changed files with 5 additions and 1 deletions
|
|
@ -534,6 +534,8 @@ SpecialKey(int key, int x, int y)
|
|||
static void
|
||||
Init(void)
|
||||
{
|
||||
static const GLfloat borderColor[4] = {1.0, 0.0, 0.0, 0.0};
|
||||
|
||||
#if defined(GL_ARB_depth_texture) && defined(GL_ARB_shadow)
|
||||
if (!glutExtensionSupported("GL_ARB_depth_texture") ||
|
||||
!glutExtensionSupported("GL_ARB_shadow")) {
|
||||
|
|
@ -552,9 +554,11 @@ Init(void)
|
|||
HaveEXTshadowFuncs = glutExtensionSupported("GL_EXT_shadow_funcs");
|
||||
|
||||
glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_WRAP_S, GL_CLAMP);
|
||||
glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_WRAP_T, GL_CLAMP);
|
||||
glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
|
||||
glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
|
||||
glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_WRAP_T, GL_CLAMP);
|
||||
|
||||
glTexParameterfv(GL_TEXTURE_2D, GL_TEXTURE_BORDER_COLOR, borderColor);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP);
|
||||
#if defined(GL_ARB_shadow)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue