FGAPI void FGAPIENTRY glutInitErrorFunc( void (* vError)( const char *fmt, va_list ap ) );
FGAPI void FGAPIENTRY glutInitWarningFunc( void (* vWarning)( const char *fmt, va_list ap ) );
+/* OpenGL >= 2.0 support */
+FGAPI void FGAPIENTRY glutSetVertexAttribCoord3(GLint attrib);
+FGAPI void FGAPIENTRY glutSetVertexAttribNormal(GLint attrib);
+
+
/*
* GLUT API macro definitions -- the display mode definitions
*/
#include "fg_internal.h"
#include "fg_gl2.h"
+void glutSetVertexAttribCoord3(GLint attrib) {
+ if (fgStructure.CurrentWindow != NULL)
+ fgStructure.CurrentWindow->Window.attribute_v_coord = attrib;
+}
+
+void glutSetVertexAttribNormal(GLint attrib) {
+ if (fgStructure.CurrentWindow != NULL)
+ fgStructure.CurrentWindow->Window.attribute_v_normal = attrib;
+}
+
typedef void (APIENTRY *PFNGLGENBUFFERSPROC) (GLsizei n, GLuint *buffers);
typedef void (APIENTRY *PFNGLBINDBUFFERPROC) (GLenum target, GLuint buffer);
typedef void (APIENTRY *PFNGLBUFFERDATAPROC) (GLenum target, fghGLsizeiptr size, const GLvoid *data, GLenum usage);
#ifndef APIENTRY
# define APIENTRY
#endif
+
typedef ptrdiff_t fghGLsizeiptr;
typedef void (APIENTRY *PFNGLGENBUFFERSPROC) (GLsizei n, GLuint *buffers);
typedef void (APIENTRY *PFNGLBINDBUFFERPROC) (GLenum target, GLuint buffer);
int MajorVersion; /* Major OpenGL context version */
int MinorVersion; /* Minor OpenGL context version */
int ContextFlags; /* OpenGL context flags */
- int HasOpenGL20; /* fgInitGL2 could find all OpenGL 2.0 functions */
int ContextProfile; /* OpenGL context profile */
+ int HasOpenGL20; /* fgInitGL2 could find all OpenGL 2.0 functions */
FGError ErrorFunc; /* User defined error handler */
FGWarning WarningFunc; /* User defined warning handler */
};
SFG_PlatformContext pContext; /* The window's FBConfig (X11) or device context (Windows) */
int DoubleBuffered; /* Treat the window as double-buffered */
+ GLint attribute_v_coord;
+ GLint attribute_v_normal;
};
glReadBuffer ( GL_FRONT );
}
#endif
+ window->Window.attribute_v_coord = -1;
+ window->Window.attribute_v_normal = -1;
}
/*