Perl-GPU / OpenGL-Modern

Perl OpenGL bindings for modern OpenGL 3.1-4.x
7 stars 5 forks source link

RFC: add classic tests with as much ::Modern usage as possible #41

Open wchristian opened 7 years ago

wchristian commented 7 years ago

Don't merge this! I want input.

Since the test suite at the moment is rather small and we have an older piece of perfectly good code lying around, i figured i might as well port it to ::Modern as much as possible, and make it a highly optional test that we can use to verify base functionality.

Additionally this serves as a neat additional proving ground for which functions you wish to retain from the older set and which of the functions in the test you'd change to other calls. Please look through it and primarily comment on that. (Though i welcome any other thoughts as well.)

wchristian commented 7 years ago

Migrated the glut functions to OpenGL::GLUT as per devel-chm/OpenGL-GLUT#2 and everything seems to be fine. This leaves:

use OpenGL qw' glpCheckExtension glpFullScreen glpRestoreScreen ',    # glp

  qw' gluBuild2DMipmaps_c gluPerspective gluOrtho2D gluUnProject_p gluErrorString ',    # glu

  qw' glProgramStringARB_p
  glMapBufferARB_p glGetBufferSubDataARB_p
  glLightfv_p
  glDeleteProgramsARB_p glDeleteFramebuffersEXT_p glDeleteRenderbuffersEXT_p glDeleteBuffersARB_p glDeleteTextures_p
  glGetBufferParameterivARB_p glGetProgramStringARB_p glGetProgramivARB_p glGetProgramEnvParameterdvARB_p glGetProgramEnvParameterfvARB_p
  glVertexPointer_p glColorPointer_p glTexCoordPointer_p glNormalPointer_p

  glTexImage2D_s glTexImage2D_p
  ';