fix shader

This commit is contained in:
Thomas Hansen 2010-11-05 19:29:00 -05:00
parent 075c8cd7b6
commit 50ef944c75
2 changed files with 10 additions and 4 deletions

View File

@ -19,11 +19,18 @@ from graphics_shader cimport Shader
from graphics_context cimport GraphicContext
from graphics_matrix cimport MatrixStack
#tesselation of complex polygons
from kivy.c_ext.p2t import CDT, Point
#TODO: write matrix transforms in c or cython
from kivy.lib.transformations import matrix_multiply, identity_matrix, \
rotation_matrix, translation_matrix, scale_matrix
from kivy.logger import Logger
cdef class Canvas
cdef class GraphicContext
cdef class GraphicInstruction
@ -104,7 +111,7 @@ cdef class Canvas:
self.compile_init()
print "starting compile"
Logger.debug("starting compile")
for i in xrange(len(self._batch)):
item = self._batch[i]
@ -135,7 +142,7 @@ cdef class Canvas:
cdef compile_slice(self, str command, slice_start, slice_end):
print "compiling slice:", slice_start, slice_end, command
Logger.debug("compiling slice:", slice_start, slice_end, command)
cdef VertexDataInstruction item
cdef Buffer b = Buffer(sizeof(GLint))
cdef int v, i

View File

@ -15,6 +15,5 @@ varying vec2 tex_coord2;
uniform sampler2D texture0;
void main (void){
float d = 1.0 -length(tex_coord2.xy);
gl_FragColor = frag_color.xyza * texture2D(texture0, tex_coord0);
gl_FragColor = frag_color * texture2D(texture0, tex_coord0);
}