i lied (partial offscreen quads)

I don’t think I made it 2 days without asking a question. :slight_smile:

Anyways, whats the deal with drawing vertices that start off the screen? I’m drawing my tiles and it’s all working pretty good but the ones on the sides don’t show up when I’m scrolling. Is there an easy way of dealing with this? I poked around on google but I wasn’t having much luck.

If you draw geometric primitives like triangles or quads, OpenGL will clip them correctly to the viewport. So your problem must be somewhere else.

  • elias

Mabey I should stop coding when I’m falling alseep? :wink: (i just got up) I thought I had read that somewhere, so it just fit with my expectations. Not the first time thats happened.

[quote]I thought I had read that somewhere, so it just fit with my expectations.
[/quote]
Well, when working with glBitmap you can get a whole graphic clipped because the raster position you were using to anchor it was clipped - maybe you’d heard about that?

But no, standard OpenGL primitives with clipped vertices should render properly, as the man said.

Are you missing tiles from just two edges of the screen, or all four?

Oh I suppose I should have edited, I fixed it pretty quickly. Really nasty bug in my scrolling code. Even though I was printing out all the variables I still wasn’t catching it right off, so my mind went right to the wishful “not my fault folder”. :wink:

edit: part of the problem is i’ve doen scrolling code in the past a bunch for test programs, but this time I did something different and made the camera not constrained to the map bounds, caused problems :stuck_out_tongue: