Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
flatpak-qt-creator
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Marco Bubke
flatpak-qt-creator
Commits
614127a5
Commit
614127a5
authored
14 years ago
by
Rhys Weatherley
Browse files
Options
Downloads
Patches
Plain Diff
Use the GLSL/ES system library by default.
parent
a22fad93
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/libs/glsl/glsllexer.h
+2
-1
2 additions, 1 deletion
src/libs/glsl/glsllexer.h
src/plugins/glsleditor/glsleditorplugin.cpp
+12
-6
12 additions, 6 deletions
src/plugins/glsleditor/glsleditorplugin.cpp
src/plugins/glsleditor/glsleditorplugin.h
+3
-0
3 additions, 0 deletions
src/plugins/glsleditor/glsleditorplugin.h
with
17 additions
and
7 deletions
src/libs/glsl/glsllexer.h
+
2
−
1
View file @
614127a5
...
...
@@ -78,7 +78,8 @@ public:
Variant_VertexShader
=
0x00200000
,
Variant_FragmentShader
=
0x00400000
,
Variant_Reserved
=
0x80000000
,
Variant_Mask
=
0xFFFF0000
Variant_Mask
=
0xFFFF0000
,
Variant_All
=
0xFFFF0000
};
union
Value
{
...
...
This diff is collapsed.
Click to expand it.
src/plugins/glsleditor/glsleditorplugin.cpp
+
12
−
6
View file @
614127a5
...
...
@@ -114,6 +114,9 @@ bool GLSLEditorPlugin::initialize(const QStringList & /*arguments*/, QString *er
parseGlslFile
(
QLatin1String
(
"glsl_120.frag"
),
&
m_glsl_120_frag
);
parseGlslFile
(
QLatin1String
(
"glsl_120.vert"
),
&
m_glsl_120_vert
);
parseGlslFile
(
QLatin1String
(
"glsl_120_common.glsl"
),
&
m_glsl_120_common
);
parseGlslFile
(
QLatin1String
(
"glsl_es_100.frag"
),
&
m_glsl_es_100_frag
);
parseGlslFile
(
QLatin1String
(
"glsl_es_100.vert"
),
&
m_glsl_es_100_vert
);
parseGlslFile
(
QLatin1String
(
"glsl_es_100_common.glsl"
),
&
m_glsl_es_100_common
);
// m_modelManager = new ModelManager(this);
...
...
@@ -251,9 +254,8 @@ QByteArray GLSLEditorPlugin::glslFile(const QString &fileName)
void
GLSLEditorPlugin
::
parseGlslFile
(
const
QString
&
fileName
,
InitFile
*
initFile
)
{
const
int
variant
=
GLSL
::
Lexer
::
Variant_GLSL_Qt
|
// ### hardcoded
GLSL
::
Lexer
::
Variant_VertexShader
|
GLSL
::
Lexer
::
Variant_FragmentShader
;
// Parse the builtins for any langugage variant so we can use all keywords.
const
int
variant
=
GLSL
::
Lexer
::
Variant_All
;
const
QByteArray
code
=
glslFile
(
fileName
);
initFile
->
engine
=
new
GLSL
::
Engine
();
...
...
@@ -263,17 +265,21 @@ void GLSLEditorPlugin::parseGlslFile(const QString &fileName, InitFile *initFile
const
GLSLEditorPlugin
::
InitFile
*
GLSLEditorPlugin
::
fragmentShaderInit
()
const
{
return
&
m_glsl_120_frag
;
// TODO: select the correct language variant
//return &m_glsl_120_frag;
return
&
m_glsl_es_100_frag
;
}
const
GLSLEditorPlugin
::
InitFile
*
GLSLEditorPlugin
::
vertexShaderInit
()
const
{
return
&
m_glsl_120_vert
;
//return &m_glsl_120_vert;
return
&
m_glsl_es_100_vert
;
}
const
GLSLEditorPlugin
::
InitFile
*
GLSLEditorPlugin
::
shaderInit
()
const
{
return
&
m_glsl_120_common
;
//return &m_glsl_120_common;
return
&
m_glsl_es_100_common
;
}
Q_EXPORT_PLUGIN
(
GLSLEditorPlugin
)
This diff is collapsed.
Click to expand it.
src/plugins/glsleditor/glsleditorplugin.h
+
3
−
0
View file @
614127a5
...
...
@@ -115,6 +115,9 @@ private:
InitFile
m_glsl_120_frag
;
InitFile
m_glsl_120_vert
;
InitFile
m_glsl_120_common
;
InitFile
m_glsl_es_100_frag
;
InitFile
m_glsl_es_100_vert
;
InitFile
m_glsl_es_100_common
;
};
}
// namespace Internal
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment