Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ACGL
acgl
Commits
63d5cb81
Commit
63d5cb81
authored
Sep 27, 2011
by
Robert Menzel
Browse files
added setting of wrap parameters to TextureControlFileJPG
parent
fa3c1826
Changes
2
Hide whitespace changes
Inline
Side-by-side
include/ACGL/OpenGL/Controller/TextureControlFileJPG.hh
View file @
63d5cb81
...
...
@@ -38,6 +38,14 @@ public:
inline
TextureControlFileJPG
&
magFilter
(
GLint
_magFilter
)
{
mMagFilter
=
_magFilter
;
return
*
this
;
}
inline
TextureControlFileJPG
&
anisotropicFilter
(
GLfloat
_anisotropicFilter
)
{
mAnisotropicFilter
=
_anisotropicFilter
;
return
*
this
;
}
inline
TextureControlFileJPG
&
wrap
(
GLenum
_wrapS
,
GLenum
_wrapT
=
0
,
GLenum
_wrapR
=
0
)
{
mWrapS
=
_wrapS
;
mWrapT
=
_wrapT
;
mWrapT
=
_wrapR
;
return
*
this
;
}
private:
bool
loadJPG
(
SharedTexture
&
texture
);
...
...
@@ -55,6 +63,9 @@ protected:
GLint
mMinFilter
;
GLint
mMagFilter
;
GLfloat
mAnisotropicFilter
;
GLenum
mWrapS
;
GLenum
mWrapT
;
GLenum
mWrapR
;
};
}
// OpenGL
...
...
src/ACGL/OpenGL/Controller/TextureControlFileJPG.cc
View file @
63d5cb81
...
...
@@ -16,6 +16,7 @@ SharedTexture TextureControlFileJPG::create(void)
texture
->
bind
();
texture
->
setMinFilter
(
mMinFilter
==
0
?
GL_LINEAR_MIPMAP_LINEAR
:
mMinFilter
);
texture
->
setMagFilter
(
mMagFilter
==
0
?
GL_LINEAR
:
mMagFilter
);
if
(
mWrapS
>
0
)
texture
->
setWrap
(
mWrapS
,
mWrapT
,
mWrapR
);
if
(
mAnisotropicFilter
>
0.0
)
texture
->
setAnisotropicFilter
(
mAnisotropicFilter
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment