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
OpenFlipper-Free
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
23
Issues
23
List
Boards
Labels
Service Desk
Milestones
Merge Requests
5
Merge Requests
5
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenFlipper-Free
OpenFlipper-Free
Commits
b835f85f
Commit
b835f85f
authored
Jul 06, 2016
by
Max Lyon
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into OVMv2betacompatibility
parents
badbac66
231a17cf
Pipeline
#2273
canceled with stage
in 11 minutes and 28 seconds
Changes
85
Pipelines
1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
85 changed files
with
1070 additions
and
10828 deletions
+1070
-10828
.gitlab-ci.yml
.gitlab-ci.yml
+3
-0
ACG/CMakeLists.txt
ACG/CMakeLists.txt
+11
-1
ACG/GL/AntiAliasing.cc
ACG/GL/AntiAliasing.cc
+0
-3
ACG/GL/FBO.cc
ACG/GL/FBO.cc
+4
-0
ACG/GL/GLFormatInfo.cc
ACG/GL/GLFormatInfo.cc
+6
-5
ACG/GL/GLState.cc
ACG/GL/GLState.cc
+2
-2
ACG/GL/IRenderer.cc
ACG/GL/IRenderer.cc
+2
-2
ACG/GL/RenderObject.hh
ACG/GL/RenderObject.hh
+2
-2
ACG/GL/ScreenQuad.cc
ACG/GL/ScreenQuad.cc
+7
-0
ACG/GL/acg_glew.hh
ACG/GL/acg_glew.hh
+12
-5
ACG/GL/gl.hh
ACG/GL/gl.hh
+4
-1
ACG/GL/gl_compat_4_4.cc
ACG/GL/gl_compat_4_4.cc
+0
-4514
ACG/GL/gl_compat_4_4.hh
ACG/GL/gl_compat_4_4.hh
+0
-5761
ACG/GL/globjects.cc
ACG/GL/globjects.cc
+0
-1
ACG/QtWidgets/QtBaseViewer.cc
ACG/QtWidgets/QtBaseViewer.cc
+2
-4
ACG/QtWidgets/QtMaterialDialog.cc
ACG/QtWidgets/QtMaterialDialog.cc
+38
-12
ACG/QtWidgets/QtMaterialDialog.hh
ACG/QtWidgets/QtMaterialDialog.hh
+3
-2
ACG/QtWidgets/QtMaterialDialogUi.ui
ACG/QtWidgets/QtMaterialDialogUi.ui
+68
-8
ACG/Scenegraph/MeshNode2T.cc
ACG/Scenegraph/MeshNode2T.cc
+27
-10
ACG/Scenegraph/TextureNode.cc
ACG/Scenegraph/TextureNode.cc
+4
-1
ACG/tests/Geometry/BSP/BSP_test.cc
ACG/tests/Geometry/BSP/BSP_test.cc
+12
-6
CMakeLists.txt
CMakeLists.txt
+18
-3
ObjectTypes/BSplineSurface/BSplineSurfaceNodeT.cc
ObjectTypes/BSplineSurface/BSplineSurfaceNodeT.cc
+9
-6
ObjectTypes/BSplineSurface/BSplineSurfaceNodeT.hh
ObjectTypes/BSplineSurface/BSplineSurfaceNodeT.hh
+3
-1
ObjectTypes/BSplineSurface/BSplineSurfaceObject.cc
ObjectTypes/BSplineSurface/BSplineSurfaceObject.cc
+6
-0
ObjectTypes/PolyLine/PolyLineNodeT.cc
ObjectTypes/PolyLine/PolyLineNodeT.cc
+90
-8
ObjectTypes/Skeleton/SkeletonNodeT.cc
ObjectTypes/Skeleton/SkeletonNodeT.cc
+2
-2
OpenFlipper/BasePlugin/ToolboxInterface.hh
OpenFlipper/BasePlugin/ToolboxInterface.hh
+12
-0
OpenFlipper/Core/Core.cc
OpenFlipper/Core/Core.cc
+7
-1
OpenFlipper/Core/Core.hh
OpenFlipper/Core/Core.hh
+4
-0
OpenFlipper/Core/PluginInfo.hh
OpenFlipper/Core/PluginInfo.hh
+5
-0
OpenFlipper/Core/PluginLoader.cc
OpenFlipper/Core/PluginLoader.cc
+5
-1
OpenFlipper/Core/scripting.cc
OpenFlipper/Core/scripting.cc
+7
-39
OpenFlipper/CoreApp/CMakeLists.txt
OpenFlipper/CoreApp/CMakeLists.txt
+10
-0
OpenFlipper/Documentation/DeveloperHelpSources/building.docu
OpenFlipper/Documentation/DeveloperHelpSources/building.docu
+1
-0
OpenFlipper/Icons-Source/SVG/preferences.svg
OpenFlipper/Icons-Source/SVG/preferences.svg
+78
-0
OpenFlipper/Icons/preferences.png
OpenFlipper/Icons/preferences.png
+0
-0
OpenFlipper/OpenFlipper.cc
OpenFlipper/OpenFlipper.cc
+6
-2
OpenFlipper/PluginLib/CMakeLists.txt
OpenFlipper/PluginLib/CMakeLists.txt
+6
-0
OpenFlipper/cmake/common.cmake
OpenFlipper/cmake/common.cmake
+2
-0
OpenFlipper/cmake/plugin.cmake
OpenFlipper/cmake/plugin.cmake
+35
-3
OpenFlipper/common/glew_wrappers.cc
OpenFlipper/common/glew_wrappers.cc
+8
-15
OpenFlipper/common/glew_wrappers.hh
OpenFlipper/common/glew_wrappers.hh
+2
-2
OpenFlipper/widgets/coreWidget/About.cc
OpenFlipper/widgets/coreWidget/About.cc
+3
-5
OpenFlipper/widgets/coreWidget/CoreWidget.cc
OpenFlipper/widgets/coreWidget/CoreWidget.cc
+40
-13
OpenFlipper/widgets/coreWidget/CoreWidget.hh
OpenFlipper/widgets/coreWidget/CoreWidget.hh
+11
-6
OpenFlipper/widgets/coreWidget/SideArea.cc
OpenFlipper/widgets/coreWidget/SideArea.cc
+4
-13
OpenFlipper/widgets/coreWidget/SideArea.hh
OpenFlipper/widgets/coreWidget/SideArea.hh
+3
-8
OpenFlipper/widgets/coreWidget/SideElement.cc
OpenFlipper/widgets/coreWidget/SideElement.cc
+23
-4
OpenFlipper/widgets/coreWidget/SideElement.hh
OpenFlipper/widgets/coreWidget/SideElement.hh
+6
-2
OpenFlipper/widgets/coreWidget/viewMode.cc
OpenFlipper/widgets/coreWidget/viewMode.cc
+5
-19
OpenFlipper/widgets/glWidget/QtGLGraphicsScene.cc
OpenFlipper/widgets/glWidget/QtGLGraphicsScene.cc
+2
-4
OpenFlipper/widgets/glWidget/simpleGLGraphicsScene.cc
OpenFlipper/widgets/glWidget/simpleGLGraphicsScene.cc
+2
-2
OpenFlipper/widgets/optionsWidget/downloader.cc
OpenFlipper/widgets/optionsWidget/downloader.cc
+16
-7
OpenFlipper/widgets/optionsWidget/optionsWidget.cc
OpenFlipper/widgets/optionsWidget/optionsWidget.cc
+1
-4
OpenFlipper/widgets/optionsWidget/optionsWidget.hh
OpenFlipper/widgets/optionsWidget/optionsWidget.hh
+1
-1
OpenFlipper/widgets/viewModeWidget/viewModeChange.ui
OpenFlipper/widgets/viewModeWidget/viewModeChange.ui
+36
-39
OpenFlipper/widgets/viewModeWidget/viewModeChangeWidget.cc
OpenFlipper/widgets/viewModeWidget/viewModeChangeWidget.cc
+14
-10
OpenFlipper/widgets/viewModeWidget/viewModeChangeWidget.hh
OpenFlipper/widgets/viewModeWidget/viewModeChangeWidget.hh
+12
-2
Plugin-Datacontrol/DataControlPlugin.cc
Plugin-Datacontrol/DataControlPlugin.cc
+33
-24
Plugin-Datacontrol/DataControlPlugin.hh
Plugin-Datacontrol/DataControlPlugin.hh
+4
-2
Plugin-Datacontrol/toolbox.ui
Plugin-Datacontrol/toolbox.ui
+44
-115
Plugin-HoleFilling/HoleFillerPlugin.cc
Plugin-HoleFilling/HoleFillerPlugin.cc
+19
-16
Plugin-HoleFilling/HoleFillerPlugin.hh
Plugin-HoleFilling/HoleFillerPlugin.hh
+1
-1
Plugin-PolyLine/PolyLinePlugin.cc
Plugin-PolyLine/PolyLinePlugin.cc
+1
-1
Plugin-PolyLine/PolyLinePlugin_BezierSpline.cc
Plugin-PolyLine/PolyLinePlugin_BezierSpline.cc
+2
-1
Plugin-PolyLine/PolyLinePlugin_Circle.cc
Plugin-PolyLine/PolyLinePlugin_Circle.cc
+2
-1
Plugin-PropertyVis/PropertyVisualizer.cc
Plugin-PropertyVis/PropertyVisualizer.cc
+3
-3
Plugin-PropertyVis/SingleObjectPropertyModel.cc
Plugin-PropertyVis/SingleObjectPropertyModel.cc
+2
-1
Plugin-Scripting/ScriptingPlugin.cc
Plugin-Scripting/ScriptingPlugin.cc
+3
-0
Plugin-TextureControl/CMakeLists.txt
Plugin-TextureControl/CMakeLists.txt
+4
-0
Plugin-TextureControl/TextureControl.cc
Plugin-TextureControl/TextureControl.cc
+81
-41
Plugin-TextureControl/TextureControl.hh
Plugin-TextureControl/TextureControl.hh
+5
-1
Plugin-ViewControl/ViewControlPlugin.cc
Plugin-ViewControl/ViewControlPlugin.cc
+1
-1
PluginCollection-Renderers/Plugin-Render-Old-DepthPeeling/ClassicDepthPeeling_glew.cc
...lugin-Render-Old-DepthPeeling/ClassicDepthPeeling_glew.cc
+0
-4
cmake/ACGCommon.cmake
cmake/ACGCommon.cmake
+102
-48
cmake/ACGDoxygen.cmake
cmake/ACGDoxygen.cmake
+2
-0
cmake/FindEIGEN3.cmake
cmake/FindEIGEN3.cmake
+1
-0
cmake/FindGLEW.cmake
cmake/FindGLEW.cmake
+4
-2
cmake/FindGMM.cmake
cmake/FindGMM.cmake
+8
-0
cmake/FindQwt6.cmake
cmake/FindQwt6.cmake
+2
-2
cmake/MSVCMacros.cmake
cmake/MSVCMacros.cmake
+40
-0
libs_required/OpenMesh
libs_required/OpenMesh
+1
-1
tests/MinimalExecutionTest/CMakeLists.txt
tests/MinimalExecutionTest/CMakeLists.txt
+1
-1
tests/compareTool/CMakeLists.txt
tests/compareTool/CMakeLists.txt
+2
-0
No files found.
.gitlab-ci.yml
View file @
b835f85f
...
...
@@ -47,3 +47,6 @@ cppcheck:
tags
:
-
Linux
-
MultiThreads
artifacts
:
paths
:
-
cppcheck.log
ACG/CMakeLists.txt
View file @
b835f85f
...
...
@@ -27,12 +27,17 @@ endif ()
acg_openmp
()
# check for OpenGL and GLUT as our required dependencies
# check for OpenGL
, GLEW
and GLUT as our required dependencies
find_package
(
OpenGL
)
if
(
NOT OPENGL_FOUND
)
message
(
FATAL_ERROR
"OpengGL not found!"
)
endif
()
find_package
(
GLEW
)
if
(
NOT GLEW_FOUND
)
message
(
FATAL_ERROR
"GLEW not found!"
)
endif
()
find_package
(
GLUT
)
if
(
NOT GLUT_FOUND
)
message
(
FATAL_ERROR
"GLUT not found!"
)
...
...
@@ -48,6 +53,7 @@ set(INCLUDE_DIRS ${OPENMESH_INCLUDE_DIRS}
${
CMAKE_CURRENT_SOURCE_DIR
}
/ShaderUtils
${
CMAKE_CURRENT_BINARY_DIR
}
${
OPENGL_INCLUDE_DIR
}
${
GLEW_INCLUDE_DIR
}
${
GLUT_INCLUDE_DIR
}
)
set
(
ADDITIONAL_LINK_LIBRARIES
""
)
...
...
@@ -84,6 +90,7 @@ include_directories (
)
link_directories
(
${
GLEW_LIBRARY_DIR
}
${
GLUT_LIBRARY_DIR
}
)
...
...
@@ -149,9 +156,12 @@ endif ()
# display results
acg_print_configure_header
(
ACG
"ACG"
)
RECURSE_GROUPS
(
${
CMAKE_CURRENT_SOURCE_DIR
}
)
target_link_libraries
(
ACG
${
OPENMESH_LIBRARIES
}
${
QT_LIBRARIES
}
${
OPENGL_LIBRARIES
}
${
GLEW_LIBRARY
}
${
GLUT_LIBRARIES
}
${
ADDITIONAL_LINK_LIBRARIES
}
)
...
...
ACG/GL/AntiAliasing.cc
View file @
b835f85f
...
...
@@ -126,13 +126,10 @@ MSFilterWeights::MSFilterWeights(int _numSamples) : numSamples_(_numSamples) {
//=============================================================================
#if defined(GL_ARB_texture_buffer_object)
void
MSFilterWeights
::
asTextureBuffer
(
TextureBuffer
&
out
)
{
if
(
numSamples_
)
out
.
setBufferData
(
numSamples_
*
4
,
&
weights_
[
0
],
GL_R32F
,
GL_STATIC_DRAW
);
}
#endif
//=============================================================================
...
...
ACG/GL/FBO.cc
View file @
b835f85f
...
...
@@ -125,6 +125,7 @@ void FBO::del()
void
FBO
::
attachTexture
(
GLenum
_attachment
,
GLuint
_texture
,
GLuint
_level
)
{
#ifdef GL_VERSION_3_2
// bind fbo
bind
();
...
...
@@ -154,6 +155,9 @@ void FBO::attachTexture( GLenum _attachment, GLuint _texture, GLuint _level )
// track texture id
attachments_
[
_attachment
]
=
intID
;
#else
std
::
cerr
<<
"error: FBO::attachTexture unsupported - update glew headers and rebuild"
<<
std
::
endl
;
#endif
}
//-----------------------------------------------------------------------------
...
...
ACG/GL/GLFormatInfo.cc
View file @
b835f85f
...
...
@@ -47,7 +47,6 @@
* *
\*===========================================================================*/
#include <ACG/GL/acg_glew.hh>
#include <ACG/GL/GLFormatInfo.hh>
#include <iostream>
#include <QString>
...
...
@@ -82,6 +81,7 @@ GLFormatInfo::GLFormatInfo( GLenum _internalFormat )
registerFmt
(
GL_DEPTH_STENCIL
,
GL_DEPTH_STENCIL
,
GL_UNSIGNED_INT_24_8
,
24
,
8
,
0
,
0
,
UnsignedInt
,
false
);
registerFmt
(
GL_DEPTH24_STENCIL8
,
GL_DEPTH_STENCIL
,
GL_UNSIGNED_INT_24_8
,
24
,
8
,
0
,
0
,
UnsignedInt
,
false
);
#ifdef GL_VERSION_3_0
// single channel formats
registerFmt
(
GL_R8
,
GL_RED
,
GL_UNSIGNED_BYTE
,
8
,
0
,
0
,
0
,
UnsignedInt
,
true
);
registerFmt
(
GL_R8_SNORM
,
GL_RED
,
GL_BYTE
,
8
,
0
,
0
,
0
,
SignedInt
,
true
);
...
...
@@ -130,18 +130,19 @@ GLFormatInfo::GLFormatInfo( GLenum _internalFormat )
registerFmt
(
GL_RGBA32I
,
GL_RGBA_INTEGER
,
GL_INT
,
32
,
32
,
32
,
32
,
SignedInt
,
false
);
registerFmt
(
GL_RGBA32UI
,
GL_RGBA_INTEGER
,
GL_UNSIGNED_INT
,
32
,
32
,
32
,
32
,
UnsignedInt
,
false
);
registerFmt
(
GL_RGBA32F
,
GL_RGBA
,
GL_FLOAT
,
32
,
32
,
32
,
32
,
FloatingPt
,
false
);
#endif // GL_VERSION_3_0
// depth
registerFmt
(
GL_DEPTH_COMPONENT24
,
GL_DEPTH_COMPONENT
,
GL_UNSIGNED_INT
,
24
,
0
,
0
,
0
,
UnsignedInt
,
false
);
registerFmt
(
GL_DEPTH_COMPONENT16
,
GL_DEPTH_COMPONENT
,
GL_UNSIGNED_SHORT
,
16
,
0
,
0
,
0
,
UnsignedInt
,
false
);
#ifdef GL_
DEPTH_COMPONENT32F
#ifdef GL_
ARB_depth_buffer_float
registerFmt
(
GL_DEPTH_COMPONENT32F
,
GL_DEPTH_COMPONENT
,
GL_FLOAT
,
32
,
0
,
0
,
0
,
FloatingPt
,
false
);
registerFmt
(
GL_DEPTH32F_STENCIL8
,
GL_DEPTH_STENCIL
,
GL_FLOAT_32_UNSIGNED_INT_24_8_REV
,
32
,
8
,
-
24
,
0
,
FloatingPt
,
false
);
#endif
#endif
// GL_ARB_depth_buffer_float
#ifdef GL_
STENCIL_INDEX
8
#ifdef GL_
ARB_texture_stencil
8
registerFmt
(
GL_STENCIL_INDEX8
,
GL_STENCIL_INDEX
,
GL_UNSIGNED_BYTE
,
8
,
0
,
0
,
0
,
UnsignedInt
,
false
);
#endif
#endif
// GL_ARB_texture_stencil8
}
std
::
map
<
GLenum
,
GLFormatInfo
>::
iterator
f
=
formatMap_
.
find
(
_internalFormat
);
...
...
ACG/GL/GLState.cc
View file @
b835f85f
...
...
@@ -1327,7 +1327,7 @@ void GLState::syncFromGL()
GLint
getparam
;
#ifdef GL_
BLEND_SRC_RGB
#ifdef GL_
VERSION_1_4
glGetIntegerv
(
GL_BLEND_SRC_RGB
,
&
getparam
);
stateStack_
.
back
().
blendFuncState_
[
0
]
=
getparam
;
...
...
@@ -1611,7 +1611,7 @@ void GLState::blendFuncSeparate(GLenum _srcRGB, GLenum _dstRGB, GLenum _srcAlpha
stateStack_
.
back
().
blendFuncState_
[
2
]
!=
_srcAlpha
||
stateStack_
.
back
().
blendFuncState_
[
3
]
!=
_dstAlpha
)
#endif
{
#ifdef GL_
BLEND_SRC_RGB
#ifdef GL_
VERSION_1_4
// check if glew has loaded glBlendFuncSeparate already
if
(
glBlendFuncSeparate
)
glBlendFuncSeparate
(
_srcRGB
,
_dstRGB
,
_srcAlpha
,
_dstAlpha
);
...
...
ACG/GL/IRenderer.cc
View file @
b835f85f
...
...
@@ -316,7 +316,7 @@ void IRenderer::addRenderObject(ACG::RenderObject* _renderObject)
p
->
internalFlags_
=
0
;
// precompile shader
#ifdef GL_
GEOMETRY_INPUT_TYPE
#ifdef GL_
VERSION_3_2
GLSL
::
Program
*
shaderProg
=
ACG
::
ShaderCache
::
getInstance
()
->
getProgram
(
&
p
->
shaderDesc
);
#endif
...
...
@@ -324,7 +324,7 @@ void IRenderer::addRenderObject(ACG::RenderObject* _renderObject)
// check primitive type and geometry shader
if
(
errorDetectionLevel_
>
1
&&
p
->
shaderDesc
.
geometryTemplateFile
.
length
())
{
#ifdef GL_
GEOMETRY_INPUT_TYPE
#ifdef GL_
VERSION_3_2
GLint
geomInputType
=
0
;
glGetProgramiv
(
shaderProg
->
getProgramId
(),
GL_GEOMETRY_INPUT_TYPE
,
&
geomInputType
);
...
...
ACG/GL/RenderObject.hh
View file @
b835f85f
...
...
@@ -371,10 +371,10 @@ public:
inline
void
glDrawArrays
(
GLenum
mode
,
GLint
first
,
GLsizei
count
)
{
this
->
glDraw
ArraysInstanced
(
mode
,
first
,
count
,
0
);
this
->
glDraw
InstancedArrays
(
mode
,
first
,
count
,
0
);
}
inline
void
glDraw
ArraysInstanced
(
GLenum
mode
,
GLint
first
,
GLsizei
count
,
GLsizei
primcount
)
inline
void
glDraw
InstancedArrays
(
GLenum
mode
,
GLint
first
,
GLsizei
count
,
GLsizei
primcount
)
{
indexBuffer
=
0
;
sysmemIndexBuffer
=
0
;
...
...
ACG/GL/ScreenQuad.cc
View file @
b835f85f
...
...
@@ -188,7 +188,14 @@ void ScreenQuad::intDraw (GLSL::Program* _prog, int _numInstances)
if
(
_numInstances
<
1
)
glDrawArrays
(
GL_TRIANGLE_STRIP
,
0
,
4
);
else
{
#ifdef GL_VERSION_3_1
glDrawArraysInstanced
(
GL_TRIANGLE_STRIP
,
0
,
4
,
_numInstances
);
#else
std
::
cerr
<<
"error: instanced ScreenQuad draw - outdated glew version"
<<
std
::
endl
;
glDrawArrays
(
GL_TRIANGLE_STRIP
,
0
,
4
);
#endif
}
if
(
_prog
)
decl_
->
deactivateShaderPipeline
(
_prog
);
...
...
ACG/GL/acg_glew.hh
View file @
b835f85f
...
...
@@ -62,13 +62,20 @@
#include <cstdlib>
#include <sstream>
#ifndef __APPLE__
#include "gl_compat_4_4.hh"
#else
#include <qgl>
#endif
#if defined(ARCH_DARWIN)
#include <gl/glew.h>
#elif defined(WIN32)
#include <gl/glew.h>
#else // Unix
#include <GL/glew.h>
#endif
//=============================================================================
...
...
ACG/GL/gl.hh
View file @
b835f85f
...
...
@@ -69,8 +69,11 @@
#elif defined(WIN32)
#include "acg_glew.hh"
#include <windows.h>
// Dont do this anymore! Use dll version. No problems with plugins and dll
// but a lot with static linking
// # define GLEW_STATIC 1
#include <gl/glew.h>
#include <gl/glut.h>
#else
...
...
ACG/GL/gl_compat_4_4.cc
deleted
100644 → 0
View file @
badbac66
This source diff could not be displayed because it is too large. You can
view the blob
instead.
ACG/GL/gl_compat_4_4.hh
deleted
100644 → 0
View file @
badbac66
This diff is collapsed.
Click to expand it.
ACG/GL/globjects.cc
View file @
b835f85f
...
...
@@ -47,7 +47,6 @@
* *
\*===========================================================================*/
#include <ACG/GL/acg_glew.hh>
#include <ACG/GL/globjects.hh>
#include <ACG/GL/GLFormatInfo.hh>
...
...
ACG/QtWidgets/QtBaseViewer.cc
View file @
b835f85f
...
...
@@ -1128,8 +1128,7 @@ void QtBaseViewer::initializeGL()
// we use GLEW to manage extensions
// initialize it first
#ifndef __APPLE__
//glewInit();
ogl_LoadFunctions
();
glewInit
();
#endif
...
...
@@ -1243,8 +1242,7 @@ void QtBaseViewer::paintGL()
// we use GLEW to manage extensions
// initialize it first
#ifndef __APPLE__
//glewInit();
ogl_LoadFunctions
();
glewInit
();
#endif
// lock update
...
...
ACG/QtWidgets/QtMaterialDialog.cc
View file @
b835f85f
...
...
@@ -126,8 +126,8 @@ QtMaterialDialog::QtMaterialDialog( QWidget * _parent,
ui_
.
shininessSlider
->
setValue
((
int
)
shine_
);
ui_
.
shininessBox
->
setValue
((
int
)
shine_
);
ui_
.
pointSizeSpinBox
->
setValue
(
(
int
)
point_size_
);
ui_
.
lineWidthSpinBox
->
setValue
(
(
int
)
line_width_
);
ui_
.
pointSizeSpinBox
->
setValue
(
point_size_
);
ui_
.
lineWidthSpinBox
->
setValue
(
line_width_
);
ui_
.
roundPointsCheckBox
->
setChecked
(
round_points_
);
ui_
.
lineSmoothCheckBox
->
setChecked
(
line_smooth_
);
ui_
.
backfaceCulling
->
setChecked
(
backfaceCulling_
);
...
...
@@ -166,8 +166,8 @@ QtMaterialDialog::QtMaterialDialog( QWidget * _parent,
connect
(
ui_
.
overlayColorButton
,
SIGNAL
(
clicked
()
),
this
,
SLOT
(
enableProperty
()
)
);
connect
(
ui_
.
shininessSlider
,
SIGNAL
(
sliderPressed
()
),
this
,
SLOT
(
enableProperty
()
)
);
connect
(
ui_
.
shininessBox
,
SIGNAL
(
valueChanged
(
int
)
),
this
,
SLOT
(
enableProperty
(
int
)
)
);
connect
(
ui_
.
pointSizeSpinBox
,
SIGNAL
(
valueChanged
(
int
)
),
this
,
SLOT
(
enableProperty
(
int
)
)
);
connect
(
ui_
.
lineWidthSpinBox
,
SIGNAL
(
valueChanged
(
int
)
),
this
,
SLOT
(
enableProperty
(
int
)
)
);
connect
(
ui_
.
pointSizeSpinBox
,
SIGNAL
(
valueChanged
(
double
)
),
this
,
SLOT
(
enableProperty
(
double
)
)
);
connect
(
ui_
.
lineWidthSpinBox
,
SIGNAL
(
valueChanged
(
double
)
),
this
,
SLOT
(
enableProperty
(
double
)
)
);
connect
(
ui_
.
roundPointsCheckBox
,
SIGNAL
(
pressed
()
),
this
,
SLOT
(
enableProperty
()
)
);
connect
(
ui_
.
lineSmoothCheckBox
,
SIGNAL
(
pressed
()
),
this
,
SLOT
(
enableProperty
()
)
);
connect
(
ui_
.
backfaceCulling
,
SIGNAL
(
pressed
()
),
this
,
SLOT
(
enableProperty
()
)
);
...
...
@@ -189,10 +189,10 @@ QtMaterialDialog::QtMaterialDialog( QWidget * _parent,
connect
(
ui_
.
shininessSlider
,
SIGNAL
(
valueChanged
(
int
)
),
this
,
SLOT
(
changeShine
(
int
)
)
);
connect
(
ui_
.
pointSizeSpinBox
,
SIGNAL
(
valueChanged
(
int
)
),
this
,
SLOT
(
changePointSize
(
int
)
)
);
connect
(
ui_
.
lineWidthSpinBox
,
SIGNAL
(
valueChanged
(
int
)
),
this
,
SLOT
(
changeLineWidth
(
int
)
)
);
connect
(
ui_
.
pointSizeSpinBox
,
SIGNAL
(
valueChanged
(
double
)
),
this
,
SLOT
(
changePointSize
(
double
)
)
);
connect
(
ui_
.
lineWidthSpinBox
,
SIGNAL
(
valueChanged
(
double
)
),
this
,
SLOT
(
changeLineWidth
(
double
)
)
);
connect
(
ui_
.
roundPointsCheckBox
,
SIGNAL
(
toggled
(
bool
)
),
this
,
SLOT
(
changeRoundPoints
(
bool
)
)
);
connect
(
ui_
.
lineSmoothCheckBox
,
SIGNAL
(
toggled
(
bool
)
),
...
...
@@ -531,9 +531,9 @@ QtMaterialDialog::changeShine(int _new)
void
QtMaterialDialog
::
changePointSize
(
int
_new
)
QtMaterialDialog
::
changePointSize
(
double
_new
)
{
point_size_
=
_new
;
point_size_
=
float
(
_new
)
;
applyChanges
();
}
...
...
@@ -542,9 +542,9 @@ QtMaterialDialog::changePointSize(int _new)
void
QtMaterialDialog
::
changeLineWidth
(
int
_new
)
QtMaterialDialog
::
changeLineWidth
(
double
_new
)
{
line_width_
=
_new
;
line_width_
=
float
(
_new
)
;
applyChanges
();
}
...
...
@@ -749,6 +749,32 @@ QtMaterialDialog::enableProperty(int /*i*/)
else
if
(
sender
()
==
ui_
.
multiSampling
)
ui_
.
multiSamplingActive
->
setChecked
(
true
);
}
//-----------------------------------------------------------------------------
void
QtMaterialDialog
::
enableProperty
(
double
d
)
{
if
(
sender
()
==
ui_
.
baseColorButton
)
ui_
.
baseColorActive
->
setChecked
(
true
);
else
if
(
sender
()
==
ui_
.
ambientColorButton
)
ui_
.
materialActive
->
setChecked
(
true
);
else
if
(
sender
()
==
ui_
.
diffuseColorButton
)
ui_
.
materialActive
->
setChecked
(
true
);
else
if
(
sender
()
==
ui_
.
specularColorButton
)
ui_
.
materialActive
->
setChecked
(
true
);
else
if
(
sender
()
==
ui_
.
overlayColorButton
)
ui_
.
materialActive
->
setChecked
(
true
);
else
if
(
sender
()
==
ui_
.
shininessSlider
)
ui_
.
materialActive
->
setChecked
(
true
);
else
if
(
sender
()
==
ui_
.
shininessBox
)
ui_
.
materialActive
->
setChecked
(
true
);
else
if
(
sender
()
==
ui_
.
pointSizeSpinBox
)
ui_
.
pointSizeActive
->
setChecked
(
true
);
else
if
(
sender
()
==
ui_
.
lineWidthSpinBox
)
ui_
.
lineWidthActive
->
setChecked
(
true
);
else
if
(
sender
()
==
ui_
.
roundPointsCheckBox
)
ui_
.
roundPointsActive
->
setChecked
(
true
);
else
if
(
sender
()
==
ui_
.
lineSmoothCheckBox
)
ui_
.
lineSmoothActive
->
setChecked
(
true
);
else
if
(
sender
()
==
ui_
.
backfaceCulling
)
ui_
.
backfaceCullingActive
->
setChecked
(
true
);
else
if
(
sender
()
==
ui_
.
alphaTest
)
ui_
.
alphaTestActive
->
setChecked
(
true
);
else
if
(
sender
()
==
ui_
.
blending
)
ui_
.
blendingActive
->
setChecked
(
true
);
else
if
(
sender
()
==
ui_
.
colorMaterial
)
ui_
.
colorMaterialActive
->
setChecked
(
true
);
else
if
(
sender
()
==
ui_
.
multiSampling
)
ui_
.
multiSamplingActive
->
setChecked
(
true
);
}
//-----------------------------------------------------------------------------
void
...
...
ACG/QtWidgets/QtMaterialDialog.hh
View file @
b835f85f
...
...
@@ -125,8 +125,8 @@ private slots:
void
changeSpecularColor
(
QColor
_newColor
);
void
changeOverlayColor
(
QColor
_newColor
);
void
changeShine
(
int
_new
);
void
changePointSize
(
int
_new
);
void
changeLineWidth
(
int
_new
);
void
changePointSize
(
double
_new
);
void
changeLineWidth
(
double
_new
);
void
changeRoundPoints
(
bool
_b
);
void
changeLineSmooth
(
bool
_b
);
void
changeBackfaceCulling
(
bool
_b
);
...
...
@@ -142,6 +142,7 @@ private slots:
void
enableProperty
();
void
enableProperty
(
int
i
);
void
enableProperty
(
double
d
);
QString
paramToStr
(
GLenum
param
);
...
...
ACG/QtWidgets/QtMaterialDialogUi.ui
View file @
b835f85f
...
...
@@ -34,7 +34,16 @@
<string>
Material
</string>
</property>
<layout
class=
"QGridLayout"
name=
"MaterialBoxLayout"
>
<property
name=
"margin"
>
<property
name=
"leftMargin"
>
<number>
9
</number>
</property>
<property
name=
"topMargin"
>
<number>
9
</number>
</property>
<property
name=
"rightMargin"
>
<number>
9
</number>
</property>
<property
name=
"bottomMargin"
>
<number>
9
</number>
</property>
<property
name=
"spacing"
>
...
...
@@ -68,7 +77,16 @@
</item>
<item
row=
"1"
column=
"1"
>
<layout
class=
"QGridLayout"
name=
"ColorButtonLayout"
>
<property
name=
"margin"
>
<property
name=
"leftMargin"
>
<number>
0
</number>
</property>
<property
name=
"topMargin"
>
<number>
0
</number>
</property>
<property
name=
"rightMargin"
>
<number>
0
</number>
</property>
<property
name=
"bottomMargin"
>
<number>
0
</number>
</property>
<property
name=
"spacing"
>
...
...
@@ -295,7 +313,16 @@
<string>
Thickness
</string>
</property>
<layout
class=
"QGridLayout"
name=
"ThicknessBoxLayout"
>
<property
name=
"margin"
>
<property
name=
"leftMargin"
>
<number>
9
</number>
</property>
<property
name=
"topMargin"
>
<number>
9
</number>
</property>
<property
name=
"rightMargin"
>
<number>
9
</number>
</property>
<property
name=
"bottomMargin"
>
<number>
9
</number>
</property>
<property
name=
"spacing"
>
...
...
@@ -306,29 +333,53 @@
<property
name=
"spacing"
>
<number>
6
</number>
</property>
<property
name=
"margin"
>
<property
name=
"leftMargin"
>
<number>
0
</number>
</property>
<property
name=
"topMargin"
>
<number>
0
</number>
</property>
<property
name=
"rightMargin"
>
<number>
0
</number>
</property>
<property
name=
"bottomMargin"
>
<number>
0
</number>
</property>
<item>
<layout
class=
"QGridLayout"
name=
"PointLayout"
>
<property
name=
"margin"
>
<property
name=
"leftMargin"
>
<number>
0
</number>
</property>
<property
name=
"topMargin"
>
<number>
0
</number>
</property>
<property
name=
"rightMargin"
>
<number>
0
</number>
</property>
<property
name=
"bottomMargin"
>
<number>
0
</number>
</property>
<property
name=
"spacing"
>
<number>
6
</number>
</property>
<item
row=
"0"
column=
"0"
>
<widget
class=
"QSpinBox"
name=
"pointSizeSpinBox"
>
<widget
class=
"Q
Double
SpinBox"
name=
"pointSizeSpinBox"
>
<property
name=
"alignment"
>
<set>
Qt::AlignRight
</set>
</property>
<property
name=
"minimum"
>
<double>
0.010000000000000
</double>
</property>
</widget>
</item>
<item
row=
"1"
column=
"0"
>
<widget
class=
"QSpinBox"
name=
"lineWidthSpinBox"
>
<widget
class=
"Q
Double
SpinBox"
name=
"lineWidthSpinBox"
>
<property
name=
"alignment"
>
<set>
Qt::AlignRight
</set>
</property>
<property
name=
"minimum"
>
<double>
0.010000000000000
</double>
</property>
</widget>
</item>
<item
row=
"0"
column=
"1"
>
...
...
@@ -772,7 +823,16 @@ back is visible should be rendered.</string>
<property
name=
"spacing"
>
<number>
6
</number>
</property>
<property
name=
"margin"
>
<property
name=
"leftMargin"
>
<number>
0
</number>
</property>
<property
name=
"topMargin"
>
<number>
0
</number>
</property>
<property
name=
"rightMargin"
>
<number>
0
</number>
</property>
<property
name=
"bottomMargin"
>
<number>
0
</number>
</property>
<item>
...
...
ACG/Scenegraph/MeshNode2T.cc
View file @
b835f85f
...
...
@@ -706,12 +706,6 @@ void ACG::SceneGraph::MeshNodeT<Mesh>::getRenderObjects( IRenderer* _renderer, G
// 1. setup drawMesh based on property source
if
(
props
->
flatShaded
())
drawMesh_
->
setFlatShading
();
else
drawMesh_
->
setSmoothShading
();
ro
.
shaderDesc
.
vertexColors
=
true
;
switch
(
props
->
colorSource
())
...
...
@@ -725,13 +719,23 @@ void ACG::SceneGraph::MeshNodeT<Mesh>::getRenderObjects( IRenderer* _renderer, G
}
break
;
}
switch
(
props
->
normalSource
())
// only the polygon primitives can set the normal source
if
(
props
->
primitive
()
==
DrawModes
::
PRIMITIVE_POLYGON
)
{
case
DrawModes
::
NORMAL_PER_VERTEX
:
drawMesh_
->
usePerVertexNormals
();
break
;
case
DrawModes
::
NORMAL_PER_HALFEDGE
:
drawMesh_
->
usePerHalfedgeNormals
();
break
;
default:
break
;
switch
(
props
->
normalSource
())
{
case
DrawModes
::
NORMAL_PER_VERTEX
:
drawMesh_
->
usePerVertexNormals
();
break
;
case
DrawModes
::
NORMAL_PER_HALFEDGE
:
drawMesh_
->
usePerHalfedgeNormals
();
break
;
default:
break
;
}
if
(
props
->
flatShaded
())
drawMesh_
->
setFlatShading
();
else
drawMesh_
->
setSmoothShading
();
}
ro
.
shaderDesc
.
addTextureType
(
GL_TEXTURE_2D
,
false
,
0
);
switch
(
props
->
texcoordSource
())
...
...
@@ -772,6 +776,8 @@ void ACG::SceneGraph::MeshNodeT<Mesh>::getRenderObjects( IRenderer* _renderer, G
if
(
props
->
primitive
()
==
DrawModes
::
PRIMITIVE_WIREFRAME
)
{
ro
.
debugName
=
"MeshNode.Wireframe"
;
ro
.
shaderDesc
.
shadeMode
=
SG_SHADE_UNLIT
;
drawMesh_
->
disableColors
();
...
...
@@ -812,6 +818,8 @@ void ACG::SceneGraph::MeshNodeT<Mesh>::getRenderObjects( IRenderer* _renderer, G
// disable color write
ro
.
glColorMask
(
0
,
0
,
0
,
0
);
ro
.
debugName
=
"MeshNode.HiddenLine.faces"
;
add_face_RenderObjects
(
_renderer
,
&
ro
);
}
...
...
@@ -825,6 +833,7 @@ void ACG::SceneGraph::MeshNodeT<Mesh>::getRenderObjects( IRenderer* _renderer, G
applyRenderObjectSettings
(
DrawModes
::
PRIMITIVE_HIDDENLINE
,
&
ro
);
ro
.
debugName
=
"MeshNode.HiddenLine.lines"
;
add_line_RenderObjects
(
_renderer
,
&
ro
);
}
...
...
@@ -845,6 +854,7 @@ void ACG::SceneGraph::MeshNodeT<Mesh>::getRenderObjects( IRenderer* _renderer, G
ro
.
setupLineRendering
(
_state
.
line_width
(),
Vec2f
((
float
)
_state
.
viewport_width
(),
(
float
)
_state
.
viewport_height
()));
applyRenderObjectSettings
(
props
->
primitive
(),
&
ro
);
ro
.
debugName
=
"MeshNode.Edges"
;
_renderer
->
addRenderObject
(
&
ro
);
// skip other edge primitives for this drawmode layer
...
...
@@ -872,6 +882,7 @@ void ACG::SceneGraph::MeshNodeT<Mesh>::getRenderObjects( IRenderer* _renderer, G
ro
.
setupLineRendering
(
_state
.
line_width
(),
Vec2f
((
float
)
_state
.
viewport_width
(),
(
float
)
_state
.
viewport_height
()));
applyRenderObjectSettings
(
props
->
primitive
(),
&
ro
);
ro
.
debugName
=
"MeshNode.HalfEdges"
;
_renderer
->
addRenderObject
(
&
ro
);
}
...
...
@@ -898,6 +909,7 @@ void ACG::SceneGraph::MeshNodeT<Mesh>::getRenderObjects( IRenderer* _renderer, G
ro
.
setupPointRendering
(
_mat
->
pointSize
(),
Vec2f
((
float
)
_state
.
viewport_width
(),
(
float
)
_state
.
viewport_height
()));
applyRenderObjectSettings
(
props
->
primitive
(),
&
ro
);
ro
.
debugName
=
"MeshNode.Points"
;
add_point_RenderObjects
(
_renderer
,
&
ro
);
}
break
;
case
DrawModes
::
PRIMITIVE_EDGE
:
...
...
@@ -909,6 +921,7 @@ void ACG::SceneGraph::MeshNodeT<Mesh>::getRenderObjects( IRenderer* _renderer, G
ro
.
setupLineRendering
(
_state
.
line_width
(),
Vec2f
((
float
)
_state
.
viewport_width
(),
(
float
)
_state
.
viewport_height
()));
applyRenderObjectSettings
(
props
->
primitive
(),
&
ro
);
ro
.
debugName
=
"MeshNode.Edges"
;
add_line_RenderObjects
(
_renderer
,
&
ro
);
}
break
;
case
DrawModes
::
PRIMITIVE_POLYGON
:
...
...
@@ -922,6 +935,7 @@ void ACG::SceneGraph::MeshNodeT<Mesh>::getRenderObjects( IRenderer* _renderer, G
if
(
!
useNonIndexed
&&
props
->
colorSource
()
==
DrawModes
::
COLOR_PER_FACE
)
ro
.
shaderDesc
.
vertexColorsInterpolator
=
"flat"
;
ro
.
debugName
=
"MeshNode.Faces"
;