Added GLX_ARB_multisample support to Pbuffers

This commit is contained in:
Elias Naur 2004-02-15 15:46:10 +00:00
parent 3122d0b1ba
commit 5c3e17c8a3
6 changed files with 21 additions and 10 deletions

View file

@ -81,9 +81,11 @@ public class Pbuffer {
* @param alpha Minimum bits per pixel in alpha buffer
* @param depth Minimum bits per pixel in depth buffer
* @param stencil Minimum bits per pixel in stencil buffer
* @param samples Minimum samples in multisample buffer (corresponds to GL_SAMPLES_ARB in GL_ARB_multisample spec).
Pass 0 to disable multisampling. This parameter is ignored if GL_ARB_multisample is not supported.
*/
public Pbuffer(int width, int height, int bpp, int alpha, int depth, int stencil) throws Exception {
handle = nCreate(width, height, bpp, alpha, depth, stencil);
public Pbuffer(int width, int height, int bpp, int alpha, int depth, int stencil, int samples) throws Exception {
handle = nCreate(width, height, bpp, alpha, depth, stencil, samples);
vbo_tracker = new VBOTracker();
}
@ -150,7 +152,8 @@ public class Pbuffer {
int bpp,
int alpha,
int depth,
int stencil) throws Exception;
int stencil,
int samples) throws Exception;
/**
* Destroys the Pbuffer. The buffer must not be current.

View file

@ -234,7 +234,7 @@ public class PbufferTest {
private void initPbuffer() {
try {
pbuffer = new Pbuffer(512, 512, mode.bpp, 0, 0, 0);
pbuffer = new Pbuffer(512, 512, mode.bpp, 0, 0, 0, 0);
pbuffer.makeCurrent();
initGLState(256, 256, 0.5f);
GL11.glBindTexture(GL11.GL_TEXTURE_2D, tex_handle);