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

Author Topic: Graphics: Support for more PrimitiveTypes  (Read 3913 times)

0 Members and 1 Guest are viewing this topic.

jorne22

  • Newbie
  • *
  • Posts: 4
    • View Profile
Graphics: Support for more PrimitiveTypes
« on: March 18, 2019, 06:12:23 pm »
Using geometry shaders, I would like to implement silhouette testing of geometry as demonstrated here. To do this, the geometry shader requires adjacency data modes which SFML currently doesn't have support for.

RenderTarget::drawPrimitives(...) can be modified to accomodate adjacency modes by adding

Code: [Select]
GL_LINE_STRIP_ADJACENCY,
GL_LINES_ADJACENCY,
GL_TRIANGLE_STRIP_ADJACENCY,
GL_TRIANGLES_ADJACENCY

to the modes[] GLEnum inside the drawPrimitives(...) function. To access these modes, the PrimitiveType enum can be modified appropriately. This makes these new modes easy to access via window.draw(...)

The main caveat with this is that the above modes require OpenGL 3.2 or higher. I take it this would affect compatibility across devices?
« Last Edit: March 18, 2019, 06:14:04 pm by jorne22 »

 

anything