Hola Gente

Tengo un problema con la demo de openGL , el tema esta en que las texturas no 
son borradas adecuadamente.
Lo primero que quiero ver es si estoy definiendo bien los tipos de la función.

Para crear una textura se usa esto:

OpenGLLibrary>>glGenTextures: n textures: textures 
    " Generate texture names  
void glGenTextures(    GLsizei      n, GLuint *      textures);

 n:             Specifies the number of texture names to be 
generated.                
textures:  Specifies an array in which the generated texture names are stored."

    <stdcall: void glGenTextures sdword dword*>
    ^self invalidCall

Para borrar una textura se usa esto:

OpenGLLibrary>>glDeleteTextures: n textures: textures 
    " Delete named textures
 void glDeleteTextures(    GLsizei      n,     const GLuint *      textures);"

    <stdcall: void glDeleteTextures sdword dword*>
    ^self invalidCall

Donde GLuint* es:

typedef unsigned int GLuint;

Cuando creo una textura uso algo así:

|textureObject|
textureObject:= DWORD new.
y le paso esto a la función así:

OpenGLLibrary>>generateTextureNameFor: textureObject
    " Generate texture name for textureObject"
 
    self
        glGenTextures: 1 textures: textureObject yourAddress ;
        checkError

Luego para borrar así:

deleteTexture: textureIndex 
    "Delete a texture"

    self
        glDeleteTextures: 1 textures: textureIndex yourAddress  ;
        checkError


Primero es correcto  el tipo de dato que use ?
Es correcto pasar la dirección ?
Encontré que  en algunos lugares se pasa la dirección y en otros directamente .

ES muy raro pues algunas las borra y otras no !

saludos kiko




      

-- 
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]

http://www.clubSmalltalk.org

Responder a