Phua Khai Fong | 12 Aug 14:37
Favicon

Using GLLines in TUpdatingMesh


Hi,

I have a problem using the mode GLLines in a subclass of TUpdatingMesh.
There is an error when I use it and the debugger shows the error in the
below method :-

primCount: indexCount forMode: mode

    mode == GLTriangles ifTrue: [^ indexCount // 3].
    mode == GLQuads ifTrue: [^ indexCount // 4].
    mode == GLPoints ifTrue: [^ indexCount].
    mode == GLTriangleStrip ifTrue: [^ indexCount - 2].
    mode == GLTriangleFan ifTrue: [^ indexCount - 2].
    mode == GLLineStrip ifTrue: [^ indexCount - 1].

    "It's easy to add additional modes if necessary."
    self error: 'Unexpected mode'.
    ^ 0

The above method belongs to the OpenGL. I can add in another line :-

mode == GLLines ifTrue: [^indexCount // 2].

With the above line added, it works fine. My question is what can I do to
have the mode permanently there if I publish my work using the Monticello
package?
--

-- 
View this message in context: http://www.nabble.com/Using-GLLines-in-TUpdatingMesh-tp18943522p18943522.html
Sent from the Croquet - Dev mailing list archive at Nabble.com.
(Continue reading)


Gmane