Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411497 Posts in 69373 Topics- by 58428 Members - Latest Member: shelton786

April 25, 2024, 07:35:05 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)OpenGL fill gaps
Pages: [1]
Print
Author Topic: OpenGL fill gaps  (Read 1359 times)
Quarry
Level 10
*****


View Profile
« on: June 19, 2015, 01:33:43 PM »



I imagine this is not an uncommon problem, though I never bothered trying to find a fix for those fill gaps between polygons.

Is there a way to get rid of them? Will increasing vertex float precision to 64 bits change anything?
Logged
Layl
Level 3
***

professional jerkface


View Profile WWW
« Reply #1 on: June 19, 2015, 01:39:22 PM »

OpenGL only guarantees no gaps to appear if the vertices' locations are EXACTLY the same.
Logged
Quarry
Level 10
*****


View Profile
« Reply #2 on: June 19, 2015, 01:44:44 PM »

Well, how can I get no gaps when they are not is my question
Logged
Layl
Level 3
***

professional jerkface


View Profile WWW
« Reply #3 on: June 19, 2015, 02:04:34 PM »

If how to get no gaps is not your question, I'm not sure what is.
Edit: my mistake, I'm completely misreading things
Logged
Layl
Level 3
***

professional jerkface


View Profile WWW
« Reply #4 on: June 19, 2015, 02:06:30 PM »

Getting no gaps when they're not exactly the same is not possible as far as I know. Closest thing you could do is round the position in the vertex shader, but it would be better to adjust whatever system is generating these vertices to make them exactly the same.
Logged
ThemsAllTook
Administrator
Level 10
******



View Profile WWW
« Reply #5 on: June 19, 2015, 02:43:43 PM »

Well, how can I get no gaps when they are not is my question

Add more vertices so that they can share locations when you have a vertex meeting an edge.
Logged

InfiniteStateMachine
Level 10
*****



View Profile
« Reply #6 on: June 19, 2015, 03:01:30 PM »

I cant really make out what that screenshot is. Are those a bunch of disconnected planes?
 
Logged

Quarry
Level 10
*****


View Profile
« Reply #7 on: June 19, 2015, 03:39:27 PM »

Well, how can I get no gaps when they are not is my question

Add more vertices so that they can share locations when you have a vertex meeting an edge.

Yeah, that's probably the only option currently

I cant really make out what that screenshot is. Are those a bunch of disconnected planes?
 

In triangles, if that helps

Logged
InfiniteStateMachine
Level 10
*****



View Profile
« Reply #8 on: June 19, 2015, 04:45:57 PM »

Ah ok.  My idea is under the assumption that it is a continuous mesh. If so you could just use an indexed draw so that you dont have to worry about 2 vertices being in the same place because it will reuse the same single vert
Logged

Netsu
Level 10
*****


proficient at just chillin'


View Profile WWW
« Reply #9 on: June 22, 2015, 11:05:37 PM »

What calls are you using to draw this? Maybe using a triangle strip could help?
Logged

Quarry
Level 10
*****


View Profile
« Reply #10 on: June 23, 2015, 01:30:45 AM »

GL_TRIANGLES, I can actually try strips for this specific case
Logged
ProgramGamer
Administrator
Level 10
******


aka Mireille


View Profile
« Reply #11 on: June 23, 2015, 04:42:48 AM »

Maybe it would help to make each strip slightly larger than it needs to be by a margin of, like, half a pixel?
Logged

Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic