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
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
CGoGN
CGoGN
Commits
de622e31
Commit
de622e31
authored
Sep 05, 2014
by
Sylvain Thery
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
minor GL modifications
parent
78b25edf
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
35 additions
and
7 deletions
+35
-7
Apps/Examples/viewer.cpp
Apps/Examples/viewer.cpp
+3
-1
Apps/Examples/volumeExplorer.cpp
Apps/Examples/volumeExplorer.cpp
+2
-0
src/Utils/GLSLShader.cpp
src/Utils/GLSLShader.cpp
+30
-5
src/Utils/Qt/qtgl.cpp
src/Utils/Qt/qtgl.cpp
+0
-1
No files found.
Apps/Examples/viewer.cpp
View file @
de622e31
...
@@ -78,7 +78,9 @@ void Viewer::initGUI()
...
@@ -78,7 +78,9 @@ void Viewer::initGUI()
void
Viewer
::
cb_initGL
()
void
Viewer
::
cb_initGL
()
{
{
Utils
::
GLSLShader
::
setCurrentOGLVersion
(
2
)
;
Utils
::
GLSLShader
::
setCurrentOGLVersion
(
3
)
;
CGoGNout
<<
"GL VERSION = "
<<
glGetString
(
GL_VERSION
)
<<
CGoGNendl
;
Utils
::
GLSLShader
::
areShadersSupported
();
m_render
=
new
Algo
::
Render
::
GL2
::
MapRender
()
;
m_render
=
new
Algo
::
Render
::
GL2
::
MapRender
()
;
m_topoRender
=
new
Algo
::
Render
::
GL2
::
TopoRenderMap
<
PFP
>
()
;
m_topoRender
=
new
Algo
::
Render
::
GL2
::
TopoRenderMap
<
PFP
>
()
;
...
...
Apps/Examples/volumeExplorer.cpp
View file @
de622e31
...
@@ -206,6 +206,8 @@ void MyQT::cb_initGL()
...
@@ -206,6 +206,8 @@ void MyQT::cb_initGL()
{
{
// choose to use GL version 2
// choose to use GL version 2
Utils
::
GLSLShader
::
setCurrentOGLVersion
(
2
);
Utils
::
GLSLShader
::
setCurrentOGLVersion
(
2
);
CGoGNout
<<
"GL VERSION = "
<<
glGetString
(
GL_VERSION
)
<<
CGoGNendl
;
Utils
::
GLSLShader
::
areShadersSupported
();
// create the renders
// create the renders
m_topo_render
=
new
Algo
::
Render
::
GL2
::
Topo3RenderMap
<
PFP
>
();
m_topo_render
=
new
Algo
::
Render
::
GL2
::
Topo3RenderMap
<
PFP
>
();
...
...
src/Utils/GLSLShader.cpp
View file @
de622e31
...
@@ -148,10 +148,35 @@ bool GLSLShader::areGeometryShadersSupported()
...
@@ -148,10 +148,35 @@ bool GLSLShader::areGeometryShadersSupported()
bool GLSLShader::areShadersSupported()
bool GLSLShader::areShadersSupported()
{
{
if ( ! glewGetExtension("GL_ARB_vertex_shader")) return false;
if ( ! glewIsSupported("GL_ARB_vertex_shader"))
if ( ! glewGetExtension("GL_ARB_fragment_shader")) return false;
{
if ( ! glewGetExtension("GL_ARB_shader_objects")) return false;
CGoGNerr << " vertex shaders not supported!" <<CGoGNendl;
if ( ! glewGetExtension("GL_ARB_shading_language_100")) return false;
return false;
}
if ( ! glewIsSupported("GL_ARB_fragment_shader"))
{
CGoGNerr << " fragment shaders not supported!" << CGoGNendl;
return false;
}
if ( ! glewIsSupported("GL_ARB_geometry_shader4"))
{
CGoGNerr << " geometry shaders not supported!" << CGoGNendl;
return false;
}
if ( ! glewIsSupported("GL_ARB_shader_objects"))
{
CGoGNerr << " shaders not supported!" << CGoGNendl;
return false;
}
if ( ! glewIsSupported("GL_ARB_shading_language_100"))
{
CGoGNerr << " GLSL no supported!" << CGoGNendl;
return false;
}
return true;
return true;
}
}
...
@@ -399,7 +424,7 @@ bool GLSLShader::loadGeometryShaderSourceString( const char *geom_shader_source
...
@@ -399,7 +424,7 @@ bool GLSLShader::loadGeometryShaderSourceString( const char *geom_shader_source
*m_geom_shader_object=0;
*m_geom_shader_object=0;
}
}
/*** create shader object ***/
/*** create shader object ***/
*m_geom_shader_object = glCreateShader(GL_GEOMETRY_SHADER
_EXT
);
*m_geom_shader_object = glCreateShader(GL_GEOMETRY_SHADER);
if( !*m_geom_shader_object )
if( !*m_geom_shader_object )
{
{
...
...
src/Utils/Qt/qtgl.cpp
View file @
de622e31
...
@@ -193,7 +193,6 @@ glm::vec3& GLWidget::getObjPos()
...
@@ -193,7 +193,6 @@ glm::vec3& GLWidget::getObjPos()
void GLWidget::initializeGL()
void GLWidget::initializeGL()
{
{
std
::
cout
<<
"GL VERSION = "
<<
glGetString
(
GL_VERSION
)
<<
std
::
endl
;
glEnable(GL_DEPTH_TEST);
glEnable(GL_DEPTH_TEST);
if (m_cbs)
if (m_cbs)
...
...
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