i want to draw polygon with hole and pattern it with bitmap. how to do?
[Moderator: fixed title spelling]
You will need to draw multiple polygons, a poly cant have a hole. applying a texture is really simple in OpenGL. I recomend reading the Red book to learn openGL.
Also, there is also an example in OpenTK
in the directory - Source\Examples\Tutorial\Textures.cs
thank for your reply.
I'm new and having a look round :D
I was just wondering, does OpenTK support alpha blended/alpha channel textures? If so, it could work nicely to have the polygon as a simple square, and texture it with the bitmap and give the alpha channel a nice nifty hole in the middle so that on rendering it goes straight through the polygon.
That's another good approach with good performance characteristics.
Fallout 3 used an even more complicated approach to simulate errosion in concrete slabs, rocks and similar rubble. I can't find the link now, but IIRC they used a pixel shader and alpha tests / texkill to discard fragments from the corners of the geometry. Relatively simple, but with great results.
In any case, OpenTK provides access to the whole OpenGL API (shaders, FBOs, everything). If there's something you can do with OpenGL, you'll be able to do it through OpenTK.
Sounds very nice, thanks!
Site design by Stefanos A. Icons courtesy of gnome-colors.