Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
campvis-public
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
9
Issues
9
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
1
Merge Requests
1
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
CAMP
campvis-public
Commits
1be35662
Commit
1be35662
authored
Sep 30, 2014
by
Christian Schulte zu Berge
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed memory issues in devilimagereader.cpp
parent
34f2d265
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
modules/devil/processors/devilimagereader.cpp
modules/devil/processors/devilimagereader.cpp
+2
-2
No files found.
modules/devil/processors/devilimagereader.cpp
View file @
1be35662
...
...
@@ -227,8 +227,6 @@ namespace campvis {
}
// get data from image and transform to single intensity image:
ILubyte
*
data
=
ilGetData
();
ilCopyPixels
(
0
,
0
,
0
,
imageSize
.
x
,
imageSize
.
y
,
1
,
devilFormat
,
devilDataType
,
buffer
+
(
WeaklyTypedPointer
::
numBytes
(
campvisDataType
,
numChannels
)
*
i
*
imageSize
.
x
*
imageSize
.
y
));
ILint
err
=
ilGetError
();
if
(
err
!=
IL_NO_ERROR
)
{
...
...
@@ -257,8 +255,10 @@ namespace campvis {
rd
->
addColorTexture
(
id
);
// create fake depth image
// TODO: think of a better solution to this...
ImageData
*
idDepth
=
new
ImageData
(
dimensionality
,
imageSize
,
1
);
float
*
ptr
=
new
float
[
tgt
::
hmul
(
imageSize
)];
memset
(
ptr
,
0
,
tgt
::
hmul
(
imageSize
)
*
sizeof
(
float
));
WeaklyTypedPointer
wtpDepth
(
campvisDataType
,
1
,
ptr
);
ImageRepresentationLocal
::
create
(
idDepth
,
wtpDepth
);
rd
->
setDepthTexture
(
idDepth
);
...
...
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