Back to index

nux  3.0.0
Functions
arb_programs_limits.cpp File Reference
#include "NuxCore/NuxCore.h"
#include "NuxGraphics/BitmapFormats.h"
#include "NuxGraphics/GraphicsDisplay.h"
#include "NuxGraphics/GLWindowManager.h"
#include "NuxGraphics/GraphicsEngine.h"

Go to the source code of this file.

Functions

void ARBProgramLimits ()
int main (int argc, char **argv)

Function Documentation

void ARBProgramLimits ( )

Definition at line 33 of file arb_programs_limits.cpp.

{
  nux::GraphicsDisplay* graphics_display = gGLWindowManager.CreateGLWindow("Window", 570, 270, nux::WINDOWSTYLE_NORMAL, 0, false);


  int OPENGL_MAX_PROGRAM_INSTRUCTIONS_ARB;
  int OPENGL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB;
  int OPENGL_MAX_PROGRAM_TEMPORARIES_ARB;
  int OPENGL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB;
  int OPENGL_MAX_PROGRAM_PARAMETERS_ARB;
  int OPENGL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB;
  int OPENGL_MAX_PROGRAM_ATTRIBS_ARB;
  int OPENGL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB;
  int OPENGL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB;
  int OPENGL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB;
  int OPENGL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB;
  int OPENGL_MAX_PROGRAM_ENV_PARAMETERS_ARB;
  int OPENGL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB;
  int OPENGL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB;
  int OPENGL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB;
  int OPENGL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB;
  int OPENGL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB;
  int OPENGL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB;

  
  CHECKGL (glGetProgramivARB(GL_VERTEX_PROGRAM_ARB, GL_MAX_PROGRAM_INSTRUCTIONS_ARB,                &OPENGL_MAX_PROGRAM_INSTRUCTIONS_ARB) );
  CHECKGL (glGetProgramivARB(GL_VERTEX_PROGRAM_ARB, GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB,         &OPENGL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB) );
  CHECKGL (glGetProgramivARB(GL_VERTEX_PROGRAM_ARB, GL_MAX_PROGRAM_TEMPORARIES_ARB,                 &OPENGL_MAX_PROGRAM_TEMPORARIES_ARB) );
  CHECKGL (glGetProgramivARB(GL_VERTEX_PROGRAM_ARB, GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB,          &OPENGL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB) );
  CHECKGL (glGetProgramivARB(GL_VERTEX_PROGRAM_ARB, GL_MAX_PROGRAM_PARAMETERS_ARB,                  &OPENGL_MAX_PROGRAM_PARAMETERS_ARB) );
  CHECKGL (glGetProgramivARB(GL_VERTEX_PROGRAM_ARB, GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB,           &OPENGL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB) );
  CHECKGL (glGetProgramivARB(GL_VERTEX_PROGRAM_ARB, GL_MAX_PROGRAM_ATTRIBS_ARB,                     &OPENGL_MAX_PROGRAM_ATTRIBS_ARB) );
  CHECKGL (glGetProgramivARB(GL_VERTEX_PROGRAM_ARB, GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB,              &OPENGL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB) );
  CHECKGL (glGetProgramivARB(GL_VERTEX_PROGRAM_ARB, GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB,           &OPENGL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB) );
  CHECKGL (glGetProgramivARB(GL_VERTEX_PROGRAM_ARB, GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB,    &OPENGL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB) );
  CHECKGL (glGetProgramivARB(GL_VERTEX_PROGRAM_ARB, GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB,            &OPENGL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB) );
  CHECKGL (glGetProgramivARB(GL_VERTEX_PROGRAM_ARB, GL_MAX_PROGRAM_ENV_PARAMETERS_ARB,              &OPENGL_MAX_PROGRAM_ENV_PARAMETERS_ARB) );
  CHECKGL (glGetProgramivARB(GL_VERTEX_PROGRAM_ARB, GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB,            &OPENGL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB) );
  CHECKGL (glGetProgramivARB(GL_VERTEX_PROGRAM_ARB, GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB,     &OPENGL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB) );
  CHECKGL (glGetProgramivARB(GL_VERTEX_PROGRAM_ARB, GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB,            &OPENGL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB) );
  CHECKGL (glGetProgramivARB(GL_VERTEX_PROGRAM_ARB, GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB,     &OPENGL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB) );
  CHECKGL (glGetProgramivARB(GL_VERTEX_PROGRAM_ARB, GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB,            &OPENGL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB) );
  CHECKGL (glGetProgramivARB(GL_VERTEX_PROGRAM_ARB, GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB,     &OPENGL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB) );
  
  nux::LogOutputSeverityMessage(nux::NUX_MSG_SEVERITY_NONE, "---------------------------------------------");
  nux::LogOutputSeverityMessage(nux::NUX_MSG_SEVERITY_NONE, "Vertex Program");
  nux::LogOutputSeverityMessage(nux::NUX_MSG_SEVERITY_NONE, "---------------------------------------------");
  nux::LogOutputSeverityMessage(nux::NUX_MSG_SEVERITY_INFO, "MAX_PROGRAM_INSTRUCTIONS_ARB             = %d",  OPENGL_MAX_PROGRAM_INSTRUCTIONS_ARB);
  nux::LogOutputSeverityMessage(nux::NUX_MSG_SEVERITY_INFO, "MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB      = %d",  OPENGL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB);
  nux::LogOutputSeverityMessage(nux::NUX_MSG_SEVERITY_INFO, "MAX_PROGRAM_TEMPORARIES_ARB              = %d",  OPENGL_MAX_PROGRAM_TEMPORARIES_ARB);
  nux::LogOutputSeverityMessage(nux::NUX_MSG_SEVERITY_INFO, "MAX_PROGRAM_NATIVE_TEMPORARIES_ARB       = %d",  OPENGL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB);
  nux::LogOutputSeverityMessage(nux::NUX_MSG_SEVERITY_INFO, "MAX_PROGRAM_PARAMETERS_ARB               = %d",  OPENGL_MAX_PROGRAM_PARAMETERS_ARB);
  nux::LogOutputSeverityMessage(nux::NUX_MSG_SEVERITY_INFO, "MAX_PROGRAM_NATIVE_PARAMETERS_ARB        = %d",  OPENGL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB);
  nux::LogOutputSeverityMessage(nux::NUX_MSG_SEVERITY_INFO, "MAX_PROGRAM_ATTRIBS_ARB                  = %d",  OPENGL_MAX_PROGRAM_ATTRIBS_ARB);
  nux::LogOutputSeverityMessage(nux::NUX_MSG_SEVERITY_INFO, "MAX_PROGRAM_NATIVE_ATTRIBS_ARB           = %d",  OPENGL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB);
  nux::LogOutputSeverityMessage(nux::NUX_MSG_SEVERITY_INFO, "MAX_PROGRAM_ADDRESS_REGISTERS_ARB        = %d",  OPENGL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB);
  nux::LogOutputSeverityMessage(nux::NUX_MSG_SEVERITY_INFO, "MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB = %d",  OPENGL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB);
  nux::LogOutputSeverityMessage(nux::NUX_MSG_SEVERITY_INFO, "MAX_PROGRAM_LOCAL_PARAMETERS_ARB         = %d",  OPENGL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB);
  nux::LogOutputSeverityMessage(nux::NUX_MSG_SEVERITY_INFO, "MAX_PROGRAM_ENV_PARAMETERS_ARB           = %d",  OPENGL_MAX_PROGRAM_ENV_PARAMETERS_ARB);
  nux::LogOutputSeverityMessage(nux::NUX_MSG_SEVERITY_INFO, "MAX_PROGRAM_ALU_INSTRUCTIONS_ARB         = %d",  OPENGL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB);
  nux::LogOutputSeverityMessage(nux::NUX_MSG_SEVERITY_INFO, "MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB  = %d",  OPENGL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB);
  nux::LogOutputSeverityMessage(nux::NUX_MSG_SEVERITY_INFO, "MAX_PROGRAM_TEX_INSTRUCTIONS_ARB         = %d",  OPENGL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB);
  nux::LogOutputSeverityMessage(nux::NUX_MSG_SEVERITY_INFO, "MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB  = %d",  OPENGL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB);
  nux::LogOutputSeverityMessage(nux::NUX_MSG_SEVERITY_INFO, "MAX_PROGRAM_TEX_INDIRECTIONS_ARB         = %d",  OPENGL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB);
  nux::LogOutputSeverityMessage(nux::NUX_MSG_SEVERITY_INFO, "MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB  = %d",  OPENGL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB);
  
  CHECKGL (glGetProgramivARB(GL_FRAGMENT_PROGRAM_ARB, GL_MAX_PROGRAM_INSTRUCTIONS_ARB,                &OPENGL_MAX_PROGRAM_INSTRUCTIONS_ARB) );
  CHECKGL (glGetProgramivARB(GL_FRAGMENT_PROGRAM_ARB, GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB,         &OPENGL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB) );
  CHECKGL (glGetProgramivARB(GL_FRAGMENT_PROGRAM_ARB, GL_MAX_PROGRAM_TEMPORARIES_ARB,                 &OPENGL_MAX_PROGRAM_TEMPORARIES_ARB) );
  CHECKGL (glGetProgramivARB(GL_FRAGMENT_PROGRAM_ARB, GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB,          &OPENGL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB) );
  CHECKGL (glGetProgramivARB(GL_FRAGMENT_PROGRAM_ARB, GL_MAX_PROGRAM_PARAMETERS_ARB,                  &OPENGL_MAX_PROGRAM_PARAMETERS_ARB) );
  CHECKGL (glGetProgramivARB(GL_FRAGMENT_PROGRAM_ARB, GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB,           &OPENGL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB) );
  CHECKGL (glGetProgramivARB(GL_FRAGMENT_PROGRAM_ARB, GL_MAX_PROGRAM_ATTRIBS_ARB,                     &OPENGL_MAX_PROGRAM_ATTRIBS_ARB) );
  CHECKGL (glGetProgramivARB(GL_FRAGMENT_PROGRAM_ARB, GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB,              &OPENGL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB) );
  CHECKGL (glGetProgramivARB(GL_FRAGMENT_PROGRAM_ARB, GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB,           &OPENGL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB) );
  CHECKGL (glGetProgramivARB(GL_FRAGMENT_PROGRAM_ARB, GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB,    &OPENGL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB) );
  CHECKGL (glGetProgramivARB(GL_FRAGMENT_PROGRAM_ARB, GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB,            &OPENGL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB) );
  CHECKGL (glGetProgramivARB(GL_FRAGMENT_PROGRAM_ARB, GL_MAX_PROGRAM_ENV_PARAMETERS_ARB,              &OPENGL_MAX_PROGRAM_ENV_PARAMETERS_ARB) );
  CHECKGL (glGetProgramivARB(GL_FRAGMENT_PROGRAM_ARB, GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB,            &OPENGL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB) );
  CHECKGL (glGetProgramivARB(GL_FRAGMENT_PROGRAM_ARB, GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB,     &OPENGL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB) );
  CHECKGL (glGetProgramivARB(GL_FRAGMENT_PROGRAM_ARB, GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB,            &OPENGL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB) );
  CHECKGL (glGetProgramivARB(GL_FRAGMENT_PROGRAM_ARB, GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB,     &OPENGL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB) );
  CHECKGL (glGetProgramivARB(GL_FRAGMENT_PROGRAM_ARB, GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB,            &OPENGL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB) );
  CHECKGL (glGetProgramivARB(GL_FRAGMENT_PROGRAM_ARB, GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB,     &OPENGL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB) );
  
  
  nux::LogOutputSeverityMessage(nux::NUX_MSG_SEVERITY_NONE, "---------------------------------------------");
  nux::LogOutputSeverityMessage(nux::NUX_MSG_SEVERITY_NONE, "Fragment Program");
  nux::LogOutputSeverityMessage(nux::NUX_MSG_SEVERITY_NONE, "---------------------------------------------");
  nux::LogOutputSeverityMessage(nux::NUX_MSG_SEVERITY_INFO, "MAX_PROGRAM_INSTRUCTIONS_ARB             = %d",  OPENGL_MAX_PROGRAM_INSTRUCTIONS_ARB);
  nux::LogOutputSeverityMessage(nux::NUX_MSG_SEVERITY_INFO, "MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB      = %d",  OPENGL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB);
  nux::LogOutputSeverityMessage(nux::NUX_MSG_SEVERITY_INFO, "MAX_PROGRAM_TEMPORARIES_ARB              = %d",  OPENGL_MAX_PROGRAM_TEMPORARIES_ARB);
  nux::LogOutputSeverityMessage(nux::NUX_MSG_SEVERITY_INFO, "MAX_PROGRAM_NATIVE_TEMPORARIES_ARB       = %d",  OPENGL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB);
  nux::LogOutputSeverityMessage(nux::NUX_MSG_SEVERITY_INFO, "MAX_PROGRAM_PARAMETERS_ARB               = %d",  OPENGL_MAX_PROGRAM_PARAMETERS_ARB);
  nux::LogOutputSeverityMessage(nux::NUX_MSG_SEVERITY_INFO, "MAX_PROGRAM_NATIVE_PARAMETERS_ARB        = %d",  OPENGL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB);
  nux::LogOutputSeverityMessage(nux::NUX_MSG_SEVERITY_INFO, "MAX_PROGRAM_ATTRIBS_ARB                  = %d",  OPENGL_MAX_PROGRAM_ATTRIBS_ARB);
  nux::LogOutputSeverityMessage(nux::NUX_MSG_SEVERITY_INFO, "MAX_PROGRAM_NATIVE_ATTRIBS_ARB           = %d",  OPENGL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB);
  nux::LogOutputSeverityMessage(nux::NUX_MSG_SEVERITY_INFO, "MAX_PROGRAM_ADDRESS_REGISTERS_ARB        = %d",  OPENGL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB);
  nux::LogOutputSeverityMessage(nux::NUX_MSG_SEVERITY_INFO, "MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB = %d",  OPENGL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB);
  nux::LogOutputSeverityMessage(nux::NUX_MSG_SEVERITY_INFO, "MAX_PROGRAM_LOCAL_PARAMETERS_ARB         = %d",  OPENGL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB);
  nux::LogOutputSeverityMessage(nux::NUX_MSG_SEVERITY_INFO, "MAX_PROGRAM_ENV_PARAMETERS_ARB           = %d",  OPENGL_MAX_PROGRAM_ENV_PARAMETERS_ARB);
  nux::LogOutputSeverityMessage(nux::NUX_MSG_SEVERITY_INFO, "MAX_PROGRAM_ALU_INSTRUCTIONS_ARB         = %d",  OPENGL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB);
  nux::LogOutputSeverityMessage(nux::NUX_MSG_SEVERITY_INFO, "MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB  = %d",  OPENGL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB);
  nux::LogOutputSeverityMessage(nux::NUX_MSG_SEVERITY_INFO, "MAX_PROGRAM_TEX_INSTRUCTIONS_ARB         = %d",  OPENGL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB);
  nux::LogOutputSeverityMessage(nux::NUX_MSG_SEVERITY_INFO, "MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB  = %d",  OPENGL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB);
  nux::LogOutputSeverityMessage(nux::NUX_MSG_SEVERITY_INFO, "MAX_PROGRAM_TEX_INDIRECTIONS_ARB         = %d",  OPENGL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB);
  nux::LogOutputSeverityMessage(nux::NUX_MSG_SEVERITY_INFO, "MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB  = %d",  OPENGL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB);

  delete graphics_display;
}

Here is the call graph for this function:

Here is the caller graph for this function:

int main ( int  argc,
char **  argv 
)

Definition at line 144 of file arb_programs_limits.cpp.

Here is the call graph for this function: