619 reputation
39
bio website
location Joinville, Brazil
age
visits member for 2 years, 3 months
seen 18 mins ago

Dec
24
comment Simple Bounding Sphere Calculations for 2d game
Check this question: stackoverflow.com/questions/8367512/… If it did not solve your problem, open another question (i think). Also, I'm assuming you mean circle instead of sphere...
Dec
24
comment Simple Bounding Sphere Calculations for 2d game
with p1.x = 100 and p2.x = 200 then dx = 100-200 = -100. Using the formula distance_x = sqrt(dx*dx) we have distance_x = sqrt(-100 * -100) = sqrt(+10000). So, distance_x = 100. You are multiplying two negative numbers, so the result is always positive.
Nov
17
comment How do I generate mipmap .png and model .obj files for LibGDX?
that is exactly what is does. This tool packs many smalls ".png" into a single file. You can load each small piece as a sprite in libGDX. If you want to use the result texture in a 3D model, you will have to manually do the UV-Mapping with your favorite 3D modeler tool...
Nov
17
comment How do I generate mipmap .png and model .obj files for LibGDX?
libGDX will do the mipmap automatic for you. It will use your texture as the main one, and generate/use the optimized ones. I think what you want is a TexturePacker.
Nov
16
comment Rotating a Quad around it center
Michael Slade comments seems right, but just remove the parenthesis. Like: GL11.glTranslatef(-x-getWidth()/2, -y-getHeight()/2, 0);
Nov
15
comment TileMapRenderer in libGDX not drawing anything
Oh yeah, it does that. Sometimes, if you don't do "F5" in the Android Project, it will not package a new .APK file, and will just start the old activity :(
Nov
15
comment TileMapRenderer in libGDX not drawing anything
I just tried it here, and is working. Did you got any error while trying to run the project? (Ps.: I'm using the tmx map I linked above)
Nov
15
comment TileMapRenderer in libGDX not drawing anything
Hello, I can't help you with it, but I'll leave you with a working sample so you can work from there in case you have not seem it already... Sample Link . Also, the resources used: Resources used
Nov
13
comment Rotate an object given only by its points?
@d33tah What this algorithm is doing is rotating each of your vertices around one vector (in your code, it is the y axis, declared by the y_unit variable). To change the center of the rotation, you have to translate your vertices to a new position, apply rotation, then translate back by the same distance. I highly recommend watching those videos, they are very, very, very good :)
Nov
13
comment Rotate an object given only by its points?
The Row Major form is how this formula is present in the literature, and I found it easier to learn this way. Also, I did not post plain calls to rotations, but instead an actual implementation so the OP can implement it in others languages without GLM if he decides to use modern OpenGL.
Nov
2
comment LWJGL Text Rendering
@Trixmix I edited my answer, add two main things. Shaders are not actually needed, sorry for that. And, a small touch: font texture background must be transparent.
Nov
2
comment LWJGL Text Rendering
@Trixmix if you use the fixed rendering pipeline, you may read this link. All you have to do is set your vertices color with glColor3f() and draw your glyphs as usual.
Nov
1
comment LWJGL Text Rendering
One example of this using libGDX can be found in this link: link. libGDX uses LWJGL for its desktop version, you can check it out if this solutions interests you.
Oct
29
comment “LNK2001: unresolved external symbol” when trying to build my program
@random a wild guess would suggest something with your "main" function, but I dont code for Windows. Any reason not to manage your application window with just Allegro? (without #include <windows.h>)? Like in this link
Oct
21
comment Is there any heuristic to polygonize a closed 2D raster shape with n triangles?
Have you tried link?
Oct
21
comment What's best to use OTF or TTF?
@Zhen TTF also has width variation, and kerning. If you use a Bitmap font generator software like BMFont (AngelCode) or Hiero, it will give you a text file including all this information. Just read it, and map this information for each glyph.
Oct
21
comment What's best to use OTF or TTF?
With Bitmaps fonts you can easily add extra decorations. The main problem with BMP fonts is it do not scale well, you will not get pixel perfect visuals in every possible resolution. TTF in the other hand works well in any resolution, but can be slower to generate each glyph. Also, chinese characters in a(many) Bitmap texture(s) would be hard to accomplish.