opentk / opentk

The Open Toolkit library is a fast, low-level C# wrapper for OpenGL, OpenAL & OpenCL. It also includes windowing, mouse, keyboard and joystick input and a robust and fast math library, giving you everything you need to write your own renderer or game engine. OpenTK can be used standalone or inside a GUI on Windows, Linux, Mac.
https://opentk.net
Other
3.24k stars 633 forks source link

CapEnableCap.AlphaTest can not be recongnized when using OpenTK.Graphics.OpenGL4 #886

Closed ShannonZ closed 5 years ago

ShannonZ commented 5 years ago

Description

I want to translate this project to C# using OpenTK. But I cannot find the equivalent code using OpenTK glEnable( GL_ALPHA_TEST ); glAlphaFunc( GL_GREATER, 0.03f );

CapEnableCap.AlphaTest can not be recongnized when using Graphics.OpenGL4.

I've tried to use EnableCap.SampleAlphaToCoverage and other SampleAlphaXXX flags, but these all seem to not equivalent to C++ code glEnable( GL_ALPHA_TEST );.

Related information

jvbsl commented 5 years ago

https://stackoverflow.com/questions/24302152/opengl-alpha-test-how-to-replace-alphafunc-deprecated The reason that it is missing is, that it is deprecated since version 3.1, therefore you need to do it yourself in the fragment shader....

ShannonZ commented 5 years ago

Clear Enough! Thank you @jvbsl