Java-Gaming.org Hi !
Featured games (91)
games approved by the League of Dukes
Games in Showcase (762)
Games in Android Showcase (229)
games submitted by our members
Games in WIP (846)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  glGenBuffersARB problem  (Read 1230 times)
0 Members and 1 Guest are viewing this topic.
Offline Vorax

Senior Devvie


Projects: 1


System shutting down in 5..4..3...


« Posted 2005-06-17 04:06:43 »

I am having a problem getting a handle to a buffer using glGenBuffersARB()

It's pretty staright forward code:
1  
2  
3  
    int[] tmp = new int[1];
    gl.glGenBuffersARB(1, tmp);
    int name = tmp[0];


When running with DebugGL turned on, I get this trace (which also looks odd because of so many GL_INVALID_OPERATION messsages):
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
net.java.games.jogl.GLException: glGetError() returned the following error codes after a call to glGenBuffersARB(): GL_INVALID_OPERATION GL_INVALID_OPERATION GL_INVALID_OPERATION GL_INVALID_OPERATION GL_INVALID_OPERATION GL_INVALID_OPERATION GL_INVALID_OPERATION GL_INVALID_OPERATION GL_INVALID_OPERATION GL_INVALID_OPERATION GL_INVALID_OPERATION 
   at net.java.games.jogl.DebugGL.checkGLGetError(DebugGL.java:14844)
   at net.java.games.jogl.DebugGL.glGenBuffersARB(DebugGL.java:3535)
   at com.vorax.geometry.GeoObject.getVBOBuffer(GeoObject.java:1590)
   at com.vorax.geometry.GeoObject.allocateCoordsBuffer1(GeoObject.java:1697)
   at com.vorax.geometry.GeoObject.setTexCoords(GeoObject.java:252)
   at com.vorax.objloader.ObjectFile.makeScene(ObjectFile.java:1082)
   at com.vorax.objloader.ObjectFile.load(ObjectFile.java:1159)
   at com.vorax.objloader.ObjectFile.load(ObjectFile.java:581)
   at com.vorax.gameobjs.ships.Ship.loadShip(Ship.java:247)
   at com.vorax.gameobjs.ships.Ship.<init>(Ship.java:154)
   at com.vorax.gameobjs.ships.StarterShip.<init>(StarterShip.java:72)
   at com.vorax.objects.Player.loadModel(Player.java:135)
   at com.vorax.VoraxEngine.makePlayer(VoraxEngine.java:549)
   at com.vorax.VoraxEngine.doStartLevel(VoraxEngine.java:901)
   at com.vorax.VoraxEngine.access$0(VoraxEngine.java:861)
   at com.vorax.VoraxEngine$1.run(VoraxEngine.java:835)
   at java.lang.Thread.run(Thread.java:534)    


This is on the very first call to glGenBuffersARB.  The only thing that I can think of that's different is I am calling glGenBuffersARB within the display() method.  That's allowed isn't it?   Is this a JOGL bug, or am I on crack?  Huh

Any help is appreciated.

Offline Ken Russell

JGO Coder




Java games rock!


« Reply #1 - Posted 2005-06-17 08:48:59 »

Judging from your stack trace above, I think you meant to say that you/re _not_ calling glGenBuffersARB from within your display() method, and this is in fact your problem. You must call it only while one of your GLEventListeners' methods is active on the stack.
Offline Vorax

Senior Devvie


Projects: 1


System shutting down in 5..4..3...


« Reply #2 - Posted 2005-06-17 11:04:51 »

Thanks Ken!

Yes - I forgot the not....your eyes are sharp.

That makes sense. I've had similar problems in the past with other calls due to threading, but didn't clue in on this one.


Pages: [1]
  ignore  |  Print  
 
 

 
EgonOlsen (359 views)
2018-06-10 19:43:48

EgonOlsen (360 views)
2018-06-10 19:43:44

EgonOlsen (298 views)
2018-06-10 19:43:20

DesertCoockie (533 views)
2018-05-13 18:23:11

nelsongames (850 views)
2018-04-24 18:15:36

nelsongames (836 views)
2018-04-24 18:14:32

ivj94 (1283 views)
2018-03-24 14:47:39

ivj94 (408 views)
2018-03-24 14:46:31

ivj94 (1070 views)
2018-03-24 14:43:53

Solater (417 views)
2018-03-17 05:04:08
Java Gaming Resources
by philfrei
2017-12-05 19:38:37

Java Gaming Resources
by philfrei
2017-12-05 19:37:39

Java Gaming Resources
by philfrei
2017-12-05 19:36:10

Java Gaming Resources
by philfrei
2017-12-05 19:33:10

List of Learning Resources
by elect
2017-03-13 14:05:44

List of Learning Resources
by elect
2017-03-13 14:04:45

SF/X Libraries
by philfrei
2017-03-02 08:45:19

SF/X Libraries
by philfrei
2017-03-02 08:44:05
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!