Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
CGoGN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
KennethVanhoey
CGoGN
Commits
635b75a9
Commit
635b75a9
authored
Jul 26, 2013
by
Sylvain Thery
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
resolve problem with NO_QT & loadImage
parent
033af6c1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
34 deletions
+6
-34
include/Utils/textures.h
include/Utils/textures.h
+0
-2
include/Utils/textures.hpp
include/Utils/textures.hpp
+2
-2
src/Utils/Shaders/shaderTextureMask.cpp
src/Utils/Shaders/shaderTextureMask.cpp
+4
-30
No files found.
include/Utils/textures.h
View file @
635b75a9
...
...
@@ -236,13 +236,11 @@ public:
*/
bool
load
(
const
unsigned
char
*
ptr
,
unsigned
int
w
,
unsigned
int
h
,
unsigned
int
bpp
);
#ifdef WITH_QT
/// load from file
bool
load
(
const
std
::
string
&
filename
);
/// load from file
void
save
(
const
std
::
string
&
filename
);
#endif
/**
* crop image
...
...
include/Utils/textures.hpp
View file @
635b75a9
...
...
@@ -347,13 +347,13 @@ bool Image<DIM,TYPE>::load(const std::string& filename)
this
->
m_size
[
1
]
=
ilGetInteger
(
IL_IMAGE_HEIGHT
);
this
->
computeSub
();
this->m_data_ptr = new TYPE[
ptr->width()*ptr->height()
];
this
->
m_data_ptr
=
new
TYPE
[
this
->
m_size
[
0
]
*
this
->
m_size
[
1
]
];
unsigned
char
*
ptr
=
reinterpret_cast
<
unsigned
char
*>
(
this
->
m_data_ptr
);
for
(
int
i
=
this
->
m_size
[
1
]
-
1
;
i
>=
0
;
--
i
)
{
ilCopyPixels
(
0
,
i
,
0
,
this
->
m_size
[
0
],
1
,
1
,
IL_RGB
,
IL_UNSIGNED_BYTE
,
ptr
);
ptr += 3*
w
;
ptr
+=
3
*
this
->
m_size
[
0
]
;
}
ilDeleteImage
(
imgName
);
...
...
src/Utils/Shaders/shaderTextureMask.cpp
View file @
635b75a9
...
...
@@ -21,7 +21,7 @@
* Contact information: cgogn@unistra.fr *
* *
*******************************************************************************/
#ifdef WITH_QT
//
#ifdef WITH_QT
#include "Utils/Shaders/shaderTextureMask.h"
...
...
@@ -35,32 +35,6 @@ namespace Utils
#include "shaderTextureMask.vert"
#include "shaderTextureMask.frag"
//std::string ShaderTextureMask::vertexShaderText =
// "ATTRIBUTE vec3 VertexPosition;\n"
// "ATTRIBUTE vec2 VertexTexCoord;\n"
// "uniform mat4 ModelViewProjectionMatrix;\n"
// "VARYING_VERT vec2 texCoord;\n"
// "INVARIANT_POS;\n"
// "void main ()\n"
// "{\n"
// " gl_Position = ModelViewProjectionMatrix * vec4 (VertexPosition, 1.0);\n"
// " texCoord = VertexTexCoord;\n"
// "}";
//
//
//std::string ShaderTextureMask::fragmentShaderText =
// "PRECISON;\n"
// "VARYING_FRAG vec2 texCoord;\n"
// "uniform sampler2D textureUnit;\n"
// "uniform sampler2D textureUnitMask;\n"
// "FRAG_OUT_DEF;\n"
// "void main()\n"
// "{\n"
// " float m = texture2D(textureUnitMask,texCoord).r;\n"
// " if (m < 0.5)"
// " discard;"
// " gl_FragColor=texture2D(textureUnit,texCoord)*m;\n"
// "}";
ShaderTextureMask
::
ShaderTextureMask
()
...
...
@@ -137,6 +111,6 @@ void ShaderTextureMask::restoreUniformsAttribs()
}
// namespace CGoGN
#else
#pragma message(__FILE__ " not compiled because of mising Qt")
#endif
//
#else
//
#pragma message(__FILE__ " not compiled because of mising Qt")
//
#endif
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