Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
acgl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ACGL
acgl
Commits
eb5193ef
Commit
eb5193ef
authored
13 years ago
by
Robert Menzel
Browse files
Options
Downloads
Patches
Plain Diff
added anisotropic filtering support
parent
950910a7
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
include/ACGL/OpenGL/Objects/Texture.hh
+21
-0
21 additions, 0 deletions
include/ACGL/OpenGL/Objects/Texture.hh
with
21 additions
and
0 deletions
include/ACGL/OpenGL/Objects/Texture.hh
+
21
−
0
View file @
eb5193ef
...
...
@@ -112,6 +112,27 @@ public:
openGLRareError
();
}
//! _sampleCount = 1.0 to deactivate anisotrop filtering, maximum is often 16. If a value is too high it will get clamped to the maximum
void
setAnisotropicFilter
(
GLfloat
_sampleCount
)
{
#ifdef ACGL_USE_GLEW
if
(
GLEW_EXT_texture_filter_anisotropic
)
{
GLfloat
maxAnisotropicSamples
;
glGetFloatv
(
GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT
,
&
maxAnisotropicSamples
);
_sampleCount
=
std
::
max
(
1.0
f
,
_sampleCount
);
_sampleCount
=
std
::
min
(
maxAnisotropicSamples
,
_sampleCount
);
glBindTexture
(
mTarget
,
mContext
);
glTexParameterf
(
mTarget
,
GL_TEXTURE_MAX_ANISOTROPY_EXT
,
_sampleCount
);
openGLRareError
();
}
else
#endif
{
// anisotropic filtering will just increase the image quality, so this is just
// a warning and no error
ACGL
::
Utils
::
warning
()
<<
"Anisotropic filtering is not supported, ignored"
<<
std
::
endl
;
}
}
//! Set texture data for 1D, 2D or 3D textures
inline
void
setImageData
(
const
GLvoid
*
_pData
=
NULL
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment