clipped triangle outline produces unwanted edge

When my outlined triangle reaches the edge of the screen, it gets clipped and a new edge is drawn. I don’t want it!

E.g.

|\
| \   
|  \
|  /
| /
|/

I’d like:

|\
| \
|  
|  
| /
|/

But I get:

|\
| \
|  |
|  |
| /
|/

I am actually rendering a large area with tiles which are bitmap device contexts (this is on Windows). So I pan across the large area rendering to the (relatively) small bitmap. I’m actually using the feedback buffer and translating the coodinates to the coordinates for a printed page and then using GDI calls to send to the printer.

The effect of the added edges means I get a patchy grid of unwanted edges across the page.

Thanks for any help.

Pete

Should I put this question in the advanced forum?

I don’t want to cross-post.

what is your question as it relates to opengl?

if anything, maybe put it in the windows forum.

Is it possible to stop OpenGL from displaying the edges it automatically creates?

If so, how do I do it?

If there is a triangle (polygon) drawn with an outline at the corner of the screen it will be divided up into two new polygons.

  /|
 / |
/  |
\  |
 \ |
  \|

If you can imagine the bottom right corner of the screen with the above triangle just off the edge, like this:

      |
      |
     /|
    / |
____\_|

The triangle has essentially become this shape:

 /|
/ |
\_|

How do I stop it drawing the extra lines so that I get this shape:

 /
/ 
\

I put in the extra information about what I’m trying to do on windows so as to give more detail about limitations on possible solutions that might be presented.

This isn’t an issue to do with windows specifically as far as I can tell.

I’ve asked this question previously in the gamedev forum here .

Not sure how if this can help you or if it can handle outline polygons, but have you ever tried the OpenGL tile rendering library?

http://www.mesa3d.org/brianp/TR.html

Thanks very much for the link. Now I know I’m not crazy for trying this.

There is some info there about how it’s necessary to have a border around the tile when rendering outlined polygons. So that is what I will do.

I can’t really use the library as it doesn’t really fit into how I’m doing things. I have control of rendering the whole scene but using the library would involve changing so that I render the scene many times. That seems to my mind to be changing something at the ‘wrong’ level in the application. I have a renderer which gets called when the scene is drawn and that seems the correct place to change. So the scene is only drawn once and the renderer looks after the tiles. You don’t even know they’re there.

I could make it so that the scene is given over to the renderer. That would actually make sense and it would be able to render it as many times as it liked. That would work but invloves more changes to the existing code… hmm decisions.

Okay, thanks again for the input. It’s good to know I’m not alone.

Pete