Skip to content

Commit

Permalink
wasm: fix shaders
Browse files Browse the repository at this point in the history
  • Loading branch information
huxingyi committed Aug 26, 2023
1 parent c1b4c6e commit ad3c8bf
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 8 deletions.
4 changes: 3 additions & 1 deletion application/shaders/model.frag
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#version 110
#version 100
precision highp float;
precision highp int;
uniform sampler2D environmentIrradianceMapId[6];
uniform sampler2D environmentSpecularMapId[6];
uniform sampler2D textureId;
Expand Down
2 changes: 1 addition & 1 deletion application/shaders/model.vert
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#version 110
#version 100
attribute vec4 vertex;
attribute vec3 normal;
attribute vec3 color;
Expand Down
4 changes: 3 additions & 1 deletion application/shaders/monochrome.frag
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#version 110
#version 100
precision highp float;
precision highp int;
varying vec3 pointPosition;
varying vec3 pointColor;
varying float pointAlpha;
Expand Down
2 changes: 1 addition & 1 deletion application/shaders/monochrome.vert
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#version 110
#version 100
attribute vec4 vertex;
attribute vec3 color;
attribute float alpha;
Expand Down
8 changes: 4 additions & 4 deletions application/sources/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ int main(int argc, char* argv[])
{
QApplication app(argc, argv);

QSurfaceFormat format = QSurfaceFormat::defaultFormat();
format.setProfile(QSurfaceFormat::OpenGLContextProfile::CoreProfile);
format.setVersion(3, 3);
QSurfaceFormat::setDefaultFormat(format);
//QSurfaceFormat format = QSurfaceFormat::defaultFormat();
//format.setProfile(QSurfaceFormat::OpenGLContextProfile::CoreProfile);
//format.setVersion(3, 3);
//QSurfaceFormat::setDefaultFormat(format);

Theme::initialize();

Expand Down

0 comments on commit ad3c8bf

Please sign in to comment.