Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
CAMP
campvis-public
Commits
7f1300d5
Commit
7f1300d5
authored
Nov 18, 2013
by
mostajab
Browse files
+ Add the functionality to resizing the depth buffer as the canvas is resized.
parent
22e94059
Changes
2
Hide whitespace changes
Inline
Side-by-side
application/gui/datacontainerinspectorcanvas.cpp
View file @
7f1300d5
...
...
@@ -160,6 +160,22 @@ namespace campvis {
void
DataContainerInspectorCanvas
::
paint
()
{
/// if the window is resized, change the depth buffer size, also!
if
(
_depthBuffer
)
if
(
_depthBuffer
->
getWidth
()
!=
width
()
||
_depthBuffer
->
getHeight
()
!=
height
())
{
delete
_depthBuffer
;
_depthBuffer
=
new
tgt
::
Texture
(
0
,
tgt
::
ivec3
(
width
(),
height
(),
1
),
GL_DEPTH_COMPONENT
,
GL_DEPTH_COMPONENT24
,
GL_FLOAT
,
tgt
::
Texture
::
LINEAR
);
//, _renderingWndSize(tgt::ivec2(400, 100))
_texturesDirty
=
true
;
}
else
{
// Do nothing!
}
else
{
_depthBuffer
=
new
tgt
::
Texture
(
0
,
tgt
::
ivec3
(
width
(),
height
(),
1
),
GL_DEPTH_COMPONENT
,
GL_DEPTH_COMPONENT24
,
GL_FLOAT
,
tgt
::
Texture
::
LINEAR
);
//, _renderingWndSize(tgt::ivec2(400, 100))
_texturesDirty
=
true
;
}
LGL_ERROR
;
tbb
::
mutex
::
scoped_lock
lock
(
_localMutex
);
if
(
_texturesDirty
)
...
...
@@ -404,7 +420,7 @@ namespace campvis {
invalidate
();
}
void
DataContainerInspectorCanvas
::
sizeChanged
(
const
tgt
::
ivec2
&
)
{
void
DataContainerInspectorCanvas
::
sizeChanged
(
const
tgt
::
ivec2
&
size
)
{
invalidate
();
}
...
...
application/gui/datacontainerinspectorwidget.h
View file @
7f1300d5
...
...
@@ -151,6 +151,7 @@ namespace campvis {
* \param handle DataHandle containing the image to save. Must contain ImageData or RenderData!
* \param filename Filename for the file to save.
*/
//protected:
public:
// Only for Debuggin
...
...
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