gsdx-ogl: linux only

* Was easy, I forgot to set the type of the buffer.
* align shader change too


git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl@5071 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
gregory.hainaut 2012-01-15 18:11:48 +00:00
parent 86a9910027
commit e0004b5027
2 changed files with 10 additions and 8 deletions

View File

@ -313,7 +313,7 @@ class GSVertexBufferStateOGL {
{ {
m_start = 0; m_start = 0;
m_limit = new_limit; m_limit = new_limit;
glBufferData(GL_ARRAY_BUFFER, m_limit * m_stride, NULL, GL_STREAM_DRAW); glBufferData(m_target, m_limit * m_stride, NULL, GL_STREAM_DRAW);
} }
void bind() void bind()
@ -383,6 +383,11 @@ class GSVertexBufferStateOGL {
size_t GetStart() { return m_start; } size_t GetStart() { return m_start; }
void debug()
{
fprintf(stderr, "data buffer: start %d, count %d\n", m_start, m_count);
}
} *m_vb, *m_ib; } *m_vb, *m_ib;
GLuint m_va; GLuint m_va;
@ -504,27 +509,24 @@ public:
void debug() void debug()
{ {
uint32 element = 0;
string topo; string topo;
switch (m_topology) { switch (m_topology) {
case GL_POINTS: case GL_POINTS:
//element = m_count;
topo = "point"; topo = "point";
break; break;
case GL_LINES: case GL_LINES:
//element = m_count/2;
topo = "line"; topo = "line";
break; break;
case GL_TRIANGLES: case GL_TRIANGLES:
//element = m_count/3;
topo = "triangle"; topo = "triangle";
break; break;
case GL_TRIANGLE_STRIP: case GL_TRIANGLE_STRIP:
//element = m_count - 2;
topo = "triangle strip"; topo = "triangle strip";
break; break;
} }
fprintf(stderr, "%d primitives of %s\n", element, topo.c_str()); m_vb->debug();
m_ib->debug();
fprintf(stderr, "primitives of %s\n", topo.c_str());
} }
}; };

View File

@ -117,7 +117,7 @@ void vs_main()
} }
VSout.c = i_c; VSout.c = i_c;
VSout.t.z = i_f.a; VSout.t.z = i_f.r;
} }
#endif #endif