Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - basmith

Pages: [1]
1
Java / Re: SFMLNativeDrawer.MAX_VERTICES
« on: October 15, 2013, 09:55:12 pm »
Thanks, looks good!

2
Java / SFMLNativeDrawer.MAX_VERTICES
« on: October 14, 2013, 09:48:46 pm »
I was playing around with JSFML (nice work btw), and was trying to draw a grid of quads (in a vertex array) to the screen.  The idea was to be a virtual terminal, where each quad's texture coordinates would index into the a font's texture using glyph texture-bounds.

Unfortunately, I can't draw very many quads due (from what I can tell) to the SFMLNativeDrawer.MAX_VERTICES limit of 1024.  I get an IndexOutOfBoundsException and the stack trace leads me there.

For example, about 12600 quads of 17x17 (size determined by font measurement) fit a 1280*720 display.  That's about 50k vertices.

That seems like a lot I guess; maybe there's a better way to do this.  I haven't tried RectangleShapes, but I imagine 12k draw calls is a rather bad idea.  Maybe I can use jogl/lwjgl?  I'm new to Java so I don't know the lay of the land yet.

Edit:

Woops.  The example was off.  For 17x17, that's 3150 quads resulting in 12600 verts.  Still over the limit.  :P

3
Graphics / Glyph background colors
« on: September 16, 2013, 10:18:28 pm »
Hi,

I'm writing a roguelike with a pseudo-terminal appearance (in SFML.net).  I'm drawing Glyphs in a grid layout, but the only obvious way I noticed to apply a per-Glyph background color was to draw a RectangleShape behind it.

Is this sub-optimal and if so, is there a better way?

Cheers

Pages: [1]
anything