summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
ff7ec6e)
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@1570
7f0cb862-5218-0410-a997-
914c9d46530a
/* OpenGL >= 2.0 support */
FGAPI void FGAPIENTRY glutSetVertexAttribCoord3(GLint attrib);
FGAPI void FGAPIENTRY glutSetVertexAttribNormal(GLint attrib);
/* OpenGL >= 2.0 support */
FGAPI void FGAPIENTRY glutSetVertexAttribCoord3(GLint attrib);
FGAPI void FGAPIENTRY glutSetVertexAttribNormal(GLint attrib);
+FGAPI void FGAPIENTRY glutSetVertexAttribTexCoord2(GLint attrib);
/* Mobile platforms lifecycle */
FGAPI void FGAPIENTRY glutInitContextFunc(void (* callback)());
/* Mobile platforms lifecycle */
FGAPI void FGAPIENTRY glutInitContextFunc(void (* callback)());
CHECK_NAME(glutInitContextFunc)
CHECK_NAME(glutPauseFunc)
CHECK_NAME(glutResumeFunc)
CHECK_NAME(glutInitContextFunc)
CHECK_NAME(glutPauseFunc)
CHECK_NAME(glutResumeFunc)
+ CHECK_NAME(glutSetVertexAttribCoord3)
+ CHECK_NAME(glutSetVertexAttribNormal)
+ CHECK_NAME(glutSetVertexAttribTexCoord2)
#undef CHECK_NAME
return NULL;
#undef CHECK_NAME
return NULL;
{
GLint attribute_v_coord = fgStructure.CurrentWindow->Window.attribute_v_coord;
GLint attribute_v_normal = fgStructure.CurrentWindow->Window.attribute_v_normal;
{
GLint attribute_v_coord = fgStructure.CurrentWindow->Window.attribute_v_coord;
GLint attribute_v_normal = fgStructure.CurrentWindow->Window.attribute_v_normal;
- GLint attribute_v_texture = -1; // TODO!!!
+ GLint attribute_v_texture = fgStructure.CurrentWindow->Window.attribute_v_texture;
if (fgStructure.CurrentWindow->State.VisualizeNormals)
/* generate normals for each vertex to be drawn as well */
if (fgStructure.CurrentWindow->State.VisualizeNormals)
/* generate normals for each vertex to be drawn as well */
fgStructure.CurrentWindow->Window.attribute_v_normal = attrib;
}
fgStructure.CurrentWindow->Window.attribute_v_normal = attrib;
}
+void FGAPIENTRY glutSetVertexAttribTexCoord2(GLint attrib) {
+ if (fgStructure.CurrentWindow != NULL)
+ fgStructure.CurrentWindow->Window.attribute_v_texture = attrib;
+}
+
void fgInitGL2() {
#ifndef GL_ES_VERSION_2_0
fgState.HasOpenGL20 = 0;
void fgInitGL2() {
#ifndef GL_ES_VERSION_2_0
fgState.HasOpenGL20 = 0;
SFG_PlatformContext pContext; /* The window's FBConfig (X11) or device context (Windows) */
int DoubleBuffered; /* Treat the window as double-buffered */
SFG_PlatformContext pContext; /* The window's FBConfig (X11) or device context (Windows) */
int DoubleBuffered; /* Treat the window as double-buffered */
+
+ /* When drawing geometry to vertex attribute buffers, user specifies
+ * the attribute indices for vertices, normals and/or texture coords
+ * to freeglut. Those are stored here
+ */
GLint attribute_v_coord;
GLint attribute_v_normal;
GLint attribute_v_coord;
GLint attribute_v_normal;
+ GLint attribute_v_texture;
#endif
window->Window.attribute_v_coord = -1;
window->Window.attribute_v_normal = -1;
#endif
window->Window.attribute_v_coord = -1;
window->Window.attribute_v_normal = -1;
+ window->Window.attribute_v_texture = -1;
glutMultiEntryFunc
glutMultiMotionFunc
glutMultiPassiveFunc
glutMultiEntryFunc
glutMultiMotionFunc
glutMultiPassiveFunc
- glutInitContextFunc
- glutPauseFunc
- glutResumeFunc
+ glutInitContextFunc
+ glutPauseFunc
+ glutResumeFunc
+ glutSetVertexAttribCoord3
+ glutSetVertexAttribNormal
+ glutSetVertexAttribTexCoord2