by chasester
on 11/16/2016 19:08, 2 messages, last message: 12/08/2016 00:32, 668 views, last view: 04/21/2024 16:34 |
This may only be a tesseract error, but its worth looking into.
I have some one building on gcc and is encountering an error on line 51 Stating that glVertexAttrib1f is undefined:
GLE_INITATTRIBF(vertex, ATTRIB_VERTEX);
This macro is on line 42-47:
#define GLE_INITATTRIBF(name, index)
GLE_INITATTRIB(name, index, f, float)
static inline void name(const vec &v) { glVertexAttrib3fv_(index, v.v); }
static inline void name(const vec &v, float w) { glVertexAttrib4f_(index, v.x, v.y, v.z, w); }
static inline void name(const vec2 &v) { glVertexAttrib2fv_(index, v.v); }
static inline void name(const vec4 &v) { glVertexAttrib4fv_(index, v.v); }
line 43 references a macro GLE_INITATTRIB which is defined on line 37 through 41:
#define GLE_INITATTRIB(name, index, suffix, type)
static inline void name##suffix(type x) { glVertexAttrib1##suffix##_(index, x); }
static inline void name##suffix(type x, type y) { glVertexAttrib2##suffix##_(index, x, y); }
static inline void name##suffix(type x, type y, type z) { glVertexAttrib3##suffix##_(index, x, y, z); }
static inline void name##suffix(type x, type y, type z, type w) { glVertexAttrib4##suffix##_(index, x, y, z, w); }
As can be noted there is a double concatination error here whereas glVertexAttrib1f would be glVertexAttrib1f_ therefore leading to an undefined. From what Ive read this is a removed feature (or maybe was never a feature) for version 6 gcc.
http://stackoverflow.com/questions/1489932/how-to-concatenate-twice-with-the-c-preprocessor-and-expand-a-macro-as-in-arg
Above is a way to fix this error for gcc.
Thanx
chasester
|