Some doubts

I am having problem while picking a line.
I am creating a display list for line by calling glGenLists(1) and inside the function
i am using gl calls to draw the lines, at the same time i am printing a character string to
identify the line. The code snippet is given below…

GLuint line;
line = glGenLists(1);


//COde for drawing line


//For printing the string
CString strString = “1”;

glRasterPos3f(GLfloat(1.0), GLfloat(1.0), GLfloat(1.0));
glCallLists(strlen((LPSTR)(LPCTSTR)strString), GL_UNSIGNED_BYTE, (GLubyte *)((LPSTR)(LPCTSTR))strString);


I have already created the font for printing the bitmap(character string) and necessary other things…
those are listed below…

void CGLStarter::RealizeFont()
CFont font;
AfxMessageBox(“Could not set the font. Default font will be used.”);

if(m_hOldFont == NULL)
	m_hOldFont = (HFONT)::SelectObject(m_hDC, (HFONT)font);
	(HFONT)::SelectObject(m_hDC, (HFONT)font);
wglUseFontBitmaps(m_hDC, 0, 255, 1000);


My PixelDescribeFormat is below

sizeof(PIXELFORMATDESCRIPTOR), // size of this pfd
1, // version number
PFD_DRAW_TO_WINDOW | // support window
PFD_SUPPORT_OPENGL | // support OpenGL
PFD_GENERIC_ACCELERATED | // support accelerated //new
PFD_DOUBLEBUFFER | // double buffered
PFD_SWAP_COPY , // swap buffered //new
24, // 24-bit color depth
0, 0, 0, 0, 0, 0, // color bits ignored
0, // no alpha buffer
0, // shift bit ignored
0, // no accumulation buffer
0, 0, 0, 0, // accum bits ignored
32, // 32-bit z-buffer
1, // stencil buffer
0, // no auxiliary buffer
PFD_MAIN_PLANE, // main layer
0, // reserved
0, 0, 0 // layer masks ignored



I am doing necessary things for Namestacker etc. for picking purpose.
I want to pick this line. Now i have many other things on the screen.
So in LbuttonDown function I am calling all the displaylists i had created useing the code below

for(GLuint i=0; i<GetMaxGrelem(); i++)

Now let me tell you Graphics card details and other details

  1. Operating System : Windows NT
  2. Collor Palette 65536 or True Color (in settings)
  3. Display card- Intel® 82810 Graphics Controller

NOW WHEN I PICK THIS LINE ON THE character string i get a Access Violation error in
glCallList(m_glList[i]); where m_glList[i] denotes the displaylist for line.

What i observed is that if i pick somewhere else in the line (not on the string say “1”), there is absolutely no
problem and programs works fine.
One more thing i observed is if I change the Color palette to 256 then everything works fine.

This problem does not happen in other graphics card with any color palette like
a)AGP V6600
b)TNT2 Model64

Could you please look into the problem and reply me as early as possible.

I have some more doubts…
Sometime my program does not work in Windows 2000.
Is it because of graphics card? If that is the case please tell me what i should do for that.
Will GLSetup help me in this regard. Is there GLSetup.exe for Windows 2000 and NT. When should i use
GLSetup? How to solve this problem? I have gone throgh FAQ of your site, but i did not get any answer to
my problem.

What I should have ( like Hardware driver, OpenGl Driver, DLL’s ) and how to use those, so that my program will
work without any problem in any Windows Operating system( NT, 2K, ME, 9X).

It would be of great help if you answer me these question as soon as possible.

Thanking you…

  1. It sounds like some weird driver bug. Intel cards and their drivers are of low quality in case nobody told you.

  2. Use true color (32 bpp).

  3. You can replace your line with something else like a polygon the shape of your line. Maybe that will fix it.

  4. GLsetup is outdated and I dont know if it will be picked up.

  5. Always keep your drivers up to date. Always buy good quality equipment (that integrated intel **** is good for surfing the web)The windows version doesnt concern GL.



PS: you are using WinNT? Execellent choice my friend. Dont forget to never update IE unless if you want problems.



You can get the latest i810 graphics drivers here:

The latest downloadble driver is version 3196, dated August 13, 2002.

If you’ve tried the newest drivers and are still experiencing your problem, you can try submitting a bug report here:,798

Unfortunately I can’t personally help you too much more than this, since a completely different team in a different geographical location is working on the i81x drivers. However, if you have a small test app that you could email me, I’ll try it out on a newer chipset (i845g). If it still fails I’ll be happy to take a look at it.

– Ben