Bugzilla – Attachment 394 Details for
Bug 651
GL_INVALID_ENUM raised with glGetInteger(GL_MAX_TEXTURE_IMAGE_UNITS, ...) w/ Mesa3D 9.0
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
Log In
[x]
|
Forgot Password
Login:
[x]
CheckUnits program
CheckUnits.java (text/plain), 2.99 KB, created by
Mark Raynsford
on 2012-12-08 13:00:25 CET
(
hide
)
Description:
CheckUnits program
Filename:
MIME Type:
Creator:
Mark Raynsford
Created:
2012-12-08 13:00:25 CET
Size:
2.99 KB
patch
obsolete
>package com.io7m.jcanephora; > >import java.nio.ByteBuffer; >import java.nio.ByteOrder; > >import javax.media.opengl.DebugGL2; >import javax.media.opengl.GL; >import javax.media.opengl.GL2; >import javax.media.opengl.GL2ES2; >import javax.media.opengl.GLAutoDrawable; >import javax.media.opengl.GLCapabilities; >import javax.media.opengl.GLContext; >import javax.media.opengl.GLEventListener; >import javax.media.opengl.GLProfile; > >import com.jogamp.newt.event.WindowAdapter; >import com.jogamp.newt.event.WindowEvent; >import com.jogamp.newt.opengl.GLWindow; > >public final class CheckUnits implements GLEventListener >{ > private final GLWindow window; > > CheckUnits() > throws InterruptedException > { > final GLProfile profile = GLProfile.getGL2GL3(); > final GLCapabilities requested_caps = new GLCapabilities(profile); > requested_caps.setStencilBits(8); > requested_caps.setDepthBits(24); > requested_caps.setRedBits(8); > requested_caps.setBlueBits(8); > requested_caps.setGreenBits(8); > > this.window = GLWindow.create(requested_caps); > this.window.setSize(640, 480); > this.window.setVisible(true); > this.window.setTitle(this.getClass().getName()); > this.window.addWindowListener(new WindowAdapter() { > @Override public void windowDestroyNotify( > @SuppressWarnings("unused") final WindowEvent e) > { > System.exit(0); > } > }); > this.window.addGLEventListener(this); > > while (this.window.isVisible()) { > Thread.sleep(100); > } > } > > public static void main( > final String args[]) > throws InterruptedException > { > new CheckUnits(); > } > > @Override public void init( > final GLAutoDrawable drawable) > { > final GL2 gl = new DebugGL2(drawable.getGL().getGL2()); > > final GLContext context = drawable.getContext(); > System.out.println("VERSION_MAJOR : " + context.getGLVersionMajor()); > System.out.println("VERSION_MINOR : " + context.getGLVersionMinor()); > System.out.println(context.isGLCoreProfile()); > > System.out.println("Chosen caps : " > + this.window.getChosenGLCapabilities()); > System.out.println("INIT GL : " + gl); > System.out.println("GL_VENDOR : " + gl.glGetString(GL.GL_VENDOR)); > System.out.println("GL_RENDERER : " + gl.glGetString(GL.GL_RENDERER)); > System.out.println("GL_VERSION : " + gl.glGetString(GL.GL_VERSION)); > > final ByteBuffer buffer = > ByteBuffer.allocateDirect(4).order(ByteOrder.nativeOrder()); > gl.glGetIntegerv(GL2ES2.GL_MAX_TEXTURE_IMAGE_UNITS, buffer.asIntBuffer()); > > final int count = buffer.getInt(0); > System.out.println("GL_MAX_TEXTURE_IMAGE_UNITS: " + count); > } > > @Override public void dispose( > final GLAutoDrawable drawable) > { > // TODO Auto-generated method stub > } > > @Override public void display( > final GLAutoDrawable drawable) > { > // TODO Auto-generated method stub > } > > @Override public void reshape( > final GLAutoDrawable drawable, > final int x, > final int y, > final int width, > final int height) > { > // TODO Auto-generated method stub > } >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 651
: 394 |
395
|
396
|
397
|
398
|
399