Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Main Repositories
otb
Commits
e2fd9ec2
Commit
e2fd9ec2
authored
Mar 03, 2016
by
Stéphane Albert
Browse files
Options
Browse Files
Download
Plain Diff
MRG: Merged origin/rfc-25-OpenGL_remote_desktop into rfc-25-OpenGL_remote_desktop (pull command).
parents
57b652a0
1079d99a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
32 deletions
+34
-32
Modules/Visualization/Ice/src/otbGlImageActor.cxx
Modules/Visualization/Ice/src/otbGlImageActor.cxx
+30
-31
Modules/Visualization/Ice/src/otbStandardShader.cxx
Modules/Visualization/Ice/src/otbStandardShader.cxx
+4
-1
No files found.
Modules/Visualization/Ice/src/otbGlImageActor.cxx
View file @
e2fd9ec2
...
...
@@ -434,45 +434,44 @@ void GlImageActor::Render()
}
}
for
(
TileVectorType
::
iterator
it
=
m_LoadedTiles
.
begin
();
it
!=
m_LoadedTiles
.
end
();
++
it
)
{
for
(
TileVectorType
::
iterator
it
=
m_LoadedTiles
.
begin
();
it
!=
m_LoadedTiles
.
end
();
++
it
)
{
glEnable
(
GL_BLEND
);
glBlendFunc
(
GL_SRC_ALPHA
,
GL_ONE_MINUS_SRC_ALPHA
);
glEnable
(
GL_BLEND
);
glBlendFunc
(
GL_SRC_ALPHA
,
GL_ONE_MINUS_SRC_ALPHA
);
glEnable
(
GL_TEXTURE_2D
);
glBindTexture
(
GL_TEXTURE_2D
,
it
->
m_TextureId
);
glEnable
(
GL_TEXTURE_2D
);
glBindTexture
(
GL_TEXTURE_2D
,
it
->
m_TextureId
);
glTexParameteri
(
GL_TEXTURE_2D
,
GL_TEXTURE_MIN_FILTER
,
GL_LINEAR
);
if
(
m_CurrentResolution
==
0
)
{
glTexParameteri
(
GL_TEXTURE_2D
,
GL_TEXTURE_MAG_FILTER
,
GL_NEAREST
);
}
else
{
glTexParameteri
(
GL_TEXTURE_2D
,
GL_TEXTURE_MAG_FILTER
,
GL_LINEAR
);
}
glTexParameteri
(
GL_TEXTURE_2D
,
GL_TEXTURE_MIN_FILTER
,
GL_LINEAR
);
if
(
m_CurrentResolution
==
0
)
{
glTexParameteri
(
GL_TEXTURE_2D
,
GL_TEXTURE_MAG_FILTER
,
GL_NEAREST
);
}
else
{
glTexParameteri
(
GL_TEXTURE_2D
,
GL_TEXTURE_MAG_FILTER
,
GL_LINEAR
);
}
// Reset color before rendering
glColor3d
(
1.0
f
,
1.0
f
,
1.0
f
);
// Reset color before rendering
glColor3d
(
1.0
f
,
1.0
f
,
1.0
f
);
glBegin
(
GL_QUADS
);
glTexCoord2f
(
0.0
,
1.0
);
glVertex2f
(
it
->
m_LL
[
0
],
it
->
m_LL
[
1
]);
glTexCoord2f
(
1.0
,
1.0
);
glVertex2f
(
it
->
m_LR
[
0
],
it
->
m_LR
[
1
]);
glTexCoord2f
(
1.0
,
0.0
);
glVertex2f
(
it
->
m_UR
[
0
],
it
->
m_UR
[
1
]);
glTexCoord2f
(
0.0
,
0.0
);
glVertex2f
(
it
->
m_UL
[
0
],
it
->
m_UL
[
1
]);
glEnd
();
glBegin
(
GL_QUADS
);
glTexCoord2f
(
0.0
,
1.0
);
glVertex2f
(
it
->
m_LL
[
0
],
it
->
m_LL
[
1
]);
glTexCoord2f
(
1.0
,
1.0
);
glVertex2f
(
it
->
m_LR
[
0
],
it
->
m_LR
[
1
]);
glTexCoord2f
(
1.0
,
0.0
);
glVertex2f
(
it
->
m_UR
[
0
],
it
->
m_UR
[
1
]);
glTexCoord2f
(
0.0
,
0.0
);
glVertex2f
(
it
->
m_UL
[
0
],
it
->
m_UL
[
1
]);
glEnd
();
glDisable
(
GL_TEXTURE_2D
);
glDisable
(
GL_BLEND
);
}
glDisable
(
GL_TEXTURE_2D
);
glDisable
(
GL_BLEND
);
}
if
(
!
m_SoftwareRendering
)
{
if
(
!
m_SoftwareRendering
&&
!
m_Shader
.
IsNull
()
)
{
m_Shader
->
UnloadShader
();
}
}
}
void
GlImageActor
::
LoadTile
(
Tile
&
tile
)
...
...
Modules/Visualization/Ice/src/otbStandardShader.cxx
View file @
e2fd9ec2
...
...
@@ -16,9 +16,12 @@
=========================================================================*/
#include "otbStandardShader.h"
#include <cassert>
#include <GL/glew.h>
#include "otbFragmentShaderRegistry.h"
#include "otbGlVersionChecker.h"
#include <GL/glew.h>
namespace
otb
{
...
...
Write
Preview
Markdown
is supported
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