Okay, so I’m learning JOGL and it’s going pretty well for the most part, but I’ve spent WAY too much time stuck on this one issue and rather than continuing to get more frustrated not being able to figure it out I thought I would offer a reward for what I’m asking for presuming that it is concise and well documented code that serves my purpose.
What I’m asking for:
- Simple re-usable Object that represents a Texture
- Uses PBOs if available
- Uses VBOs if available or falls back to vertex arrays
- Works similarly to TextureRenderer except only two explicit image types need to be supported (one with alpha and one without)
- Should provide an “update” method to replace or originally set the texture.
- “update” method should allow new dimensions to be assigned and the texture should change accordingly
- “draw” method should be provided for rendering of texture to screen
- Should work properly with fixed-function or GLSL pipeline
- Should use SubImage
- Does not need to maintain any extra stuff or reset anything like TextureRenderer does when drawing, positioning, coloring, etc. should be managed outside of this.
- Needs to take in a BufferedImage as an “update” argument with an x, y, width, and height so as to only take a portion of the BufferedImage rather than a whole BufferedImage
- Must not keep a reference to the BufferedImage except in the “update” method when replacing the texture as the BufferedImage will be reused.
- Must have complete mipmapping support to appear as clean and concise as TextureRenderer does
- Must be documented and understandable
- Must be self-contained. No references to any JOGL-specific (TextureRenderer, TextureData, etc.) Objects or 3rd party APIs.
This list is derived by what I understand (as a noob with OpenGL) as best-practices and if someone provides a valid implementation of my needs yet has good reason for breaking some of these requests I will readily consider it if explained.
I know $50 isn’t really much to offer, but this is not a purchase of code, you are free to use the code yourself or release it to the community. Also, I will make a post as soon as someone submits valid code fulfilling all the requirements and will only pick one person so you do run the risk of writing some code and not being chosen. :o
Please feel free to drop me a message if you have any questions. Feel free to post your code directly here or PM it to me and once a submission fulfills the requirements I will work out payment.