equal
deleted
inserted
replaced
30 #ifdef _MSC_VER |
30 #ifdef _MSC_VER |
31 #define snprintf _snprintf |
31 #define snprintf _snprintf |
32 typedef unsigned __int8 uint8; |
32 typedef unsigned __int8 uint8; |
33 typedef unsigned __int32 uint32; |
33 typedef unsigned __int32 uint32; |
34 typedef unsigned __int32 int32; |
34 typedef unsigned __int32 int32; |
|
35 // Warning Level 4 considered harmful. :) |
|
36 #pragma warning(disable: 4100) // "unreferenced formal parameter" |
|
37 #pragma warning(disable: 4389) // "signed/unsigned mismatch" |
35 #else |
38 #else |
36 #include <stdint.h> |
39 #include <stdint.h> |
37 typedef uint8_t uint8; |
40 typedef uint8_t uint8; |
38 typedef uint32_t uint32; |
41 typedef uint32_t uint32; |
39 typedef int32_t int32; |
42 typedef int32_t int32; |
322 return 0; |
325 return 0; |
323 |
326 |
324 #define MUST_HAVE(p, x) \ |
327 #define MUST_HAVE(p, x) \ |
325 if (!ctx->have_##x) { set_error(#p " profile needs " #x); return 0; } |
328 if (!ctx->have_##x) { set_error(#p " profile needs " #x); return 0; } |
326 |
329 |
327 if (0) {} |
330 if (profile == NULL) |
|
331 { |
|
332 set_error("NULL profile"); |
|
333 return 0; |
|
334 } // if |
328 |
335 |
329 #if SUPPORT_PROFILE_GLSL |
336 #if SUPPORT_PROFILE_GLSL |
330 else if (strcmp(profile, MOJOSHADER_PROFILE_GLSL) == 0) |
337 else if (strcmp(profile, MOJOSHADER_PROFILE_GLSL) == 0) |
331 { |
338 { |
332 MUST_HAVE(MOJOSHADER_PROFILE_GLSL, GL_ARB_shader_objects); |
339 MUST_HAVE(MOJOSHADER_PROFILE_GLSL, GL_ARB_shader_objects); |