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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Hurstel
CGoGN
Commits
f2cbc9f2
Commit
f2cbc9f2
authored
Dec 07, 2011
by
Sylvain Thery
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MAJ bug Mac OSX Lion
parent
bbbb8e0f
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
21 additions
and
21 deletions
+21
-21
ThirdParty/Zinri/ImageIO.h
ThirdParty/Zinri/ImageIO.h
+5
-1
include/Algo/Modelisation/extrusion.hpp
include/Algo/Modelisation/extrusion.hpp
+1
-1
include/Algo/Render/GL1/renderFunctor.h
include/Algo/Render/GL1/renderFunctor.h
+0
-1
include/Algo/Render/GL1/topo_render.h
include/Algo/Render/GL1/topo_render.h
+1
-1
include/Algo/Render/GL2/explodeVolumeRender.h
include/Algo/Render/GL2/explodeVolumeRender.h
+1
-1
include/Utils/GLSLShader.h
include/Utils/GLSLShader.h
+3
-3
include/Utils/textures.h
include/Utils/textures.h
+1
-2
src/Utils/GLSLShader.cpp
src/Utils/GLSLShader.cpp
+6
-8
src/Utils/Shaders/shaderFlat.cpp
src/Utils/Shaders/shaderFlat.cpp
+1
-1
src/Utils/Shaders/shaderVectorPerVertex.cpp
src/Utils/Shaders/shaderVectorPerVertex.cpp
+1
-1
src/Utils/pointSprite.cpp
src/Utils/pointSprite.cpp
+1
-1
No files found.
ThirdParty/Zinri/ImageIO.h
View file @
f2cbc9f2
...
...
@@ -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 @
f2cbc9f2
...
...
@@ -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 @
f2cbc9f2
...
...
@@ -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 @
f2cbc9f2
...
...
@@ -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 @
f2cbc9f2
...
...
@@ -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 @
f2cbc9f2
...
...
@@ -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 @
f2cbc9f2
...
...
@@ -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 @
f2cbc9f2
...
...
@@ -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 @
f2cbc9f2
...
...
@@ -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 @
f2cbc9f2
...
...
@@ -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 @
f2cbc9f2
...
...
@@ -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
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