Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (491)
Games in Android Showcase (112)
games submitted by our members
Games in WIP (556)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
   Home   Help   Search   Login   Register   
  Show Posts
Pages: [1]
1  Java Game APIs & Engines / JOGL Development / Display Lists in Run Time on: 2004-09-14 19:27:13
Hi All,

I need to edit or create display lists in run time.

{ what i mean is that i want to create display lists outside the initGL ... and say change the particular display list from time to time }

I guess that makeCurrent is need to do such a thing.
Could some one please tell me if makeCurrent is available in JOGL or some way I can edit the display list any time.

any help will be highly appreciated.

regards,
-jan
2  Java Game APIs & Engines / JOGL Development / Re: Unable to enumerate pixel formats... on: 2004-08-27 20:14:08
I am working on a JOGL project, I got this error on my notebook(with intel 855GM shared memory graphics). and havent got this error on any other graphics card

detailed exception:
net.java.games.jogl.GLException: Unable to enumerate pixel formats of window using wglGetPixelFormatAttribivARB: 0

     at net.java.games.jogl.impl.windows.WindowsGLContext.choosePixelFormatAndCreateContext(WindowsGLContext.java:412)

     at net.java.games.jogl.impl.windows.WindowsOnscreenGLContext.create(WindowsOnscreenGLContext.java:211)

     at net.java.games.jogl.impl.windows.WindowsGLContext.makeCurrent(WindowsGLContext.java:135)

     at net.java.games.jogl.impl.windows.WindowsOnscreenGLContext.makeCurrent(WindowsOnscreenGLContext.java:110)

     at net.java.games.jogl.impl.GLContext.invokeGL(GLContext.java:254)

     at net.java.games.jogl.GLCanvas.reshape(GLCanvas.java:112)


<ends>

my notebook graphics hardware is 'Intel 855GM shared memory' - uses intel extreme graphics.
I am sort of sure about the code working on ati, nvidia hardware.

could some one please comment on this exception,
a work around will be higly appreciated.

-j
3  Java Game APIs & Engines / JOGL Development / Re: [Solved]Saving GLCanvas into a BufferedImage on: 2004-04-27 19:59:25

I am not sure much,
but i had the same problem, where in glReadPixels was returnning all 'zeros'.

so I put glReadPixels in display() immediately after glFlush(). and things seem to work properly.

-j
4  Java Game APIs & Engines / JOGL Development / Re: picking limit on: 2004-04-22 21:38:07
i had set the buffsize to 1024, and any increase did not matter much.

is there any chance of increasing the limit on selection
set.

by batches you mean, call objects in sets of 128
thru the RenderMode(GL_SELECT) and collect the
hits. good idea.

I woud still like to know any possibility of changing the limit.

thanks tom.

-j
5  Java Game APIs & Engines / JOGL Development / Re: picking limit - code on: 2004-04-22 19:18:12
 public void drawTransform()
 {
     if( DrawMode == true ) { drawTransformModel(); }
     else if( DrawMode != true )
     {
         hits = 0;
         x = (double) prevMouseX;
         y = (double) prevMouseY;

         gl.glGetIntegerv(GL.GL_VIEWPORT, viewPort);
         System.out.println("GlSelectBuffer " + buffsize + " " + selectBuffer.length);
         gl.glSelectBuffer(buffsize, selectBuffer);
         gl.glRenderMode(GL.GL_SELECT);
         gl.glInitNames();
         gl.glMatrixMode(GL.GL_PROJECTION);
         gl.glPushMatrix();
         gl.glLoadIdentity();
         glu.gluPickMatrix(x, (double) viewPort[3] - y, 1.0d, 1.0d, viewPort);
//          setView();
         gl.glOrtho( bounds[0][0], bounds[0][1],bounds[1][0], bounds[1][1],bounds[2][0], bounds[2][1]);
         gl.glPushMatrix();
         gl.glMatrixMode(GL.GL_MODELVIEW);
         gl.glLoadIdentity();
         //gl.glPopMatrix();

// object translation
         //gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);
         ///gl.glLoadIdentity();
         ///viewResize();

         gl.glTranslated( (trans.x) * (bounds[0][1] - bounds[0][0]) / Width,
                         trans.y * (bounds[1][1] - bounds[1][0]) / Height, 0.0);
         gl.glRotatef(view_rotz, 0.0f, 0.0f, 1.0f);
         gl.glRotatef(view_roty, 0.0f, 1.0f, 0.0f);
         gl.glRotatef(view_rotx, 1.0f, 0.0f, 0.0f);

         drawTransformModel();

         gl.glPopMatrix();

         gl.glMatrixMode(GL.GL_PROJECTION);
         gl.glPopMatrix();
         gl.glFlush();
         hits = gl.glRenderMode(GL.GL_RENDER);
         processHits(hits, selectBuffer);
         pickProcess();
         DrawMode = true;
         //gldrawable.display();
     }
 }

 public void processHits(int hits, int[] buffer)
 {

         //System.out.println("---------------------------------");
         //System.out.println(" HITS: " + hits);
         int offset = 0;
         int names;
         float z1, z2;
         float z1Min[] = new float[hits];
         float minZ = 9999999;
         float maxZ = -9999999;
         int select=-1;

         this.nObjectHits  = hits;
         for (int i=0;i<hits;i++)
         {
                 //System.out.println("- - - - - - - - - - - -");
                 names = buffer[offset]; offset++;
                 //System.out.println(" hit: " + (i + 1) + " ... " + names);
                 z1 = (float) buffer[offset] / 0x7fffffff; offset++;
                 z2 = (float) buffer[offset] / 0x7fffffff; offset++;

                 for (int j=0;j<names;j++)
                 {
                         if (j==(names-1) && buffer[offset] > 100)
                         {
                             selectObjectBuffer = buffer[offset];
                             System.out.println("RawHits " +i+ " " + selectObjectBuffer + " " + z1);
                             if(z1 <= minZ)
                             {
                                 select = buffer[offset];
                                 minZ = z1;
                             }
                         }
                         offset++;
                     }
         }

         if(select >=hits)
         {
          this.nObjectHits=1;
          this.selectObjectBuffer = select;
          //System.out.println("selectPROC :" + select);
         }
         else
         {
         this.nObjectHits=0;
         }
         //System.out.println(" HITS: " + nObjectHits);
         //for (int i=0;i<nObjectHits;i++)
        // {
         //    System.out.println("-----> " + selectObjectBuffer);
         //}
         //System.out.println("ROTS " + view_rotx + " " + view_roty + " " + view_rotz);



 }
6  Java Game APIs & Engines / JOGL Development / picking limit on: 2004-04-22 19:17:36

my code has lots spheres, and need to pick them.

I am picking using glRenderMode(GL.GL_SELECT)  -
analyse the select Buffer.

It appears that picking works for less than 128 objects.
I do not understand this limit. Could some one let me know how I can increase this limit of my selection set..

I am appending some sample code - its not complete.
7  Java Game APIs & Engines / JOGL Development / Re: Text in JOGL on: 2004-04-20 19:01:02
thanks turquoise3232.

Could some one tell me what is bmChar ??
where can i get this class, or how to read
char bitmap in java (new to java).

thanks in advance,
-jan
8  Java Game APIs & Engines / JOGL Development / Text in JOGL on: 2004-04-19 18:36:34

could some help me in creating text in JOGL.

any sample code will be highly appreciated.

thanks in advance,
-jan
9  Java Game APIs & Engines / JOGL Development / jogl.GLException: Error swapping buffer on: 2004-04-15 17:29:10

I get 'error swapping buffer', while i try to redraw i.e gldrawable.display() in the mouseDragged function.

no i am not using animator. could some one please help me avoid this.

I am appending the complete exception print.
-jan


net.java.games.jogl.GLException: Error swapping buffers
     at net.java.games.jogl.impl.windows.WindowsOnscreenGLContext.swapBuffers(WindowsOnscreenGLContext.java:140)
     at net.java.games.jogl.impl.GLContext.invokeGL(GLContext.java:193)
     at net.java.games.jogl.GLCanvas.displayImpl(GLCanvas.java:182)
     at net.java.games.jogl.GLCanvas.display(GLCanvas.java:82)
     at net.java.games.jogl.GLCanvas.paint(GLCanvas.java:89)
     at sun.awt.RepaintArea.paint(RepaintArea.java:177)
     at sun.awt.windows.WComponentPeer.handleEvent(WComponentPeer.java:260)
     at java.awt.Component.dispatchEventImpl(Component.java:3678)
     at java.awt.Component.dispatchEvent(Component.java:3477)
     at java.awt.EventQueue.dispatchEvent(EventQueue.java:456)
     at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
     at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
     at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
     at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
     at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)


Pages: [1]
 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

Nickropheliac (15 views)
2014-08-31 22:59:12

TehJavaDev (23 views)
2014-08-28 18:26:30

CopyableCougar4 (29 views)
2014-08-22 19:31:30

atombrot (41 views)
2014-08-19 09:29:53

Tekkerue (38 views)
2014-08-16 06:45:27

Tekkerue (35 views)
2014-08-16 06:22:17

Tekkerue (25 views)
2014-08-16 06:20:21

Tekkerue (34 views)
2014-08-16 06:12:11

Rayexar (72 views)
2014-08-11 02:49:23

BurntPizza (48 views)
2014-08-09 21:09:32
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!