summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 09d6668)
raw | patch | inline | side by side (parent: 09d6668)
author | a1batross <a1ba.omarov@gmail.com> | |
Wed, 16 Nov 2016 23:10:29 +0000 (02:10 +0300) | ||
committer | a1batross <a1ba.omarov@gmail.com> | |
Wed, 16 Nov 2016 23:10:29 +0000 (02:10 +0300) |
GL/gl.h | patch | blob | history | |
GL/gl_entries.in | patch | blob | history | |
GL/glesinterface.h | patch | blob | history | |
eglwrap.cpp | patch | blob | history | |
funcnames.h | patch | blob | history | |
nanoWrap.cpp | patch | blob | history |
index edf91028a413b84a2045ba1421d86f481d599f57..d027d132846c2d456e365bd6713356ae343dcd89 100644 (file)
--- a/GL/gl.h
+++ b/GL/gl.h
void glGenTextures( GLsizei n, GLuint *textures );
void glFrontFace( GLenum mode );
+// Rikku2000: Light
+void glLightf( GLenum light, GLenum pname, GLfloat param );
+void glLightfv( GLenum light, GLenum pname, const GLfloat *params );
+void glLightModelf( GLenum pname, GLfloat param );
+void glLightModelfv( GLenum pname, const GLfloat *params );
+void glMaterialf( GLenum face, GLenum pname, GLfloat param );
+void glMaterialfv( GLenum face, GLenum pname, const GLfloat *params );
+void glColorMaterial( GLenum face, GLenum mode );
+
//nicknekit: for xash3d
void glColor3ub( GLubyte red, GLubyte green, GLubyte blue );
diff --git a/GL/gl_entries.in b/GL/gl_entries.in
index 250431c1dcfaf57e15b9e0c9f833e3dd3c435552..244acea8b446a210a9ed6e901e44fd1526a0e5d9 100644 (file)
--- a/GL/gl_entries.in
+++ b/GL/gl_entries.in
@@ -186,6 +186,9 @@ GL_ENTRY( void, glOrtho, double left, double right, double bottom, double top, d
GL_ENTRY( void, glDepthRange, double zNear, double zFar )
#endif
+// Rikku2000: Light
+GL_ENTRY( void, glColorMaterial, GLenum face, GLenum mode )
+
// fbo
GL_ENTRY( void, glGenFramebuffersOES, GLsizei n, GLuint *framebuffers )
GL_ENTRY( void, glGenRenderbuffersOES, GLsizei n, GLuint *renderbuffers )
diff --git a/GL/glesinterface.h b/GL/glesinterface.h
index 8231fda870bb45aacf681f01954a2e7d57b1201c..710dfd33bbb54a959a8f2e2b39bddcb4b10cc8d1 100644 (file)
--- a/GL/glesinterface.h
+++ b/GL/glesinterface.h
void( APIENTRY *glOrtho )( double left, double right, double bottom, double top, double zNear, double zFar ) S;
void( APIENTRY *glDepthRange )( double zNear, double zFar ) S;
#endif
+
+ // Rikku2000: Light
+ void( APIENTRY *glColorMaterial )( unsigned int face, unsigned int mode ) S;
+
void( APIENTRY *glGenFramebuffers )( unsigned int n, unsigned int *framebuffers ) S;
void( APIENTRY *glGenRenderbuffers )( unsigned int n, unsigned int *renderbuffers ) S;
void( APIENTRY *glRenderbufferStorage )( unsigned int target, unsigned int internalformat, unsigned int width, unsigned int height ) S;
diff --git a/eglwrap.cpp b/eglwrap.cpp
index a3870b758155cf8447e0c60c814800181cfbad52..208698ba71107e82b62ef3493891bed6a9a5788d 100644 (file)
--- a/eglwrap.cpp
+++ b/eglwrap.cpp
*/
#include "egl.h"
-#include "glesinterface.h"
#include "gl.h"
+#include "glesinterface.h"
#include <string.h>
diff --git a/funcnames.h b/funcnames.h
index 8a88e2971297779b4ac7739fcf80258386411d46..cf26c5560729efee533139f1b74394ed3febb51c 100644 (file)
--- a/funcnames.h
+++ b/funcnames.h
"glOrtho",\r
"glDepthRange",\r
#endif\r
+\r
+// Rikku2000: Light\r
+ "glColorMaterial",\r
diff --git a/nanoWrap.cpp b/nanoWrap.cpp
index e159046488ad94dbd24f21818ec451b63992eea3..8fc82906ff06e3413374b0022a1b409e76e2c62c 100644 (file)
--- a/nanoWrap.cpp
+++ b/nanoWrap.cpp
GLboolean depth_test;
GLboolean dither;
GLboolean fog;
- GLboolean lighti;
+ GLboolean light0;
+ GLboolean light1;
+ GLboolean light2;
+ GLboolean light3;
+ GLboolean light4;
+ GLboolean light5;
+ GLboolean light6;
+ GLboolean light7;
GLboolean lighting;
GLboolean line_smooth;
GLboolean matrix_palette_oes;
GL_FALSE,
GL_FALSE,
GL_FALSE,
+ GL_FALSE,
+ GL_FALSE,
+ GL_FALSE,
+ GL_FALSE,
+ GL_FALSE,
+ GL_FALSE,
+ GL_FALSE,
GL_TRUE,
GL_FALSE,
GL_FALSE,
*ptrIndexArray++ = indexCount++;
*ptrIndexArray++ = indexCount++;
*ptrIndexArray++ = indexCount++;
- int vcount = ( ( vertexCount - vertexMark ) - 3 );
+ int vcount = ( ( vertexCount - vertexMark ) - 3 );
for ( int count = 0; count < vcount; count++ )
{
*ptrIndexArray++ = indexbase;
break;
}
case GL_FOG:
- //case GL_LIGHTi
+ {
+ if ( !nanoglState.fog )
{
- if ( !nanoglState.fog )
- {
- nanoglState.fog = GL_TRUE;
- statechanged = GL_TRUE;
- }
- break;
+ nanoglState.fog = GL_TRUE;
+ statechanged = GL_TRUE;
+ }
+ break;
+ }
+ case GL_LIGHT0:
+ {
+ if ( !nanoglState.light0 )
+ {
+ nanoglState.light0 = GL_TRUE;
+ statechanged = GL_TRUE;
+ }
+ break;
+ }
+ case GL_LIGHT1:
+ {
+ if ( !nanoglState.light1 )
+ {
+ nanoglState.light1 = GL_TRUE;
+ statechanged = GL_TRUE;
+ }
+ break;
+ }
+ case GL_LIGHT2:
+ {
+ if ( !nanoglState.light2 )
+ {
+ nanoglState.light2 = GL_TRUE;
+ statechanged = GL_TRUE;
+ }
+ break;
+ }
+ case GL_LIGHT3:
+ {
+ if ( !nanoglState.light3 )
+ {
+ nanoglState.light3 = GL_TRUE;
+ statechanged = GL_TRUE;
+ }
+ break;
+ }
+ case GL_LIGHT4:
+ {
+ if ( !nanoglState.light4 )
+ {
+ nanoglState.light4 = GL_TRUE;
+ statechanged = GL_TRUE;
+ }
+ break;
+ }
+ case GL_LIGHT5:
+ {
+ if ( !nanoglState.light5 )
+ {
+ nanoglState.light5 = GL_TRUE;
+ statechanged = GL_TRUE;
+ }
+ break;
+ }
+ case GL_LIGHT6:
+ {
+ if ( !nanoglState.light6 )
+ {
+ nanoglState.light6 = GL_TRUE;
+ statechanged = GL_TRUE;
+ }
+ break;
+ }
+ case GL_LIGHT7:
+ {
+ if ( !nanoglState.light7 )
+ {
+ nanoglState.light7 = GL_TRUE;
+ statechanged = GL_TRUE;
}
+ break;
+ }
case GL_LIGHTING:
{
if ( !nanoglState.lighting )
break;
}
case GL_FOG:
- //case GL_LIGHTi
+ {
+ if ( nanoglState.fog )
{
- if ( nanoglState.fog )
- {
- nanoglState.fog = GL_FALSE;
- statechanged = GL_TRUE;
- }
- break;
+ nanoglState.fog = GL_FALSE;
+ statechanged = GL_TRUE;
}
+ break;
+ }
+ case GL_LIGHT0:
+ {
+ if ( !nanoglState.light0 )
+ {
+ nanoglState.light0 = GL_FALSE;
+ statechanged = GL_TRUE;
+ }
+ break;
+ }
+ case GL_LIGHT1:
+ {
+ if ( !nanoglState.light1 )
+ {
+ nanoglState.light1 = GL_FALSE;
+ statechanged = GL_TRUE;
+ }
+ break;
+ }
+ case GL_LIGHT2:
+ {
+ if ( !nanoglState.light2 )
+ {
+ nanoglState.light2 = GL_FALSE;
+ statechanged = GL_TRUE;
+ }
+ break;
+ }
+ case GL_LIGHT3:
+ {
+ if ( !nanoglState.light3 )
+ {
+ nanoglState.light3 = GL_FALSE;
+ statechanged = GL_TRUE;
+ }
+ break;
+ }
+ case GL_LIGHT4:
+ {
+ if ( !nanoglState.light4 )
+ {
+ nanoglState.light4 = GL_FALSE;
+ statechanged = GL_TRUE;
+ }
+ break;
+ }
+ case GL_LIGHT5:
+ {
+ if ( !nanoglState.light5 )
+ {
+ nanoglState.light5 = GL_FALSE;
+ statechanged = GL_TRUE;
+ }
+ break;
+ }
+ case GL_LIGHT6:
+ {
+ if ( !nanoglState.light6 )
+ {
+ nanoglState.light6 = GL_FALSE;
+ statechanged = GL_TRUE;
+ }
+ break;
+ }
+ case GL_LIGHT7:
+ {
+ if ( !nanoglState.light7 )
+ {
+ nanoglState.light7 = GL_FALSE;
+ statechanged = GL_TRUE;
+ }
+ break;
+ }
case GL_LIGHTING:
{
if ( nanoglState.lighting )
@@ -1006,6 +1162,50 @@ void glOrtho( GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat
#endif
}
+// Rikku2000: Light
+void glLightf( GLenum light, GLenum pname, GLfloat param )
+{
+ FlushOnStateChange( );
+
+ glEsImpl->glLightf( light, pname, param );
+}
+void glLightfv( GLenum light, GLenum pname, const GLfloat *params )
+{
+ FlushOnStateChange( );
+
+ glEsImpl->glLightfv( light, pname, params );
+}
+void glLightModelf( GLenum pname, GLfloat param )
+{
+ FlushOnStateChange( );
+
+ glEsImpl->glLightModelf( pname, param );
+}
+void glLightModelfv( GLenum pname, const GLfloat *params )
+{
+ FlushOnStateChange( );
+
+ glEsImpl->glLightModelfv( pname, params );
+}
+void glMaterialf( GLenum face, GLenum pname, GLfloat param )
+{
+ FlushOnStateChange( );
+
+ glEsImpl->glMaterialf( face, pname, param );
+}
+void glMaterialfv( GLenum face, GLenum pname, const GLfloat *params )
+{
+ FlushOnStateChange( );
+
+ glEsImpl->glMaterialfv( face, pname, params );
+}
+void glColorMaterial( GLenum face, GLenum mode )
+{
+ FlushOnStateChange( );
+
+ glEsImpl->glColorMaterial( face, mode );
+}
+
void glMatrixMode( GLenum mode )
{
if ( nanoglState.matrixmode == mode )
GLfloat *vert = (GLfloat *)ptrVertexAttribArray++;
*vert++ = x;
*vert++ = y;
- *vert++ = z;
+ *vert++ = z;
#if defined( __MULTITEXTURE_SUPPORT__ )
memcpy( vert, ¤tVertexAttrib.red, 5 * sizeof( GLfloat ) );
#else