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
KennethVanhoey
CGoGN
Commits
64d1573c
Commit
64d1573c
authored
Dec 07, 2011
by
Sylvain Thery
Browse files
Merge branch 'master' of cgogn:CGoGN
parents
a04ff05d
f2cbc9f2
Changes
11
Hide whitespace changes
Inline
Side-by-side
ThirdParty/Zinri/ImageIO.h
View file @
64d1573c
...
...
@@ -57,7 +57,11 @@
#include
<zlib.h>
#include
<stdlib.h>
#include
<stdio.h>
#include
<malloc.h>
#ifdef __APPLE__
#include
<sys/malloc.h>
#else
#include
<malloc.h>
#endif
#include
<string.h>
#ifndef WIN32
#include
<strings.h>
...
...
include/Algo/Modelisation/extrusion.hpp
View file @
64d1573c
...
...
@@ -22,7 +22,7 @@
* *
*******************************************************************************/
#include
<GL/gl.h>
#include
<GL/gl
ew
.h>
#include
"Geometry/transfo.h"
namespace
CGoGN
...
...
include/Algo/Render/GL1/renderFunctor.h
View file @
64d1573c
...
...
@@ -26,7 +26,6 @@
#define __RENDER_FUNCTOR_GL_H
#include
<vector>
#include
<IL/ilut.h>
namespace
CGoGN
{
...
...
include/Algo/Render/GL1/topo_render.h
View file @
64d1573c
...
...
@@ -28,7 +28,7 @@
#include
<list>
//#include <gmtl/VecOps.h>
//#include <gmtl/Output.h>
#include
<GL/gl.h>
#include
<GL/gl
ew
.h>
#include
"Topology/generic/functor.h"
...
...
include/Algo/Render/GL2/explodeVolumeRender.h
View file @
64d1573c
...
...
@@ -25,7 +25,7 @@
#ifndef _EXPLODE_VOLUME_VBO_RENDER
#define _EXPLODE_VOLUME_VBO_RENDER
#include
<GL/gl.h>
#include
<GL/gl
ew
.h>
#include
<vector>
#include
<list>
...
...
include/Utils/GLSLShader.h
View file @
64d1573c
...
...
@@ -165,7 +165,7 @@ protected:
/**
* create the shader (attach and link shaders into program)
*/
bool
create
(
GLint
inputGeometryPrimitive
=
GL_TRIANGLES
,
GLint
outputGeometryPrimitive
=
GL_TRIANGLES
);
bool
create
(
GLint
inputGeometryPrimitive
=
GL_TRIANGLES
,
GLint
outputGeometryPrimitive
=
GL_TRIANGLES
,
int
nb_max_vertices
=
16
);
/**
* get log after compiling
...
...
@@ -235,7 +235,7 @@ public:
* @param inputGeometryPrimitive primitives used in geometry shader as input
* @param outputGeometryPrimitive primitives generated in geometry shader as output
*/
bool
loadShaders
(
const
std
::
string
&
vs
,
const
std
::
string
&
fs
,
const
std
::
string
&
gs
,
GLint
inputGeometryPrimitive
=
GL_TRIANGLES
,
GLint
outputGeometryPrimitive
=
GL_TRIANGLE_STRIP
);
bool
loadShaders
(
const
std
::
string
&
vs
,
const
std
::
string
&
fs
,
const
std
::
string
&
gs
,
GLint
inputGeometryPrimitive
=
GL_TRIANGLES
,
GLint
outputGeometryPrimitive
=
GL_TRIANGLE_STRIP
,
int
nb_max_vertices
=
16
);
/**
* load shaders (compile and link)
...
...
@@ -254,7 +254,7 @@ public:
* @param inputGeometryPrimitive primitives used in geometry shader as input
* @param outputGeometryPrimitive primitives generated in geometry shader as output
*/
bool
loadShadersFromMemory
(
const
char
*
vs
,
const
char
*
fs
,
const
char
*
gs
,
GLint
inputGeometryPrimitive
,
GLint
outputGeometryPrimitive
);
bool
loadShadersFromMemory
(
const
char
*
vs
,
const
char
*
fs
,
const
char
*
gs
,
GLint
inputGeometryPrimitive
,
GLint
outputGeometryPrimitive
,
int
nb_max_vertices
=
16
);
const
char
*
getVertexShaderSrc
()
{
return
m_vertex_shader_source
;
}
const
char
*
getFragmentShaderSrc
()
{
return
m_fragment_shader_source
;
}
...
...
include/Utils/textures.h
View file @
64d1573c
...
...
@@ -26,8 +26,7 @@
#define CGOGN_TEXTURES_H_
#include
"Geometry/vector_gen.h"
#include
<GL/gl.h>
#include
<GL/glew.h>
#include
<string>
#include
<QImage>
...
...
src/Utils/GLSLShader.cpp
View file @
64d1573c
...
...
@@ -442,7 +442,7 @@ char* GLSLShader::getInfoLog( GLhandleARB obj )
return
info_log
;
}
bool
GLSLShader
::
create
(
GLint
inputGeometryPrimitive
,
GLint
outputGeometryPrimitive
)
bool
GLSLShader
::
create
(
GLint
inputGeometryPrimitive
,
GLint
outputGeometryPrimitive
,
int
nb_max_vertices
)
{
int
status
;
char
*
info_log
;
...
...
@@ -475,9 +475,7 @@ bool GLSLShader::create(GLint inputGeometryPrimitive,GLint outputGeometryPrimiti
glProgramParameteriEXT
(
m_program_object
,
GL_GEOMETRY_INPUT_TYPE_EXT
,
inputGeometryPrimitive
);
glProgramParameteriEXT
(
m_program_object
,
GL_GEOMETRY_OUTPUT_TYPE_EXT
,
outputGeometryPrimitive
);
int
temp
;
glGetIntegerv
(
GL_MAX_GEOMETRY_OUTPUT_VERTICES_EXT
,
&
temp
);
glProgramParameteriEXT
(
m_program_object
,
GL_GEOMETRY_VERTICES_OUT_EXT
,
temp
);
glProgramParameteriEXT
(
m_program_object
,
GL_GEOMETRY_VERTICES_OUT_EXT
,
nb_max_vertices
);
}
/*** link program object ***/
...
...
@@ -669,7 +667,7 @@ bool GLSLShader::loadShaders(const std::string& vs, const std::string& ps)
return
true
;
}
bool
GLSLShader
::
loadShaders
(
const
std
::
string
&
vs
,
const
std
::
string
&
ps
,
const
std
::
string
&
gs
,
GLint
inputGeometryPrimitive
,
GLint
outputGeometryPrimitive
)
bool
GLSLShader
::
loadShaders
(
const
std
::
string
&
vs
,
const
std
::
string
&
ps
,
const
std
::
string
&
gs
,
GLint
inputGeometryPrimitive
,
GLint
outputGeometryPrimitive
,
int
nb_max_vertices
)
{
m_nameVS
=
vs
;
m_nameFS
=
ps
;
...
...
@@ -689,7 +687,7 @@ bool GLSLShader::loadShaders(const std::string& vs, const std::string& ps, const
CGoGNerr
<<
"Error while loading geometry shader"
<<
CGoGNendl
;
}
if
(
!
create
(
inputGeometryPrimitive
,
outputGeometryPrimitive
))
if
(
!
create
(
inputGeometryPrimitive
,
outputGeometryPrimitive
,
nb_max_vertices
))
{
CGoGNout
<<
"Unable to create the shaders !"
<<
CGoGNendl
;
return
false
;
...
...
@@ -727,7 +725,7 @@ bool GLSLShader::loadShadersFromMemory(const char* vs, const char* fs)
return
true
;
}
bool
GLSLShader
::
loadShadersFromMemory
(
const
char
*
vs
,
const
char
*
fs
,
const
char
*
gs
,
GLint
inputGeometryPrimitive
,
GLint
outputGeometryPrimitive
)
bool
GLSLShader
::
loadShadersFromMemory
(
const
char
*
vs
,
const
char
*
fs
,
const
char
*
gs
,
GLint
inputGeometryPrimitive
,
GLint
outputGeometryPrimitive
,
int
nb_max_vertices
)
{
if
(
m_vertex_shader_source
)
delete
[]
m_vertex_shader_source
;
...
...
@@ -759,7 +757,7 @@ bool GLSLShader::loadShadersFromMemory(const char* vs, const char* fs, const cha
if
(
!
loadGeometryShaderSourceString
(
gs
))
return
false
;
if
(
!
create
(
inputGeometryPrimitive
,
outputGeometryPrimitive
))
if
(
!
create
(
inputGeometryPrimitive
,
outputGeometryPrimitive
,
nb_max_vertices
))
{
CGoGNout
<<
"Unable to create the shaders !"
<<
CGoGNendl
;
return
false
;
...
...
src/Utils/Shaders/shaderFlat.cpp
View file @
64d1573c
...
...
@@ -99,7 +99,7 @@ ShaderFlat::ShaderFlat()
std
::
string
glxfrag
(
*
GLSLShader
::
DEFINES_GL
);
glxfrag
.
append
(
fragmentShaderText
);
loadShadersFromMemory
(
glxvert
.
c_str
(),
glxfrag
.
c_str
(),
glxgeom
.
c_str
(),
GL_TRIANGLES
,
GL_TRIANGLE_STRIP
);
loadShadersFromMemory
(
glxvert
.
c_str
(),
glxfrag
.
c_str
(),
glxgeom
.
c_str
(),
GL_TRIANGLES
,
GL_TRIANGLE_STRIP
,
3
);
getLocations
();
...
...
src/Utils/Shaders/shaderVectorPerVertex.cpp
View file @
64d1573c
...
...
@@ -88,7 +88,7 @@ ShaderVectorPerVertex::ShaderVectorPerVertex() :
std
::
string
glxfrag
(
*
GLSLShader
::
DEFINES_GL
);
glxfrag
.
append
(
fragmentShaderText
);
loadShadersFromMemory
(
glxvert
.
c_str
(),
glxfrag
.
c_str
(),
glxgeom
.
c_str
(),
GL_POINTS
,
GL_LINE_STRIP
);
loadShadersFromMemory
(
glxvert
.
c_str
(),
glxfrag
.
c_str
(),
glxgeom
.
c_str
(),
GL_POINTS
,
GL_LINE_STRIP
,
2
);
// get and fill uniforms
bind
();
...
...
src/Utils/pointSprite.cpp
View file @
64d1573c
...
...
@@ -114,7 +114,7 @@ PointSprite::PointSprite(float radius)
std
::
string
glxfrag
(
*
GLSLShader
::
DEFINES_GL
);
glxfrag
.
append
(
fragmentShaderText
);
loadShadersFromMemory
(
glxvert
.
c_str
(),
glxfrag
.
c_str
(),
glxgeom
.
c_str
(),
GL_POINTS
,
GL_TRIANGLE_STRIP
);
loadShadersFromMemory
(
glxvert
.
c_str
(),
glxfrag
.
c_str
(),
glxgeom
.
c_str
(),
GL_POINTS
,
GL_TRIANGLE_STRIP
,
4
);
bind
();
m_uniform_size
=
glGetUniformLocation
(
program_handler
(),
"size"
);
...
...
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