LWJGL
June 18, 2013, 01:22:25 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: LWJGL 2.9.0 released!
 
   Home   Help Search Login Register  



Pages: [1]
  Print  
Author Topic: debug mode  (Read 5335 times)
Qudus
Talks Too Much
***
Posts: 123


« on: June 06, 2008, 17:16:56 »

Is there a way to set LWJGL into debug mode and let it execute a checkGLErrors() after each gl-call without recompiling it? That would be great, since it tends to be a nightmare to debug gl-errors when the error is only thrown with swapBuffers. I have to place a checkGLErrors() at each suspicious line in my whole code.

Marvin
Logged
Matzon
Administrator
Demigod
*****
Posts: 2239



« Reply #1 on: June 06, 2008, 22:57:57 »

in platform_build.xml#generate-opengl you can comment in or out the line that says <arg value="-Ageneratechecks"/>. Once you have build that, you can do an 'ant jars' which will create lwjgl.jar in the libs folder. Rename this as lwjgl-debug.jar lwjgl.jar as appropriate. The use one or the other on the command line.
Logged

Qudus
Talks Too Much
***
Posts: 123


« Reply #2 on: June 07, 2008, 04:33:44 »

ok, thanks. Would be nice to have binary download on the download-page for the debug jar.

Marvin
Logged
Qudus
Talks Too Much
***
Posts: 123


« Reply #3 on: June 07, 2008, 05:15:51 »

I tried that. Unfortunately the ant-script (build.xml) seems to be made for apt-based linux distros. I am on SuSE-Linux, which is rpm-based. Well, I can install apt even on SuSE, and I did it. But it doesn't compile, since the apt-parameters don't seem to be the same. Could you possibly provide a download of the debug-lwjgl.jar? That would help me a lot.

Thanks.

Marvin
Logged
Matzon
Administrator
Demigod
*****
Posts: 2239



« Reply #4 on: June 07, 2008, 12:34:22 »

I'm sorry, where does apt-get fit into the picture ?
lwjgl is purely ant based when compiling, except for the native part which assumes you have the dependencies installed.
For the debug jar you need only compile the java stuff:

Code:
svn co https://java-game-lib.svn.sourceforge.net/svnroot/java-game-lib/trunk/LWJGL lwjgl
cd lwjgl
mkdir bin
<edit platform_build/build-generator.xml>
ant jars
Logged

Qudus
Talks Too Much
***
Posts: 123


« Reply #5 on: June 07, 2008, 14:04:30 »

I don't know much about ant. Could you possibly attach a modified ant script, so that only the debug lwjgl.jar is compiled?

When I try to execute ant as you say, I get this output:
Code:
Buildfile: build.xml

-initialize:
[initialiazing bin folder] Created dir: /media/sda6/lwjgl-co/lwjgl/bin/lwjgl
[initialiazing dist folder] Created dir: /media/sda6/lwjgl-co/lwjgl/dist
[initialiazing docs folder] Created dir: /media/sda6/lwjgl-co/lwjgl/doc/javadoc
[initialiazing temp folder] Created dir: /media/sda6/lwjgl-co/lwjgl/temp
[initialiazing temp/jar folder] Created dir: /media/sda6/lwjgl-co/lwjgl/temp/jar
[initialiazing temp/doc folder] Created dir: /media/sda6/lwjgl-co/lwjgl/temp/doc
[initialiazing temp/res folder] Created dir: /media/sda6/lwjgl-co/lwjgl/temp/res
[initialiazing temp/native folder] Created dir: /media/sda6/lwjgl-co/lwjgl/temp/native
[initialiazing temp/win32 folder] Created dir: /media/sda6/lwjgl-co/lwjgl/temp/native/win32
[initialiazing temp/linux folder] Created dir: /media/sda6/lwjgl-co/lwjgl/temp/native/linux
[initialiazing temp/macosx folder] Created dir: /media/sda6/lwjgl-co/lwjgl/temp/native/macosx

generators:
[generator] Compiling 81 source files to /media/sda6/lwjgl-co/lwjgl/bin

generate-openal:
    [apply] apt: error: no or unrecognized action provided
    [apply] Usage: apt [options] [apt-rpm options] <action> [packages]
    [apply] Use man apt for extended help.
    [apply] Result: 100

generate-opengl:
    [apply] apt: error: no or unrecognized action provided
    [apply] Usage: apt [options] [apt-rpm options] <action> [packages]
    [apply] Use man apt for extended help.
    [apply] Result: 100

generate-opengl-capabilities:
    [apply] apt: error: no or unrecognized action provided
    [apply] Usage: apt [options] [apt-rpm options] <action> [packages]
    [apply] Use man apt for extended help.
    [apply] Result: 100

generate-opengl-references:
    [apply] apt: error: no or unrecognized action provided
    [apply] Usage: apt [options] [apt-rpm options] <action> [packages]
    [apply] Use man apt for extended help.
    [apply] Result: 100

generate-all:

compile:

BUILD FAILED
/media/sda6/lwjgl-co/lwjgl/build.xml:229: srcdir "/media/sda6/lwjgl-co/lwjgl/src/generated" does not exist!

Total time: 5 seconds

Marvin
Logged
Matzon
Administrator
Demigod
*****
Posts: 2239



« Reply #6 on: June 07, 2008, 14:31:32 »

aha!

you have to make sure that the JDK is on you path - you are unable to run APT - Annotation Processing Tool, what we use to generate the source code for some of the classes - it has nothing to do with apt-get Smiley
Logged

Qudus
Talks Too Much
***
Posts: 123


« Reply #7 on: June 08, 2008, 05:30:19 »

Thanks. That worked.

But still. Wouldn't it make sense to provide a binary download for the debug jar?

Marvin
Logged
Matzon
Administrator
Demigod
*****
Posts: 2239



« Reply #8 on: June 08, 2008, 06:57:54 »

well, since you're the first that actively wanted that, not really Smiley
We might do some restructuring in the future, to have a single download instead of 4 - when we get to that, I'll look into supplying (and building) a debug release too.
Logged

Qudus
Talks Too Much
***
Posts: 123


« Reply #9 on: June 08, 2008, 07:32:15 »

Fair enough Smiley. Thanks.

Marvin
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines
SMFAds for Free Forums
Valid XHTML 1.0! Valid CSS!