Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenFlipper-Free
OpenFlipper
Commits
176b165c
Commit
176b165c
authored
Mar 12, 2018
by
schultz
Browse files
use textureCoordination shader implementation in CoreProfiles
parent
fee8d29a
Changes
2
Hide whitespace changes
Inline
Side-by-side
libs_required/ACG/GL/RenderObject.cc
View file @
176b165c
...
...
@@ -125,22 +125,19 @@ void RenderObject::initFromState( GLState* _glState )
pointSize
=
_glState
->
point_size
();
}
if
(
_glState
->
compatibilityProfile
())
{
// get texcoord generation params
if
(
gl
Is
Enabled
(
GL_TEXTURE_GEN_Q
))
if
(
_
gl
State
->
isState
Enabled
(
GL_TEXTURE_GEN_Q
))
shaderDesc
.
texGenDim
=
4
;
else
if
(
gl
Is
Enabled
(
GL_TEXTURE_GEN_R
))
else
if
(
_
gl
State
->
isState
Enabled
(
GL_TEXTURE_GEN_R
))
shaderDesc
.
texGenDim
=
3
;
else
if
(
gl
Is
Enabled
(
GL_TEXTURE_GEN_T
))
else
if
(
_
gl
State
->
isState
Enabled
(
GL_TEXTURE_GEN_T
))
shaderDesc
.
texGenDim
=
2
;
else
if
(
gl
Is
Enabled
(
GL_TEXTURE_GEN_S
))
else
if
(
_
gl
State
->
isState
Enabled
(
GL_TEXTURE_GEN_S
))
shaderDesc
.
texGenDim
=
1
;
}
if
(
shaderDesc
.
texGenDim
)
{
GLint
genMode
=
0
;
gl
G
etTexGen
iv
(
GL_S
,
GL_TEXTURE_GEN_MODE
,
&
genMode
);
GLint
genMode
;
_
gl
State
->
g
etTexGen
Mode
(
GL_S
,
GL_TEXTURE_GEN_MODE
,
&
genMode
);
shaderDesc
.
texGenMode
=
genMode
;
}
}
...
...
libs_required/ACG/Scenegraph/EnvMapNode.cc
View file @
176b165c
...
...
@@ -98,14 +98,13 @@ void EnvMapNode::enter(GLState& _state, const DrawModes::DrawMode& _drawmode)
if
(
_drawmode
==
DrawModes
::
SOLID_ENV_MAPPED
)
{
TextureNode
::
enter
(
_state
,
_drawmode
);
if
(
_state
.
compatibilityProfile
())
{
glTexGeni
(
GL_S
,
GL_TEXTURE_GEN_MODE
,
GL_SPHERE_MAP
);
glTexGeni
(
GL_T
,
GL_TEXTURE_GEN_MODE
,
GL_SPHERE_MAP
);
ACG
::
GLState
::
enable
(
GL_TEXTURE_GEN_S
);
ACG
::
GLState
::
enable
(
GL_TEXTURE_GEN_T
);
ACG
::
GLState
::
enable
(
GL_TEXTURE_2D
);
}
ACG
::
GLState
::
setTexGenMode
(
GL_S
,
GL_TEXTURE_GEN_MODE
,
GL_SPHERE_MAP
);
ACG
::
GLState
::
setTexGenMode
(
GL_T
,
GL_TEXTURE_GEN_MODE
,
GL_SPHERE_MAP
);
ACG
::
GLState
::
enable
(
GL_TEXTURE_GEN_S
,
false
);
ACG
::
GLState
::
enable
(
GL_TEXTURE_GEN_T
,
false
);
if
(
_state
.
compatibilityProfile
())
ACG
::
GLState
::
enable
(
GL_TEXTURE_2D
);
}
else
TextureNode
::
enter
(
_state
,
_drawmode
);
}
...
...
@@ -119,12 +118,10 @@ void EnvMapNode::leave(GLState& _state, const DrawModes::DrawMode& _drawmode)
if
(
_drawmode
==
DrawModes
::
SOLID_ENV_MAPPED
)
{
TextureNode
::
leave
(
_state
,
_drawmode
);
ACG
::
GLState
::
disable
(
GL_TEXTURE_GEN_S
,
false
);
ACG
::
GLState
::
disable
(
GL_TEXTURE_GEN_T
,
false
);
if
(
_state
.
compatibilityProfile
())
{
ACG
::
GLState
::
disable
(
GL_TEXTURE_GEN_S
);
ACG
::
GLState
::
disable
(
GL_TEXTURE_GEN_T
);
ACG
::
GLState
::
disable
(
GL_TEXTURE_2D
);
}
ACG
::
GLState
::
disable
(
GL_TEXTURE_2D
);
}
else
TextureNode
::
leave
(
_state
,
_drawmode
);
}
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment