Commit 03aca79f authored by pcy's avatar pcy
Browse files

last few fixes

parent dfa003f7
...@@ -37,10 +37,13 @@ t: debug ...@@ -37,10 +37,13 @@ t: debug
TERM=xterm MONO_PATH="$$PWD/lib/:$$MONO_PATH" \ TERM=xterm MONO_PATH="$$PWD/lib/:$$MONO_PATH" \
LD_LIBRARY_PATH="$$PWD/lib:$$LD_LIBRARY_PATH" \ LD_LIBRARY_PATH="$$PWD/lib:$$LD_LIBRARY_PATH" \
FNA_KEYBOARD_USE_SCANCODES=1 FNA_OPENGL_DISABLE_LATESWAPTEAR=1 \ FNA_KEYBOARD_USE_SCANCODES=1 FNA_OPENGL_DISABLE_LATESWAPTEAR=1 \
FNA_OPENGL_FORCE_CORE_PROFILE=1 \
$(MONO) --debug=mdb-optimizations "$(TARGET)" $(MONO) --debug=mdb-optimizations "$(TARGET)"
#FNA_GRAPHICS_MOJOSHADER_PROFILE=glsl120 # gdb $(MONO) -ex 'r --debug=mdb-optimizations "$(TARGET)"'
# FNA_GRAPHICS_FORCE_GLDEVICE=ModernGLDevice \
# 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 tx: xb
......
...@@ -105,6 +105,7 @@ namespace PoroCYon.FNAGLSL { ...@@ -105,6 +105,7 @@ namespace PoroCYon.FNAGLSL {
GL.Throw(); GL.Throw();
GL.DebugMessageCallback(DebugCb, IntPtr.Zero); GL.DebugMessageCallback(DebugCb, IntPtr.Zero);
GL.Throw();
GL.Enable(GL.DEBUG_OUTPUT_SYNCHRONOUS); GL.Enable(GL.DEBUG_OUTPUT_SYNCHRONOUS);
GL.Throw(); GL.Throw();
......
...@@ -85,7 +85,7 @@ class TestGame : Game { ...@@ -85,7 +85,7 @@ class TestGame : Game {
glsl = new GLSLEffect(GraphicsDevice, new Dictionary<GLSLPurpose, string>() { glsl = new GLSLEffect(GraphicsDevice, new Dictionary<GLSLPurpose, string>() {
{ GLSLPurpose.VertexShader , { GLSLPurpose.VertexShader ,
"#version 410 core\n"+ "#version 330 core\n"+
"\n"+ "\n"+
"in vec3 in_pos;\n"+ "in vec3 in_pos;\n"+
"in vec4 in_col;\n"+ "in vec4 in_col;\n"+
...@@ -182,17 +182,19 @@ class TestGame : Game { ...@@ -182,17 +182,19 @@ class TestGame : Game {
GraphicsDevice.Clear(Color.CornflowerBlue); GraphicsDevice.Clear(Color.CornflowerBlue);
base.Draw(gt); base.Draw(gt);
//Console.WriteLine("q");
/*for (int i = 0; i < hlsl.Techniques.Count; ++i) /*for (int i = 0; i < hlsl.Techniques.Count; ++i)
Console.WriteLine(String.Format("t{0}: {1}", i, hlsl.Techniques[i].Name));*/ 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) { for (int i = 0; i < tech.Passes.Count; ++i) {
//Console.WriteLine(String.Format("p{0}: {1}", i, tech.Passes[i].Name)); //Console.WriteLine(String.Format("p{0}: {1}", i, tech.Passes[i].Name));
tech.Passes[i].Apply(); tech.Passes[i].Apply();
GraphicsDevice.DrawUserPrimitives<VertexType>( 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; /*int i = 0;
foreach (var p in glsl.Parameters) { foreach (var p in glsl.Parameters) {
...@@ -207,7 +209,7 @@ class TestGame : Game { ...@@ -207,7 +209,7 @@ class TestGame : Game {
using (var act = glsl.Bind()) { using (var act = glsl.Bind()) {
GraphicsDevice.DrawUserPrimitives<VertexType>( GraphicsDevice.DrawUserPrimitives<VertexType>(
PrimitiveType.TriangleStrip, vertices_fs, 0, 2, VertexType.VertexDeclaration/*Format*/); PrimitiveType.TriangleStrip, vertices_bl, 0, 2, VertexType.VertexDeclaration/*Format*/);
} }
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment