Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
小 白蛋
OpenSpace
Commits
03a969bf
Commit
03a969bf
authored
2 years ago
by
Emma Broman
Browse files
Options
Download
Email Patches
Plain Diff
Fix depth test not working for glyphId framebuffer
We need a depth buffer texture as well
parent
3bef0516
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
modules/exoplanetsexperttool/rendering/renderableexoplanetglyphcloud.cpp
+19
-0
...etsexperttool/rendering/renderableexoplanetglyphcloud.cpp
modules/exoplanetsexperttool/rendering/renderableexoplanetglyphcloud.h
+1
-0
...anetsexperttool/rendering/renderableexoplanetglyphcloud.h
with
20 additions
and
0 deletions
+20
-0
modules/exoplanetsexperttool/rendering/renderableexoplanetglyphcloud.cpp
+
19
-
0
View file @
03a969bf
...
...
@@ -545,6 +545,25 @@ void RenderableExoplanetGlyphCloud::createGlyphIdTexture(const glm::uvec3 dimens
*
_glyphIdTexture
,
0
);
// And a depth buffer of the same dimension
_depthTexture
=
std
::
make_unique
<
ghoul
::
opengl
::
Texture
>
(
dimensions
,
GL_TEXTURE_2D
,
ghoul
::
opengl
::
Texture
::
Format
::
DepthComponent
,
GL_DEPTH_COMPONENT32F
,
GL_FLOAT
);
_depthTexture
->
setFilter
(
ghoul
::
opengl
::
Texture
::
FilterMode
::
Linear
);
_depthTexture
->
uploadTexture
();
_depthTexture
->
bind
();
glFramebufferTexture
(
GL_FRAMEBUFFER
,
GL_DEPTH_ATTACHMENT
,
*
_depthTexture
,
0
);
}
void
RenderableExoplanetGlyphCloud
::
mapVertexAttributes
()
{
...
...
This diff is collapsed.
Click to expand it.
modules/exoplanetsexperttool/rendering/renderableexoplanetglyphcloud.h
+
1
-
0
View file @
03a969bf
...
...
@@ -112,6 +112,7 @@ private:
// Point id from screenspace position
std
::
unique_ptr
<
ghoul
::
opengl
::
Texture
>
_glyphIdTexture
;
std
::
unique_ptr
<
ghoul
::
opengl
::
Texture
>
_depthTexture
;
GLuint
_glyphIdFramebuffer
=
0
;
glm
::
ivec2
_lastViewPortSize
;
...
...
This diff is collapsed.
Click to expand it.
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
Menu
Projects
Groups
Snippets
Help