Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (539)
Games in Android Showcase (132)
games submitted by our members
Games in WIP (603)
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 / Re: Problem with glDrawElements() on: 2005-12-29 18:06:49
Yeah, it works Smiley
thx!
2  Java Game APIs & Engines / JOGL Development / Problem with glDrawElements() on: 2005-12-29 17:25:54
I have a problem with glDrawElements(). It worked with arrays and previous versions of jogl but not with buffers and the current.
I'm reading my data with this:
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
         
vertbuff = BufferUtils.newDoubleBuffer(vertices * 3);

intbuff = BufferUtils.newIntBuffer(indices * 3);

for (int i = 0; i < vertices; i++) {
   st = new StringTokenizer(br.readLine(), " ");
   while (st.hasMoreTokens()) {
      vertbuff.put(Double.parseDouble(st.nextToken()));
   }
}

for (int i = 0; i < indices; i++) {
   st = new StringTokenizer(br.readLine(), " ");
   st.nextToken();
   while (st.hasMoreTokens()) {
      intbuff.put(Integer.parseInt(st.nextToken()));
   }
}


The file is structured like this:
1  
2  
3  
4  
5  
6  
7  
vertices:
-1.24479 0.64876801 0.200864
-1.48926 0.64368999 0.227226
indices:
3 0 1 2
3 1 3 4
3 5 6 2


And then I'm trying to draw the elements with:

1  
2  
3  
4  
5  
6  
      
gl.glColor3f(1.0f, 0.0f, 0.0f);
gl.glVertexPointer(3, GL.GL_DOUBLE, 0, vertbuff);
gl.glEnableClientState(GL.GL_VERTEX_ARRAY);
gl.glDrawElements(GL.GL_TRIANGLES, intbuff.capacity(), GL.GL_UNSIGNED_INT, intbuff);
gl.glDisableClientState(GL.GL_VERTEX_ARRAY);


But I alaway get an error:
1  
2  
3  
4  
5  
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x691ba460, pid=3040, tid=3300
#
# Java VM: Java HotSpot(TM) Client VM (1.5.0_05-b05 mixed mode)
# Problematic frame:
# C  [atioglxx.dll+0x1ba460]


It works sometimes, when I reduce the size of the buffers (with less vertices and less indices), but not everytime. I already tried to install new drivers but it did not help.
3  Java Game APIs & Engines / JOGL Development / Re: Screenshot without the frame on the screen on: 2005-12-28 17:55:23
I'm still stuck with this problem. Just one example on how to do offscreen rendering with pbuffers and jogl would be great...
4  Java Game APIs & Engines / JOGL Development / Screenshot without the frame on the screen on: 2005-12-18 18:29:18
Is it in any way possible to render a frame via jogl directly into a file and not show it on the screen?
I have some code to draw just one frame and create a screenshot, but I haven't figured out a way to make this screenshot without drawing the frame on the screen first.
thx marv
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.

rwatson462 (35 views)
2014-12-15 09:26:44

Mr.CodeIt (26 views)
2014-12-14 19:50:38

BurntPizza (58 views)
2014-12-09 22:41:13

BurntPizza (93 views)
2014-12-08 04:46:31

JscottyBieshaar (53 views)
2014-12-05 12:39:02

SHC (69 views)
2014-12-03 16:27:13

CopyableCougar4 (71 views)
2014-11-29 21:32:03

toopeicgaming1999 (131 views)
2014-11-26 15:22:04

toopeicgaming1999 (122 views)
2014-11-26 15:20:36

toopeicgaming1999 (34 views)
2014-11-26 15:20:08
Resources for WIP games
by kpars
2014-12-18 10:26:14

Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

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
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!