problem with "glu.gluBuild2DMipmaps"

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

problem with "glu.gluBuild2DMipmaps"

tmthanhtri
I using Texture from class import com.sun.opengl.util.texture.Texture;
How using glu.gluBuild2DMipmaps(..) for this Texture ?
Because last parameter of gluBuild2DMipmaps is data image.
So class Texture not have method get data image

example :
Texture mTex;

glu.gluBuild2DMipmaps(GL.GL_TEXTURE_2D, GL.GL_RGB,mTex.getWidth(), mTex.getHeight(), GL.GL_RGB, GL.GL_UNSIGNED_BYTE,
 mTex.?? // Problem here
);

Please hlep me.
Reply | Threaded
Open this post in threaded view
|

Re: problem with "glu.gluBuild2DMipmaps"

gouessej
Administrator
Hi

At first, please switch to JOGL 2.0 as JOGL 1 is no more maintained. Secondly, don't forget to use GLUgl2 instead of GLU. Thirdly, create a TextureData with TextureIO, then create a Texture with this TextureData and use TextureData.getBuffer() with gluBuild2DMipmaps. Look at the Java documentation if you don't see what I mean.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: problem with "glu.gluBuild2DMipmaps"

Chris
You will find some good information and examples here
http://www.guyford.co.uk/showpage.php?id=121&page=Using_MIP_Mapped_Textures_in_JOGL

they also have a jogl section with many tutorials

http://www.guyford.co.uk/getpage.php?page=jogl
Reply | Threaded
Open this post in threaded view
|

Re: problem with "glu.gluBuild2DMipmaps"

gouessej
Administrator
Chris, your tutorials still uses JOGL 1, they are obsolete. Please can you update them (switch to JOGL 2.0) to avoid any confusion, especially for beginners?
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: problem with "glu.gluBuild2DMipmaps"

tmthanhtri
thank for all help me