pat ill email u the source (inluded below) + an linux exe.
heres the output
glSecondaryColorPointerEXT 0
glSecondaryColorPointerEXT 8049f18
glSecondaryColorPointerEXT test:Fatal signal: Segmentation Fault (SDL Parachute Deployed)
(ill post this in the linux forum as well perhaps others have experienced this before)
#define NO_SDL_GLEXT 1
#include <SDL/SDL.h>
#include <SDL/SDL_opengl.h>
#include “glext.h”
#include <stdio.h>
#include <stdlib.h>
int window_Width=500, window_Height=500;
PFNGLSECONDARYCOLORPOINTEREXTPROC glSecondaryColorPointerEXT = NULL;
void setup_opengl_extensions( void )
{
printf( "glSecondaryColorPointerEXT %x
", glSecondaryColorPointerEXT );
glSecondaryColorPointerEXT = (PFNGLSECONDARYCOLORPOINTEREXTPROC) SDL_GL_GetProcAddress(“glSecondaryColorPointerEXT”);
printf( "glSecondaryColorPointerEXT %x
", glSecondaryColorPointerEXT );
}
static void quit_tutorial( int code )
{
SDL_Quit( );
exit( code );
}
static void process_events( void )
{
SDL_Event event;
while( SDL_PollEvent( &event ) )
{
switch( event.type )
{
case SDL_KEYDOWN:
if ( event.key.keysym.sym == SDLK_ESCAPE )
quit_tutorial( 0 );
break;
case SDL_QUIT:
quit_tutorial( 0 );
break;
}
}
}
static void draw_screen( void )
{
glClear ( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
glViewport( 0, 0, window_Width, window_Height );
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glOrtho(0,100,0,100,-100,100);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
glEnableClientState( GL_SECONDARY_COLOR_ARRAY_EXT );
float dd[3];
glColorPointer( 3, GL_FLOAT, 0, dd );
fprintf( stderr,“glSecondaryColorPointerEXT test:” );
fflush( stderr );
glSecondaryColorPointerEXT( 3, GL_FLOAT, 0, dd );
fprintf( stderr,"pass
");
SDL_GL_SwapBuffers( );
}
int main( int argc, char* argv[] )
{
const SDL_VideoInfo* info = NULL;
int width = 0;
int height = 0;
int bpp = 0;
int flags = 0;
if( SDL_Init( SDL_INIT_VIDEO | SDL_INIT_AUDIO ) < 0 )
{
fprintf( stderr, "Video initialization failed: %s
", SDL_GetError( ) );
quit_tutorial( 1 );
}
info = SDL_GetVideoInfo( );
if( !info )
{
fprintf( stderr, "Video query failed: %s
", SDL_GetError( ) );
quit_tutorial( 1 );
}
bpp = info->vfmt->BitsPerPixel;
SDL_GL_SetAttribute( SDL_GL_RED_SIZE, 5 );
SDL_GL_SetAttribute( SDL_GL_GREEN_SIZE, 6 );
SDL_GL_SetAttribute( SDL_GL_BLUE_SIZE, 5 );
SDL_GL_SetAttribute( SDL_GL_DEPTH_SIZE, 16 );
SDL_GL_SetAttribute( SDL_GL_DOUBLEBUFFER, 1 );
flags = SDL_OPENGL;// | SDL_FULLSCREEN;
if( SDL_SetVideoMode( window_Width, window_Height, bpp, flags ) == 0 )
{
fprintf( stderr, "Video mode set failed: %s
", SDL_GetError( ) );
quit_tutorial( 1 );
}
setup_opengl_extensions();
while( 1 )
{
process_events( );
draw_screen( );
}
return 0;
}