On Wed, Nov 13, 2013 at 6:03 PM, Nitneroc <[email protected]> wrote:

> I think my way of accessing the texture id worked ok (
> sprite.image.texture.id instead of sprite._texture.id)
>

???

Modifying test_shader_examples.py by adding near the end of
TestLayer.__init__

      self.sprite = Sprite('grossini.png')
      self.textures.append(self.sprite._texture)

you can switch to the grossini visual with the up-down arrow, it shows as
it should, and switching shaders with left - right arrows works.

If I change self.sprite._texture to self.sprite.image.texture.id , I get a
traceback:
...
File "..\cocos\cocosnode.py", line 676, in visit
    self.draw()
File "test_shader_examples.py", line 70, in draw
    glBindTexture(GL_TEXTURE_2D, self.texture.id)
AttributeError: 'long' object has no attribute 'id'


, but the rest is way over my head.
> Thanks again for your help and pointers, I'll have a look at all this stuff
>

Take it easy, write simple code to exercise what you see in tutorials,
modify slightly the code in tutorials to grasp the domain.

BTW, it is a batch of sprites what you want to darken ?

-- 
You received this message because you are subscribed to the Google Groups 
"cocos2d discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/cocos-discuss.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to