[GLGraphics] pixel values outside the GLTexture border
in
Contributed Library Questions
•
2 years ago
Hi, I'm having some trouble figuring out how to modify texture parameters.
I want to make my texture border's pixel values to be clamped to the edge (GL_CLAMP_TO_EDGE),
but I'm not that familiar with the native OpenGL, so I need some tips to solve the problem...
GLGraphics renderer = (GLGraphics)g;
renderer.beginGL();
GL gl = renderer.gl;
gl.glTexParameteri(gl.GL_TEXTURE_2D, gl.GL_TEXTURE_WRAP_S, gl.GL_CLAMP_TO_EDGE);
gl.glTexParameteri(gl.GL_TEXTURE_2D, gl.GL_TEXTURE_WRAP_T, gl.GL_CLAMP_TO_EDGE);
renderer.endGL();
??
GLGraphics have a class named 'GLTextureParameters', and there are these 'wrappingU', 'wrappingV' fields.
But I'm not sure what values have to be entered, or how to use this class.
Or, are there any other ways to solve this problem?
I want to make my texture border's pixel values to be clamped to the edge (GL_CLAMP_TO_EDGE),
but I'm not that familiar with the native OpenGL, so I need some tips to solve the problem...
GLGraphics renderer = (GLGraphics)g;
renderer.beginGL();
GL gl = renderer.gl;
gl.glTexParameteri(gl.GL_TEXTURE_2D, gl.GL_TEXTURE_WRAP_S, gl.GL_CLAMP_TO_EDGE);
gl.glTexParameteri(gl.GL_TEXTURE_2D, gl.GL_TEXTURE_WRAP_T, gl.GL_CLAMP_TO_EDGE);
renderer.endGL();
??
GLGraphics have a class named 'GLTextureParameters', and there are these 'wrappingU', 'wrappingV' fields.
But I'm not sure what values have to be entered, or how to use this class.
Or, are there any other ways to solve this problem?
1