Kaydet (Commit) 026e2623 authored tarafından Markus Mohrhard's avatar Markus Mohrhard

remove the GL based 3D charts

Change-Id: Ia578c71ae70aa0a85b49fa50138edf90f961b1e9
Reviewed-on: https://gerrit.libreoffice.org/57533
Tested-by: Jenkins
Reviewed-by: 's avatarMarkus Mohrhard <markus.mohrhard@googlemail.com>
üst 13660d4b
......@@ -345,9 +345,6 @@ $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \
canvastools \
chartcore \
chartcontroller \
$(if $(ENABLE_HEADLESS),, \
chartopengl \
) \
$(call gb_Helper_optional,OPENCL,clew) \
$(if $(filter $(OS),WNT),,cmdmail) \
cppcanvas \
......
......@@ -152,7 +152,7 @@ local file="$1"
*/libdesktop_detectorlo.so|*/ui-previewer|*/oosplash|*/gengal.bin)
whitelist="${whitelist} ${x11whitelist}"
;;
*/libvclplug_genlo.so|*/libchartcorelo.so|*/libavmediaogl.so|*/libOGLTranslo.so|*/liboglcanvaslo.so|*/libchartopengllo.so)
*/libvclplug_genlo.so|*/libchartcorelo.so|*/libavmediaogl.so|*/libOGLTranslo.so|*/liboglcanvaslo.so)
whitelist="${whitelist} ${x11whitelist} ${openglwhitelist}"
;;
*/libvcllo.so)
......
......@@ -47,7 +47,6 @@ DEFAULTS = \
'basic.sb' : ( 2, EXCLUDE, EXCLUDE, INCLUDE), # 10.7
'chart2.chartcontroller' : ( 6, EXCLUDE, INCLUDE, INCLUDE), # 18.4
'chart2.chartcore' : ( 3, EXCLUDE, EXCLUDE, INCLUDE), # 22.5
'chart2.chartopengl' : (12, EXCLUDE, EXCLUDE, EXCLUDE), # 5.3
'comphelper.comphelper' : ( 4, EXCLUDE, INCLUDE, INCLUDE), # 7.6
'configmgr.configmgr' : ( 6, EXCLUDE, INCLUDE, INCLUDE), # 6.0
'connectivity.ado' : ( 2, EXCLUDE, EXCLUDE, EXCLUDE), # 6.4
......
......@@ -348,18 +348,6 @@ blacklist:
chart2/source/view/inc/Linear3DTransformation.hxx:
# base class has to be a complete type
- com/sun/star/chart2/XTransformation.hpp
chart2/source/view/inc/GL3DRenderer.hxx:
# base class has to be a complete type
- boost/shared_array.hpp
- map
- vector
chart2/source/view/inc/GL3DBarChart.hxx:
# base class has to be a complete type
- deque
- memory
- vector
- GL3DPlotterBase.hxx
- vcl/idle.hxx
chart2/source/view/inc/VLineProperties.hxx:
# base class has to be a complete type
- com/sun/star/uno/Reference.h
......
......@@ -75,7 +75,6 @@ $(eval $(call gb_Library_add_exception_objects,chartcontroller,\
chart2/source/controller/chartapiwrapper/WrappedCharacterHeightProperty \
chart2/source/controller/chartapiwrapper/WrappedDataCaptionProperties \
chart2/source/controller/chartapiwrapper/WrappedGapwidthProperty \
chart2/source/controller/chartapiwrapper/WrappedGL3DProperties \
chart2/source/controller/chartapiwrapper/WrappedNumberFormatProperty \
chart2/source/controller/chartapiwrapper/WrappedScaleProperty \
chart2/source/controller/chartapiwrapper/WrappedScaleTextProperties \
......@@ -88,7 +87,6 @@ $(eval $(call gb_Library_add_exception_objects,chartcontroller,\
chart2/source/controller/chartapiwrapper/WrappedTextRotationProperty \
chart2/source/controller/dialogs/ChangingResource \
chart2/source/controller/dialogs/ChartTypeDialogController \
chart2/source/controller/dialogs/GL3DBarChartDialogController \
chart2/source/controller/dialogs/DataBrowser \
chart2/source/controller/dialogs/DataBrowserModel \
chart2/source/controller/dialogs/DialogModel \
......
......@@ -23,17 +23,10 @@ $(eval $(call gb_Library_add_defs,chartcore,\
-DOOO_DLLIMPLEMENTATION_CHARTVIEW \
))
ifeq ($(SYSTEM_GLM),TRUE)
$(eval $(call gb_Library_add_defs,chartcore,\
-DGLM_ENABLE_EXPERIMENTAL \
))
endif
$(eval $(call gb_Library_set_precompiled_header,chartcore,$(SRCDIR)/chart2/inc/pch/precompiled_chartcore))
$(eval $(call gb_Library_use_externals,chartcore,\
boost_headers \
glm_headers \
))
ifeq ($(ENABLE_HEADLESS),)
......@@ -125,14 +118,6 @@ $(eval $(call gb_Library_add_exception_objects,chartcore,\
chart2/source/view/main/VTitle \
chart2/source/view/main/VButton \
))
ifeq ($(ENABLE_HEADLESS),)
$(eval $(call gb_Library_add_exception_objects,chartcore,\
chart2/source/view/main/3DChartObjects \
chart2/source/view/main/GL3DPlotterBase \
chart2/source/view/main/GL3DRenderer \
chart2/source/view/charttypes/GL3DBarChart \
))
endif
# model pieces ...
$(eval $(call gb_Library_add_exception_objects,chartcore,\
......@@ -172,8 +157,6 @@ $(eval $(call gb_Library_add_exception_objects,chartcore,\
chart2/source/model/template/ColumnLineDataInterpreter \
chart2/source/model/template/DataInterpreter \
chart2/source/model/template/FilledNetChartType \
chart2/source/model/template/GL3DBarChartType \
chart2/source/model/template/GL3DBarChartTypeTemplate \
chart2/source/model/template/LineChartType \
chart2/source/model/template/LineChartTypeTemplate \
chart2/source/model/template/NetChartType \
......
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
#
# This file is part of the LibreOffice project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
$(eval $(call gb_Library_Library,chartopengl))
$(eval $(call gb_Library_set_include,chartopengl,\
-I$(SRCDIR)/chart2/inc \
-I$(SRCDIR)/chart2/source/model/inc \
-I$(SRCDIR)/chart2/source/view/inc \
-I$(SRCDIR)/chart2/source/inc \
$$(INCLUDE) \
))
$(eval $(call gb_Library_set_precompiled_header,chartopengl,$(SRCDIR)/chart2/inc/pch/precompiled_chartopengl))
$(eval $(call gb_Library_use_externals,chartopengl,\
boost_headers \
glm_headers \
epoxy \
))
$(eval $(call gb_Library_use_sdk_api,chartopengl))
$(eval $(call gb_Library_use_libraries,chartopengl,\
basegfx \
chartcore \
comphelper \
cppu \
cppuhelper \
drawinglayer \
editeng \
fwe \
i18nlangtag \
sal \
sfx \
svl \
svt \
svxcore \
tl \
tk \
ucbhelper \
utl \
vcl \
))
$(eval $(call gb_Library_add_exception_objects,chartopengl,\
chart2/source/view/main/OpenglShapeFactory \
chart2/source/view/main/DummyXShape \
chart2/source/view/main/OpenGLRender \
))
ifeq ($(SYSTEM_GLM),TRUE)
$(eval $(call gb_Library_add_defs,chartopengl,\
-DGLM_ENABLE_EXPERIMENTAL \
))
endif
# vim: set noet sw=4 ts=4:
......@@ -14,12 +14,6 @@ $(eval $(call gb_Module_add_targets,chart2,\
Library_chartcore \
UIConfig_chart2 \
))
ifeq ($(ENABLE_HEADLESS),)
$(eval $(call gb_Module_add_targets,chart2,\
Library_chartopengl \
Package_opengl \
))
endif
$(eval $(call gb_Module_add_l10n_targets,chart2,\
AllLangMoTarget_chart \
......
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
#
# This file is part of the LibreOffice project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
$(eval $(call gb_Package_Package,chart2_opengl_shader,$(SRCDIR)/chart2/opengl))
$(eval $(call gb_Package_add_files,chart2_opengl_shader,$(LIBO_ETC_FOLDER)/opengl,\
backgroundFragmentShader.glsl \
backgroundVertexShader.glsl \
commonFragmentShader.glsl \
commonVertexShader.glsl \
debugFragmentShader.glsl \
debugVertexShader.glsl \
pickingVertexShader.glsl \
pickingFragmentShader.glsl \
symbolFragmentShader.glsl \
symbolVertexShader.glsl \
textFragmentShader.glsl \
textVertexShader.glsl \
screenTextFragmentShader.glsl \
screenTextVertexShader.glsl \
shape3DFragmentShader.glsl \
shape3DVertexShader.glsl \
renderTextureVertexShader.glsl \
renderTextureFragmentShader.glsl \
shape3DFragmentShaderBatch.glsl \
shape3DVertexShaderBatch.glsl \
shape3DFragmentShaderV300.glsl \
shape3DVertexShaderV300.glsl \
textFragmentShaderBatch.glsl \
textVertexShaderBatch.glsl \
shape3DFragmentShaderBatchScroll.glsl \
shape3DVertexShaderBatchScroll.glsl \
))
# vim: set noet sw=4 ts=4:
......@@ -46,7 +46,6 @@
#include <com/sun/star/chart2/XChartDocument.hpp>
#include <com/sun/star/chart2/XTitled.hpp>
#include <com/sun/star/chart2/X3DChartWindowProvider.hpp>
#include <com/sun/star/frame/XLoadable.hpp>
#include <com/sun/star/datatransfer/XTransferable.hpp>
......@@ -68,7 +67,6 @@ namespace com { namespace sun { namespace star { namespace frame { class XModel;
namespace com { namespace sun { namespace star { namespace uno { class XComponentContext; } } } }
class SvNumberFormatter;
class OpenGLWindow;
namespace chart
{
......@@ -100,7 +98,6 @@ typedef cppu::WeakImplHelper<
,css::document::XDocumentPropertiesSupplier
,css::chart2::data::XDataSource
,css::document::XUndoManagerSupplier
,css::chart2::X3DChartWindowProvider
,css::util::XUpdatable
,css::qa::XDumper
>
......@@ -371,8 +368,6 @@ public:
virtual void SAL_CALL createDefaultChart() override;
virtual sal_Bool SAL_CALL isOpenGLChart() override;
// ____ XDataReceiver (public API) ____
virtual void SAL_CALL
attachDataProvider( const css::uno::Reference< css::chart2::data::XDataProvider >& xProvider ) override;
......@@ -450,9 +445,6 @@ public:
// ____ XDataSource ____ allows access to the currently used data and data ranges
virtual css::uno::Sequence< css::uno::Reference< css::chart2::data::XLabeledDataSequence > > SAL_CALL getDataSequences() override;
// X3DChartWindowProvider
virtual void SAL_CALL setWindow( sal_uInt64 nWindowPtr ) override;
// XUpdatable
virtual void SAL_CALL update() override;
......@@ -475,16 +467,9 @@ public:
void removeDataProviders();
#if HAVE_FEATURE_OPENGL
OpenGLWindow* getOpenGLWindow() { return mpOpenGLWindow;}
#endif
private:
sal_Int32 mnStart;
sal_Int32 mnEnd;
#if HAVE_FEATURE_OPENGL
VclPtr<OpenGLWindow> mpOpenGLWindow;
#endif
};
} // namespace chart
......
......@@ -54,8 +54,6 @@ namespace chart {
class VCoordinateSystem;
class DrawModelWrapper;
class VDataSeries;
class GL3DPlotterBase;
class GL2DRenderer;
struct CreateShapeParam2D;
struct TimeBasedInfo
......@@ -96,7 +94,6 @@ class ChartView : public ::cppu::WeakImplHelper<
, public ExplicitValueProvider
, private SfxListener
{
friend class GL2DRenderer;
private:
void init();
......@@ -182,14 +179,11 @@ public:
virtual OUString SAL_CALL dump() override;
void setViewDirty();
void updateOpenGLWindow();
private: //methods
void createShapes();
void createShapes2D( const css::awt::Size& rPageSize );
bool createAxisTitleShapes2D( CreateShapeParam2D& rParam, const css::awt::Size& rPageSize );
void createShapes3D();
bool isReal3DChart();
void getMetaFile( const css::uno::Reference< css::io::XOutputStream >& xOutStream
, bool bUseHighContrast );
SdrPage* getSdrPage();
......@@ -201,8 +195,6 @@ private: //methods
void impl_updateView( bool bCheckLockedCtrler = true );
void render();
css::awt::Rectangle impl_createDiagramAndContent( const CreateShapeParam2D& rParam, const css::awt::Size& rPageSize );
DECL_LINK( UpdateTimeBased, Timer*, void );
......@@ -255,10 +247,8 @@ private: //member
css::awt::Rectangle m_aResultingDiagramRectangleExcludingAxes;
std::shared_ptr<GL3DPlotterBase> m_pGL3DPlotter;
TimeBasedInfo maTimeBased;
osl::Mutex maTimeMutex;
std::unique_ptr<GL2DRenderer> mp2DRenderer;
};
}
......
......@@ -20,9 +20,7 @@
#define BMP_TYPE_STOCK "chart2/res/typestock_16.png"
#define BMP_TYPE_COLUMN_LINE "chart2/res/typecolumnline_16.png"
#define BMP_TYPE_BUBBLE "chart2/res/typebubble_16.png"
#define BMP_TYPE_GL3D_BAR "chart2/res/typegl3dbar_16.png"
#define BMP_BUBBLE_1 "chart2/res/bubble_52x60.png"
#define BMP_GL3D_BAR_ROUNDRECT "chart2/res/gl3dbar_roundrect.png"
#define BMP_AREAS_2D "chart2/res/areas_52x60.png"
#define BMP_AREAS_2D_1 "chart2/res/areaspiled_52x60.png"
#define BMP_AREAS_2D_3 "chart2/res/areasfull_52x60.png"
......
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#include "precompiled_chartopengl.hxx"
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
/*
This file has been autogenerated by update_pch.sh. It is possible to edit it
manually (such as when an include file has been moved/renamed/removed). All such
manual changes will be rewritten by the next run of update_pch.sh (which presumably
also fixes all possible problems, so it's usually better to use it).
Generated on 2017-09-20 22:51:46 using:
./bin/update_pch chart2 chartopengl --cutoff=12 --exclude:system --exclude:module --exclude:local
If after updating build fails, use the following command to locate conflicting headers:
./bin/update_pch_bisect ./chart2/inc/pch/precompiled_chartopengl.hxx "make chart2.build" --find-conflicts
*/
#include <ostream>
#include <osl/interlck.h>
#include <osl/mutex.hxx>
#include <osl/thread.hxx>
#include <rtl/instance.hxx>
#include <rtl/math.hxx>
#include <rtl/ref.hxx>
#include <rtl/stringutils.hxx>
#include <rtl/textenc.h>
#include <rtl/ustring.h>
#include <sal/config.h>
#include <sal/log.hxx>
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -184,8 +184,6 @@
#define STR_FILLED NC_("STR_FILLED", "Filled")
#define STR_TYPE_BUBBLE NC_("STR_TYPE_BUBBLE", "Bubble")
#define STR_BUBBLE_1 NC_("STR_BUBBLE_1", "Bubble Chart")
#define STR_TYPE_GL3D_BAR NC_("STR_TYPE_GL3D_BAR", "GL3D Bar")
#define STR_GL3D_BAR NC_("STR_GL3D_BAR", "GL3D Bar Chart")
#define STR_INVALID_NUMBER NC_("STR_INVALID_NUMBER", "Numbers are required. Check your input.")
#define STR_STEP_GT_ZERO NC_("STR_STEP_GT_ZERO", "The major interval requires a positive number. Check your input.")
......
......@@ -11,7 +11,6 @@
#define INCLUDED_CHART2_INC_UNONAMES_HXX
#define CHART_UNONAME_SORT_BY_XVALUES "SortByXValues"
#define CHART_UNONAME_ROUNDED_EDGE "RoundedEdge"
#define CHART_UNONAME_SPLINE_TYPE "SplineType"
#define CHART_UNONAME_SPLINE_ORDER "SplineOrder"
#define CHART_UNONAME_SPLINE_RESOLUTION "SplineResolution"
......
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#version 150 core
in vec4 fragmentColor;
void main()
{
gl_FragColor = fragmentColor;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#version 150 core
in vec3 vPosition;
uniform mat4 MVP;
in vec4 vColor;
out vec4 fragmentColor;
void main()
{
gl_Position = MVP * vec4(vPosition, 1);
fragmentColor = vColor;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#version 150 core
in vec4 fragmentColor;
out vec4 actualColor;
void main()
{
actualColor = fragmentColor;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#version 150 core
in vec3 vPosition;
uniform mat4 MVP;
uniform vec4 vColor;
out vec4 fragmentColor;
void main()
{
gl_Position = MVP * vec4(vPosition, 1);
fragmentColor = vColor;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#version 150 core
in vec4 fragmentColor;
void main()
{
gl_FragColor = vec4(1.0, 1.0, 0.0, 0.5);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#version 150 core
in vec3 vPosition;
uniform vec4 vColor;
out vec4 fragmentColor;
void main()
{
gl_Position = vec4(vPosition, 1);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#version 150 core
uniform float minCoordX;
in vec3 positionWorldspace;
in vec4 fragmentColor;
out vec4 actualColor;
void main()
{
if (positionWorldspace.x <= minCoordX)
discard;
actualColor = fragmentColor;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#version 150 core
in vec3 vPosition;
uniform mat4 MVP;
uniform mat4 M;
uniform vec4 vColor;
uniform float minCoordX;
uniform float maxCoordX;
out vec4 fragmentColor;
out vec3 positionWorldspace;
void main()
{
positionWorldspace = (M * vec4(vPosition,1)).xyz;
positionWorldspace.x = clamp(positionWorldspace.x, minCoordX, maxCoordX);
gl_Position = MVP * vec4(vPosition, 1);
fragmentColor = vColor;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#version 150 core
uniform sampler2D RenderTex;
in vec2 vTexCoord;
out vec4 actualColor;
void main()
{
actualColor = vec4(texture(RenderTex, vTexCoord).rgb, 1.0);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#version 150 core
in vec4 vPosition;
in vec2 texCoord;
out vec2 vTexCoord;
void main()
{
gl_Position = vPosition;
vTexCoord = texCoord;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#version 150 core
in vec2 vTexCoord;
uniform sampler2D TextTex;
uniform vec4 textColor;
out vec4 actualColor;
void main()
{
vec3 color = texture2D(TextTex, vTexCoord).rgb;
actualColor = ((1.0 - color.r) == 0.0) ? vec4(0.0, 0.0, 0.0, textColor.a) :
vec4(textColor.rgb, 1.0);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#version 150 core
in vec3 vPosition;
in vec2 texCoord;
out vec2 vTexCoord;
void m