Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
CGoGN
CGoGN
Commits
635b75a9
Commit
635b75a9
authored
Jul 26, 2013
by
Sylvain Thery
Browse files
resolve problem with NO_QT & loadImage
parent
033af6c1
Changes
3
Hide whitespace changes
Inline
Side-by-side
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
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