Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
pcy
fnaglsl
Commits
03aca79f
Commit
03aca79f
authored
Jun 27, 2020
by
pcy
Browse files
last few fixes
parent
dfa003f7
Changes
3
Show whitespace changes
Inline
Side-by-side
Makefile
View file @
03aca79f
...
...
@@ -37,10 +37,13 @@ t: debug
TERM
=
xterm
MONO_PATH
=
"
$$
PWD/lib/:
$$
MONO_PATH"
\
LD_LIBRARY_PATH
=
"
$$
PWD/lib:
$$
LD_LIBRARY_PATH"
\
FNA_KEYBOARD_USE_SCANCODES
=
1
FNA_OPENGL_DISABLE_LATESWAPTEAR
=
1
\
FNA_OPENGL_FORCE_CORE_PROFILE
=
1
\
$(MONO)
--debug
=
mdb-optimizations
"
$(TARGET)
"
#FNA_GRAPHICS_MOJOSHADER_PROFILE=glsl120
# FNA_GRAPHICS_FORCE_GLDEVICE=ModernGLDevice \
# gdb $(MONO) -ex 'r --debug=mdb-optimizations "$(TARGET)"'
# FNA_OPENGL_FORCE_CORE_PROFILE=1 INTEL_NO_HW=1 \
# LIBGL_DEBUG=verbose MESA_DEBUG=context MESA_GLSL=useprog,errors,uniform \
# LIBGL_ALWAYS_SOFTWARE=true \
# FNA_GRAPHICS_MOJOSHADER_PROFILE=nv4 \
#
tx
:
xb
...
...
src/GLUtil.cs
View file @
03aca79f
...
...
@@ -105,6 +105,7 @@ namespace PoroCYon.FNAGLSL {
GL
.
Throw
();
GL
.
DebugMessageCallback
(
DebugCb
,
IntPtr
.
Zero
);
GL
.
Throw
();
GL
.
Enable
(
GL
.
DEBUG_OUTPUT_SYNCHRONOUS
);
GL
.
Throw
();
...
...
src/test.cs
View file @
03aca79f
...
...
@@ -85,7 +85,7 @@ class TestGame : Game {
glsl
=
new
GLSLEffect
(
GraphicsDevice
,
new
Dictionary
<
GLSLPurpose
,
string
>()
{
{
GLSLPurpose
.
VertexShader
,
"#version
41
0 core\n"
+
"#version
33
0 core\n"
+
"\n"
+
"in vec3 in_pos;\n"
+
"in vec4 in_col;\n"
+
...
...
@@ -182,17 +182,19 @@ class TestGame : Game {
GraphicsDevice
.
Clear
(
Color
.
CornflowerBlue
);
base
.
Draw
(
gt
);
//Console.WriteLine("q");
/*for (int i = 0; i < hlsl.Techniques.Count; ++i)
Console.WriteLine(String.Format("t{0}: {1}", i, hlsl.Techniques[i].Name));*/
/*
var tech = hlsl.CurrentTechnique = hlsl.Techniques[0];
var
tech
=
hlsl
.
CurrentTechnique
=
hlsl
.
Techniques
[
0
];
for
(
int
i
=
0
;
i
<
tech
.
Passes
.
Count
;
++
i
)
{
//Console.WriteLine(String.Format("p{0}: {1}", i, tech.Passes[i].Name));
tech
.
Passes
[
i
].
Apply
();
GraphicsDevice
.
DrawUserPrimitives
<
VertexType
>(
PrimitiveType.TriangleStrip, vertices_l, 0, 2, VertexType.Format);
}*/
PrimitiveType
.
TriangleStrip
,
vertices_tr
,
0
,
2
,
VertexType
.
VertexDeclaration
/*Format*/
);
}
//Console.WriteLine("r");
/*int i = 0;
foreach (var p in glsl.Parameters) {
...
...
@@ -207,7 +209,7 @@ class TestGame : Game {
using
(
var
act
=
glsl
.
Bind
())
{
GraphicsDevice
.
DrawUserPrimitives
<
VertexType
>(
PrimitiveType
.
TriangleStrip
,
vertices_
fs
,
0
,
2
,
VertexType
.
VertexDeclaration
/*Format*/
);
PrimitiveType
.
TriangleStrip
,
vertices_
bl
,
0
,
2
,
VertexType
.
VertexDeclaration
/*Format*/
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment