File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -498,6 +498,12 @@ typedef enum {
498
498
RL_ATTACHMENT_RENDERBUFFER = 200 , // Framebuffer texture attachment type: renderbuffer
499
499
} rlFramebufferAttachTextureType ;
500
500
501
+ // Face culling mode
502
+ typedef enum {
503
+ RL_FRONT = 0 ,
504
+ RL_BACK
505
+ } rlCullMode ;
506
+
501
507
//------------------------------------------------------------------------------------
502
508
// Functions Declaration - Matrix operations
503
509
//------------------------------------------------------------------------------------
@@ -578,6 +584,7 @@ RLAPI void rlEnableDepthMask(void); // Enable depth write
578
584
RLAPI void rlDisableDepthMask (void ); // Disable depth write
579
585
RLAPI void rlEnableBackfaceCulling (void ); // Enable backface culling
580
586
RLAPI void rlDisableBackfaceCulling (void ); // Disable backface culling
587
+ RLAPI void rlCullFace (rlCullMode mode ); // Set face culling mode
581
588
RLAPI void rlEnableScissorTest (void ); // Enable scissor test
582
589
RLAPI void rlDisableScissorTest (void ); // Disable scissor test
583
590
RLAPI void rlScissor (int x , int y , int width , int height ); // Scissor test
@@ -1671,6 +1678,18 @@ void rlEnableBackfaceCulling(void) { glEnable(GL_CULL_FACE); }
1671
1678
// Disable backface culling
1672
1679
void rlDisableBackfaceCulling (void ) { glDisable (GL_CULL_FACE ); }
1673
1680
1681
+ // Set face culling mode
1682
+ void rlCullFace (rlCullMode mode ) {
1683
+ switch (mode ) {
1684
+ case RL_BACK :
1685
+ glCullFace (GL_BACK );
1686
+ break ;
1687
+ case RL_FRONT :
1688
+ glCullFace (GL_FRONT );
1689
+ break ;
1690
+ }
1691
+ }
1692
+
1674
1693
// Enable scissor test
1675
1694
void rlEnableScissorTest (void ) { glEnable (GL_SCISSOR_TEST ); }
1676
1695
You can’t perform that action at this time.
0 commit comments