Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
glow-samples
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
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
Julian Schakib
glow-samples
Commits
d8c61f23
Commit
d8c61f23
authored
5 years ago
by
Philip Trettner
Browse files
Options
Downloads
Patches
Plain Diff
new uniform system
parent
571e16a1
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
extern/glow
+1
-1
1 addition, 1 deletion
extern/glow
extern/typed-geometry
+1
-1
1 addition, 1 deletion
extern/typed-geometry
tests/glow/uniforms.cc
+13
-0
13 additions, 0 deletions
tests/glow/uniforms.cc
with
15 additions
and
2 deletions
glow
@
4dc614d6
Subproject commit 4
4e230db0cc299666a85f088f01bca1355c0d2aa
Subproject commit 4
dc614d68c0eb5b65e5d605720a51aca12541d0e
This diff is collapsed.
Click to expand it.
typed-geometry
@
b694f841
Subproject commit b
841da8247d26dc30a8f634188f4fca9960b9558
Subproject commit b
694f841b56ad8d95c7a4a58f6efaa4081ad2fd6
This diff is collapsed.
Click to expand it.
tests/glow/uniforms.cc
+
13
−
0
View file @
d8c61f23
...
...
@@ -28,6 +28,7 @@ TEST_CASE("glow uniform interface")
uniform bool uBools[5];
uniform vec3 uColor3s[3];
uniform uvec3 uUVec3;
uniform float uFloatCArray[4];
void main()
{
...
...
@@ -62,6 +63,10 @@ TEST_CASE("glow uniform interface")
data[i++] = uUVec3.x;
data[i++] = uUVec3.y;
data[i++] = uUVec3.z;
data[i++] = uFloatCArray[0];
data[i++] = uFloatCArray[1];
data[i++] = uFloatCArray[2];
data[i++] = uFloatCArray[3];
}
)"
);
auto
prog
=
glow
::
Program
::
create
(
csh
);
...
...
@@ -109,6 +114,9 @@ TEST_CASE("glow uniform interface")
shader
.
uniform
<
tg
::
usize3
>
(
"uUVec3"
)
=
{
13
,
14
,
15
};
float
a
[
4
]
=
{
4
,
5
,
6
,
7
};
shader
.
uniform
<
float
[]
>
(
"uFloatCArray"
)
=
a
;
shader
.
compute
(
1
);
}
...
...
@@ -156,5 +164,10 @@ TEST_CASE("glow uniform interface")
CHECK
(
data
[
i
++
]
==
13
);
CHECK
(
data
[
i
++
]
==
14
);
CHECK
(
data
[
i
++
]
==
15
);
// uFloatCArray
CHECK
(
data
[
i
++
]
==
4
);
CHECK
(
data
[
i
++
]
==
5
);
CHECK
(
data
[
i
++
]
==
6
);
CHECK
(
data
[
i
++
]
==
7
);
}
}
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