N.B: crosspost from: java-gaming.org thread (http://www.java-gaming.org/topics/small-static-import-finder-tool-for-lwjgl/28060/view.html)IntroductionI bet anybody working with LWJGL has run into this problem... you need, say, the methods & the field
- glDrawElementsInstanced(...)
- glGetUniformLocation(...)
- GL_FRAMEBUFFER
but where on earth are they defined? Google usually answered my question, but it was such a hassle!
Static-Import-Tool to the rescue!Features
- Intelligent query engine: can match partial camel-case patterns (see screenshot)
- Results are ordered so that most likely method is listed first
- Generates the static-import line, selects it when clicked for easy copying.
- Nothing else, it's a small tool!
Screenshots(http://indiespot.net/files/published/static-import-tool.png?v=2)
(http://indiespot.net/files/published/static-import-tool-2.png)
Download
- http://indiespot.net/files/published/static-import-tool.jar (http://indiespot.net/files/published/static-import-tool.jar) (src.zip (http://indiespot.net/files/published/static-import-tool-src.zip))
Usage:[/list]
java -jar static-import-tool.jar /path/to/lwjgl.jar
// or just Run in Eclipse, and it will search for lwjgl.jar in the classpath
import static org.lwjgl.opengl.GL11.*;
import static org.lwjgl.opengl.GL12.*;
import static org.lwjgl.opengl.GL13.*;
import static org.lwjgl.opengl.GL14.*;
import static org.lwjgl.opengl.GL15.*;
import static org.lwjgl.opengl.GL20.*;
import static org.lwjgl.opengl.GL21.*;
import static org.lwjgl.opengl.GL30.*;
import static org.lwjgl.opengl.GL31.*;
import static org.lwjgl.opengl.GL32.*;
import static org.lwjgl.opengl.GL33.*;
import static org.lwjgl.opengl.GL40.*;
import static org.lwjgl.opengl.GL41.*;
import static org.lwjgl.opengl.GL42.*;
:P
This does seem like an unnecessary addition to the workflow. I feel like this would slow you down.
After all, if you know what functions you need to call, you probably have at least a good idea of what class they are in; and if you don't, you can just do what Rednax posted.