OpenGLRenderer: Implement face filling
This commit is contained in:
@@ -31,6 +31,7 @@ namespace Nz
|
||||
|
||||
inline GLenum ToOpenGL(BlendEquation blendEquation);
|
||||
inline GLenum ToOpenGL(BlendFunc blendFunc);
|
||||
inline GLenum ToOpenGL(FaceFilling filling);
|
||||
inline GLenum ToOpenGL(FaceSide side);
|
||||
inline GLenum ToOpenGL(FrontFace face);
|
||||
inline GLenum ToOpenGL(PrimitiveMode primitiveMode);
|
||||
|
||||
@@ -74,6 +74,19 @@ namespace Nz
|
||||
NazaraError("Unhandled BlendFunc 0x" + NumberToString(UnderlyingCast(blendFunc), 16));
|
||||
return {};
|
||||
}
|
||||
|
||||
inline GLenum ToOpenGL(FaceFilling side)
|
||||
{
|
||||
switch (side)
|
||||
{
|
||||
case FaceFilling::Fill: return GL_FILL;
|
||||
case FaceFilling::Line: return GL_LINE;
|
||||
case FaceFilling::Point: return GL_POINT;
|
||||
}
|
||||
|
||||
NazaraError("Unhandled FaceFilling 0x" + NumberToString(UnderlyingCast(side), 16));
|
||||
return {};
|
||||
}
|
||||
|
||||
inline GLenum ToOpenGL(FaceSide side)
|
||||
{
|
||||
|
||||
@@ -12,8 +12,12 @@
|
||||
#include <GLES2/gl2ext.h>
|
||||
|
||||
// Define some OpenGL (not ES) extensions
|
||||
#define GL_POINT 0x1B00
|
||||
#define GL_LINE 0x1B01
|
||||
#define GL_FILL 0x1B02
|
||||
#define GL_SHADER_BINARY_FORMAT_SPIR_V_ARB 0x9551
|
||||
#define GL_SPIR_V_BINARY_ARB 0x9552
|
||||
typedef void (GL_APIENTRYP PFNGLPOLYGONMODEPROC) (GLenum face, GLenum mode);
|
||||
typedef void (GL_APIENTRYP PFNGLSPECIALIZESHADERARBPROC) (GLuint shader, const GLchar* pEntryPoint, GLuint numSpecializationConstants, const GLuint* pConstantIndex, const GLuint* pConstantValue);
|
||||
|
||||
// OpenGL core
|
||||
@@ -163,6 +167,8 @@ typedef void (GL_APIENTRYP PFNGLSPECIALIZESHADERARBPROC) (GLuint shader, const G
|
||||
\
|
||||
extCb(glDebugMessageCallback, PFNGLDEBUGMESSAGECALLBACKPROC) \
|
||||
\
|
||||
extCb(glPolygonMode, PFNGLPOLYGONMODEPROC) \
|
||||
\
|
||||
extCb(glMemoryBarrier, PFNGLMEMORYBARRIERPROC) \
|
||||
extCb(glMemoryBarrierByRegion, PFNGLMEMORYBARRIERBYREGIONPROC) \
|
||||
\
|
||||
|
||||
Reference in New Issue
Block a user