GLGraphics [glgraphicsoffscreen always 1/2 sketch size]
in
Contributed Library Questions
•
1 year ago
Hi all
Im using GLGraphics for a shmup to make use of the faster drawing capabilities and shaders etc
I seem to have found a problem though, i've made a small test sketch again, and im renderering each bullets GLTexture to a GLGraphicsOffScreen (everything will be rendererd to a suitable offscreen/gltexture for effects to be applied and then blended together into the final image)
The problem is, even though ive set the w/h of the buffer to that of the sketch (350,550) it always seems to get rendererd at half the sketch size, obviously you can multiply the dimensions at the time of drawing the final image but the result then looks fairly gash (with ship sprites anyway) and having smoothing on will slow everything down quite alot
If anyones got any ideas thatd be really appreciated
sketch is up in my drop box: here
Many thanks guys ;)
Also on side notes:
* Any ideas how to preserve the transparency of a gltexture/offscreen when using for example the Bloom filter?
edit///////////////////////////////////////
* How do you properly remove elements from an arraylist (instead of the remove.indexOf) i forgot where i found the answer, something to do with iteraters (see destroy() in patternemitter)
^^^ fixed this now, might not be very efficient mind:
Im using GLGraphics for a shmup to make use of the faster drawing capabilities and shaders etc
I seem to have found a problem though, i've made a small test sketch again, and im renderering each bullets GLTexture to a GLGraphicsOffScreen (everything will be rendererd to a suitable offscreen/gltexture for effects to be applied and then blended together into the final image)
The problem is, even though ive set the w/h of the buffer to that of the sketch (350,550) it always seems to get rendererd at half the sketch size, obviously you can multiply the dimensions at the time of drawing the final image but the result then looks fairly gash (with ship sprites anyway) and having smoothing on will slow everything down quite alot
If anyones got any ideas thatd be really appreciated
sketch is up in my drop box: here
Many thanks guys ;)
Also on side notes:
* Any ideas how to preserve the transparency of a gltexture/offscreen when using for example the Bloom filter?
edit///////////////////////////////////////
* How do you properly remove elements from an arraylist (instead of the remove.indexOf) i forgot where i found the answer, something to do with iteraters (see destroy() in patternemitter)
^^^ fixed this now, might not be very efficient mind:
- void destroy() {
- int dcount = 0;
- for(int b = 0; b < destroybullets.size(); b++){
- int ind = destroybullets.get(b);
- bullets.remove(ind-dcount);
- dcount++;
- }
- destroybullets.clear();
- }
1