… | |
… | |
663 | SDL_GL_SwapBuffers () |
663 | SDL_GL_SwapBuffers () |
664 | |
664 | |
665 | char * |
665 | char * |
666 | SDL_GetKeyName (int sym) |
666 | SDL_GetKeyName (int sym) |
667 | |
667 | |
|
|
668 | int |
|
|
669 | SDL_GetAppState () |
|
|
670 | |
668 | void |
671 | void |
669 | SDL_PollEvent () |
672 | poll_events () |
670 | PPCODE: |
673 | PPCODE: |
671 | { |
674 | { |
672 | SDL_Event ev; |
675 | SDL_Event ev; |
673 | |
676 | |
674 | while (SDL_PollEvent (&ev)) |
677 | SDL_PumpEvents (); |
|
|
678 | while (SDL_PeepEvents (&ev, 1, SDL_GETEVENT, SDL_ALLEVENTS) > 0) |
675 | { |
679 | { |
676 | HV *hv = newHV (); |
680 | HV *hv = newHV (); |
677 | hv_store (hv, "type", 4, newSViv (ev.type), 0); |
681 | hv_store (hv, "type", 4, newSViv (ev.type), 0); |
678 | |
682 | |
679 | switch (ev.type) |
683 | switch (ev.type) |
… | |
… | |
1238 | flags |
1242 | flags |
1239 | ); |
1243 | ); |
1240 | |
1244 | |
1241 | MODULE = CFPlus PACKAGE = CFPlus::Texture |
1245 | MODULE = CFPlus PACKAGE = CFPlus::Texture |
1242 | |
1246 | |
|
|
1247 | int minpot (int n) |
|
|
1248 | |
1243 | void |
1249 | void |
1244 | pad2pot (SV *data_, SV *w_, SV *h_) |
1250 | pad2pot (SV *data_, SV *w_, SV *h_) |
1245 | CODE: |
1251 | CODE: |
1246 | { |
1252 | { |
1247 | int ow = SvIV (w_); |
1253 | int ow = SvIV (w_); |
… | |
… | |
1323 | { |
1329 | { |
1324 | glDisable (GL_ALPHA_TEST); |
1330 | glDisable (GL_ALPHA_TEST); |
1325 | glDisable (GL_BLEND); |
1331 | glDisable (GL_BLEND); |
1326 | } |
1332 | } |
1327 | } |
1333 | } |
|
|
1334 | |
|
|
1335 | IV texture_valid_2d (GLint internalformat, GLsizei w, GLsizei h, GLenum format, GLenum type) |
|
|
1336 | CODE: |
|
|
1337 | { |
|
|
1338 | GLint width; |
|
|
1339 | glTexImage2D (GL_PROXY_TEXTURE_2D, 0, internalformat, w, h, 0, format, type, 0); |
|
|
1340 | glGetTexLevelParameteriv (GL_PROXY_TEXTURE_2D, 0, GL_TEXTURE_WIDTH, &width); |
|
|
1341 | RETVAL = width > 0; |
|
|
1342 | } |
|
|
1343 | OUTPUT: |
|
|
1344 | RETVAL |
1328 | |
1345 | |
1329 | MODULE = CFPlus PACKAGE = CFPlus::Map |
1346 | MODULE = CFPlus PACKAGE = CFPlus::Map |
1330 | |
1347 | |
1331 | CFPlus::Map |
1348 | CFPlus::Map |
1332 | new (SV *class) |
1349 | new (SV *class) |
… | |
… | |
2201 | static const struct { |
2218 | static const struct { |
2202 | const char *name; |
2219 | const char *name; |
2203 | IV iv; |
2220 | IV iv; |
2204 | } *civ, const_iv[] = { |
2221 | } *civ, const_iv[] = { |
2205 | # define const_iv(name) { # name, (IV)name } |
2222 | # define const_iv(name) { # name, (IV)name } |
|
|
2223 | const_iv (GL_VENDOR), |
|
|
2224 | const_iv (GL_VERSION), |
|
|
2225 | const_iv (GL_EXTENSIONS), |
2206 | const_iv (GL_COLOR_MATERIAL), |
2226 | const_iv (GL_COLOR_MATERIAL), |
2207 | const_iv (GL_SMOOTH), |
2227 | const_iv (GL_SMOOTH), |
2208 | const_iv (GL_FLAT), |
2228 | const_iv (GL_FLAT), |
2209 | const_iv (GL_DITHER), |
2229 | const_iv (GL_DITHER), |
2210 | const_iv (GL_BLEND), |
2230 | const_iv (GL_BLEND), |
… | |
… | |
2237 | const_iv (GL_LUMINANCE), |
2257 | const_iv (GL_LUMINANCE), |
2238 | const_iv (GL_LUMINANCE_ALPHA), |
2258 | const_iv (GL_LUMINANCE_ALPHA), |
2239 | const_iv (GL_FLOAT), |
2259 | const_iv (GL_FLOAT), |
2240 | const_iv (GL_UNSIGNED_INT_8_8_8_8_REV), |
2260 | const_iv (GL_UNSIGNED_INT_8_8_8_8_REV), |
2241 | const_iv (GL_COMPILE), |
2261 | const_iv (GL_COMPILE), |
|
|
2262 | const_iv (GL_PROXY_TEXTURE_1D), |
|
|
2263 | const_iv (GL_PROXY_TEXTURE_2D), |
2242 | const_iv (GL_TEXTURE_1D), |
2264 | const_iv (GL_TEXTURE_1D), |
2243 | const_iv (GL_TEXTURE_2D), |
2265 | const_iv (GL_TEXTURE_2D), |
2244 | const_iv (GL_TEXTURE_ENV), |
2266 | const_iv (GL_TEXTURE_ENV), |
2245 | const_iv (GL_TEXTURE_MAG_FILTER), |
2267 | const_iv (GL_TEXTURE_MAG_FILTER), |
2246 | const_iv (GL_TEXTURE_MIN_FILTER), |
2268 | const_iv (GL_TEXTURE_MIN_FILTER), |
… | |
… | |
2312 | CODE: |
2334 | CODE: |
2313 | RETVAL = (char *)glGetString (GL_EXTENSIONS); |
2335 | RETVAL = (char *)glGetString (GL_EXTENSIONS); |
2314 | OUTPUT: |
2336 | OUTPUT: |
2315 | RETVAL |
2337 | RETVAL |
2316 | |
2338 | |
|
|
2339 | char *glGetString (GLenum pname) |
|
|
2340 | |
|
|
2341 | GLint glGetInteger (GLenum pname) |
|
|
2342 | CODE: |
|
|
2343 | glGetIntegerv (pname, &RETVAL); |
|
|
2344 | OUTPUT: |
|
|
2345 | RETVAL |
|
|
2346 | |
|
|
2347 | GLdouble glGetDouble (GLenum pname) |
|
|
2348 | CODE: |
|
|
2349 | glGetDoublev (pname, &RETVAL); |
|
|
2350 | OUTPUT: |
|
|
2351 | RETVAL |
|
|
2352 | |
2317 | int glGetError () |
2353 | int glGetError () |
2318 | |
2354 | |
2319 | void glFinish () |
2355 | void glFinish () |
2320 | |
2356 | |
2321 | void glClear (int mask) |
2357 | void glClear (int mask) |
… | |
… | |
2443 | |
2479 | |
2444 | void glCopyTexImage2D (int target, int level, int internalformat, int x, int y, int width, int height, int border) |
2480 | void glCopyTexImage2D (int target, int level, int internalformat, int x, int y, int width, int height, int border) |
2445 | |
2481 | |
2446 | void glDrawPixels (int width, int height, int format, int type, char *pixels) |
2482 | void glDrawPixels (int width, int height, int format, int type, char *pixels) |
2447 | |
2483 | |
|
|
2484 | void glPixelZoom (float x, float y) |
|
|
2485 | |
2448 | void glCopyPixels (int x, int y, int width, int height, int type = GL_COLOR) |
2486 | void glCopyPixels (int x, int y, int width, int height, int type = GL_COLOR) |
2449 | |
2487 | |
2450 | int glGenTexture () |
2488 | int glGenTexture () |
2451 | CODE: |
2489 | CODE: |
2452 | RETVAL = gen_texture (); |
2490 | RETVAL = gen_texture (); |