… | |
… | |
930 | |
930 | |
931 | SDL_WM_SetCaption ("Deliantra MORPG Client " VERSION, "Deliantra"); |
931 | SDL_WM_SetCaption ("Deliantra MORPG Client " VERSION, "Deliantra"); |
932 | #define GL_FUNC(ptr,name) gl.name = (ptr)SDL_GL_GetProcAddress ("gl" # name); |
932 | #define GL_FUNC(ptr,name) gl.name = (ptr)SDL_GL_GetProcAddress ("gl" # name); |
933 | #include "glfunc.h" |
933 | #include "glfunc.h" |
934 | #undef GL_FUNC |
934 | #undef GL_FUNC |
|
|
935 | |
|
|
936 | if (!gl.ActiveTexture ) gl.ActiveTexture = gl.ActiveTextureARB; |
|
|
937 | if (!gl.MultiTexCoord2f) gl.MultiTexCoord2f = gl.MultiTexCoord2fARB; |
935 | } |
938 | } |
936 | } |
939 | } |
937 | OUTPUT: |
940 | OUTPUT: |
938 | RETVAL |
941 | RETVAL |
939 | |
942 | |
… | |
… | |
1672 | void |
1675 | void |
1673 | draw_fow_texture (float intensity, int hidden_tex, int name1, uint8_t *data1, float s, float t, int w, int h, float blend = 0.f, int dx = 0, int dy = 0, int name2 = 0, uint8_t *data2 = data1) |
1676 | draw_fow_texture (float intensity, int hidden_tex, int name1, uint8_t *data1, float s, float t, int w, int h, float blend = 0.f, int dx = 0, int dy = 0, int name2 = 0, uint8_t *data2 = data1) |
1674 | PROTOTYPE: @ |
1677 | PROTOTYPE: @ |
1675 | CODE: |
1678 | CODE: |
1676 | { |
1679 | { |
1677 | glEnable (GL_TEXTURE_2D); |
|
|
1678 | glEnable (GL_BLEND); |
1680 | glEnable (GL_BLEND); |
1679 | glBlendFunc (GL_ONE, GL_ONE_MINUS_SRC_ALPHA); |
1681 | glBlendFunc (GL_ONE, GL_ONE_MINUS_SRC_ALPHA); |
|
|
1682 | glEnable (GL_TEXTURE_2D); |
1680 | glBindTexture (GL_TEXTURE_2D, name1); |
1683 | glBindTexture (GL_TEXTURE_2D, name1); |
1681 | |
1684 | |
1682 | glColor3f (intensity, intensity, intensity); |
1685 | glColor3f (intensity, intensity, intensity); |
1683 | glPushMatrix (); |
1686 | glPushMatrix (); |
1684 | glScalef (1./3, 1./3, 1.); |
1687 | glScalef (1./3, 1./3, 1.); |