… | |
… | |
414 | SDL_WM_SetCaption ("Crossfire+ Client " VERSION, "Crossfire+"); |
414 | SDL_WM_SetCaption ("Crossfire+ Client " VERSION, "Crossfire+"); |
415 | OUTPUT: |
415 | OUTPUT: |
416 | RETVAL |
416 | RETVAL |
417 | |
417 | |
418 | void |
418 | void |
|
|
419 | SDL_GL_SwapBuffers () |
|
|
420 | |
|
|
421 | void |
419 | SDL_PollEvent () |
422 | SDL_PollEvent () |
420 | PPCODE: |
423 | PPCODE: |
421 | { |
424 | { |
422 | SDL_Event ev; |
425 | SDL_Event ev; |
423 | |
426 | |
… | |
… | |
1268 | CODE: |
1271 | CODE: |
1269 | RETVAL = Mix_PlayMusic (self, loops); |
1272 | RETVAL = Mix_PlayMusic (self, loops); |
1270 | OUTPUT: |
1273 | OUTPUT: |
1271 | RETVAL |
1274 | RETVAL |
1272 | |
1275 | |
|
|
1276 | MODULE = CFClient PACKAGE = CFClient::OpenGL |
|
|
1277 | |
|
|
1278 | BOOT: |
|
|
1279 | { |
|
|
1280 | HV *stash = gv_stashpv ("CFClient::OpenGL", 1); |
|
|
1281 | static const struct { |
|
|
1282 | const char *name; |
|
|
1283 | IV iv; |
|
|
1284 | } *civ, const_iv[] = { |
|
|
1285 | # define const_iv(name) { # name, (IV)name } |
|
|
1286 | const_iv (GL_COLOR_MATERIAL), |
|
|
1287 | const_iv (GL_SMOOTH), |
|
|
1288 | const_iv (GL_FLAT), |
|
|
1289 | const_iv (GL_BLEND), |
|
|
1290 | const_iv (GL_AND), |
|
|
1291 | const_iv (GL_SRC_ALPHA), |
|
|
1292 | const_iv (GL_ONE_MINUS_SRC_ALPHA), |
|
|
1293 | const_iv (GL_RGB), |
|
|
1294 | const_iv (GL_RGBA), |
|
|
1295 | const_iv (GL_UNSIGNED_BYTE), |
|
|
1296 | const_iv (GL_ALPHA4), |
|
|
1297 | const_iv (GL_ALPHA), |
|
|
1298 | const_iv (GL_FLOAT), |
|
|
1299 | const_iv (GL_UNSIGNED_INT_8_8_8_8_REV), |
|
|
1300 | const_iv (GL_COMPILE), |
|
|
1301 | const_iv (GL_TEXTURE_1D), |
|
|
1302 | const_iv (GL_TEXTURE_2D), |
|
|
1303 | const_iv (GL_TEXTURE_ENV), |
|
|
1304 | const_iv (GL_TEXTURE_MAG_FILTER), |
|
|
1305 | const_iv (GL_TEXTURE_MIN_FILTER), |
|
|
1306 | const_iv (GL_TEXTURE_ENV_MODE), |
|
|
1307 | const_iv (GL_TEXTURE_WRAP_S), |
|
|
1308 | const_iv (GL_TEXTURE_WRAP_T), |
|
|
1309 | const_iv (GL_CLAMP), |
|
|
1310 | const_iv (GL_REPEAT), |
|
|
1311 | const_iv (GL_NEAREST), |
|
|
1312 | const_iv (GL_LINEAR), |
|
|
1313 | const_iv (GL_MODULATE), |
|
|
1314 | const_iv (GL_REPLACE), |
|
|
1315 | const_iv (GL_COLOR_BUFFER_BIT), |
|
|
1316 | const_iv (GL_PROJECTION), |
|
|
1317 | const_iv (GL_MODELVIEW), |
|
|
1318 | const_iv (GL_COLOR_LOGIC_OP), |
|
|
1319 | const_iv (GL_CONVOLUTION_2D), |
|
|
1320 | const_iv (GL_CONVOLUTION_BORDER_MODE), |
|
|
1321 | const_iv (GL_CONSTANT_BORDER), |
|
|
1322 | const_iv (GL_LINES), |
|
|
1323 | const_iv (GL_QUADS), |
|
|
1324 | const_iv (GL_PERSPECTIVE_CORRECTION_HINT), |
|
|
1325 | const_iv (GL_FASTEST), |
|
|
1326 | # undef const_iv |
|
|
1327 | }; |
|
|
1328 | |
|
|
1329 | for (civ = const_iv + sizeof (const_iv) / sizeof (const_iv [0]); civ-- > const_iv; ) |
|
|
1330 | newCONSTSUB (stash, (char *)civ->name, newSViv (civ->iv)); |
|
|
1331 | } |
|
|
1332 | |
|
|
1333 | int glGetError () |
|
|
1334 | |
|
|
1335 | void glClear (int mask) |
|
|
1336 | |
|
|
1337 | void glClearColor (float r, float g, float b, float a = 1.0) |
|
|
1338 | PROTOTYPE: @ |
|
|
1339 | |
|
|
1340 | void glEnable (int cap) |
|
|
1341 | |
|
|
1342 | void glDisable (int cap) |
|
|
1343 | |
|
|
1344 | void glShadeModel (int mode) |
|
|
1345 | |
|
|
1346 | void glHint (int target, int mode) |
|
|
1347 | |
|
|
1348 | void glBlendFunc (int sfactor, int dfactor) |
|
|
1349 | |
|
|
1350 | void glLogicOp (int opcode) |
|
|
1351 | |
|
|
1352 | void glMatrixMode (int mode) |
|
|
1353 | |
|
|
1354 | void glPushMatrix () |
|
|
1355 | |
|
|
1356 | void glPopMatrix () |
|
|
1357 | |
|
|
1358 | void glLoadIdentity () |
|
|
1359 | |
|
|
1360 | void glOrtho (double left, double right, double bottom, double top, double near, double far) |
|
|
1361 | |
|
|
1362 | void glViewport (int x, int y, int width, int height) |
|
|
1363 | |
|
|
1364 | void glTranslate (float x, float y, float z = 0.) |
|
|
1365 | CODE: |
|
|
1366 | glTranslatef (x, y, z); |
|
|
1367 | |
|
|
1368 | void glScale (float x, float y, float z) |
|
|
1369 | CODE: |
|
|
1370 | glScalef (x, y, z); |
|
|
1371 | |
|
|
1372 | void glRotate (float angle, float x, float y, float z) |
|
|
1373 | CODE: |
|
|
1374 | glRotatef (angle, x, y, z); |
|
|
1375 | |
|
|
1376 | void glBegin (int mode) |
|
|
1377 | |
|
|
1378 | void glEnd () |
|
|
1379 | |
|
|
1380 | void glColor (float r, float g, float b, float a = 1.0) |
|
|
1381 | PROTOTYPE: @ |
|
|
1382 | CODE: |
|
|
1383 | glColor4f (r, g, b, a); |
|
|
1384 | |
|
|
1385 | void glVertex (float x, float y, float z = 0.) |
|
|
1386 | CODE: |
|
|
1387 | glVertex3f (x, y, z); |
|
|
1388 | |
|
|
1389 | void glTexCoord (float s, float t) |
|
|
1390 | CODE: |
|
|
1391 | glTexCoord2f (s, t); |
|
|
1392 | |
|
|
1393 | void glTexEnv (int target, int pname, float param) |
|
|
1394 | CODE: |
|
|
1395 | glTexEnvf (target, pname, param); |
|
|
1396 | |
|
|
1397 | void glTexParameter (int target, int pname, float param) |
|
|
1398 | CODE: |
|
|
1399 | glTexParameterf (target, pname, param); |
|
|
1400 | |
|
|
1401 | void glBindTexture (int target, int name) |
|
|
1402 | |
|
|
1403 | void glConvolutionParameter (int target, int pname, float params) |
|
|
1404 | CODE: |
|
|
1405 | glConvolutionParameterf (target, pname, params); |
|
|
1406 | |
|
|
1407 | void glConvolutionFilter2D (int target, int internalformat, int width, int height, int format, int type, char *data) |
|
|
1408 | |
|
|
1409 | void glTexImage2D (int target, int level, int internalformat, int width, int height, int border, int format, int type, char *data) |
|
|
1410 | |
|
|
1411 | void glCopyTexImage2D (int target, int level, int internalformat, int x, int y, int width, int height, int border) |
|
|
1412 | |
|
|
1413 | int glGenTexture () |
|
|
1414 | CODE: |
|
|
1415 | { |
|
|
1416 | GLuint name; |
|
|
1417 | glGenTextures (1, &name); |
|
|
1418 | RETVAL = name; |
|
|
1419 | } |
|
|
1420 | OUTPUT: |
|
|
1421 | RETVAL |
|
|
1422 | |
|
|
1423 | void glDeleteTexture (int name) |
|
|
1424 | CODE: |
|
|
1425 | { |
|
|
1426 | GLuint name_ = name; |
|
|
1427 | glDeleteTextures (1, &name_); |
|
|
1428 | } |
|
|
1429 | |
|
|
1430 | int glGenList () |
|
|
1431 | CODE: |
|
|
1432 | RETVAL = glGenLists (1); |
|
|
1433 | OUTPUT: |
|
|
1434 | RETVAL |
|
|
1435 | |
|
|
1436 | void glDeleteList (int list) |
|
|
1437 | CODE: |
|
|
1438 | glDeleteLists (list, 1); |
|
|
1439 | |
|
|
1440 | void glNewList (int list, int mode = GL_COMPILE) |
|
|
1441 | |
|
|
1442 | void glEndList () |
|
|
1443 | |
|
|
1444 | void glCallList (int list) |
|
|
1445 | |