Create Context

Anybody knows about the following error when I run any openGL sample code from red book:

sis_ctx.c:325:SisCreateContext: Assertion ‘0’ failed.
Aborted.

Note: I can run the same code on the other machine with redhat 7.3.

sis_ctx.c must be one of your card driver’s files. It must have a bug. Try upgrading XFree86.

Use the source Luke. http://www.atomised.org/docs/XFree86-4.2.1/sis__ctx_8c-source.html

00307 /* support ARGB8888 and RGB565 */
00308 switch (hwcx->bytesPerPixel)
00309 {
00310 case 4:
00311 hwcx->redMask = 0x00ff0000;
00312 hwcx->greenMask = 0x0000ff00;
00313 hwcx->blueMask = 0x000000ff;
00314 hwcx->alphaMask = 0xff000000;
00315 hwcx->colorFormat = DST_FORMAT_ARGB_8888;
00316 break;
00317 case 2:
00318 hwcx->redMask = 0xf800;
00319 hwcx->greenMask = 0x07e0;
00320 hwcx->blueMask = 0x001f;
00321 hwcx->alphaMask = 0;
00322 hwcx->colorFormat = DST_FORMAT_RGB_565;
00323 break;
00324 default:
00325 assert (0);
00326 }

Looks like your card only supports those two pixel formats.

EDIT: Spilling mistake.

[This message has been edited by PK (edited 02-25-2003).]

Thanks for your help. 'Cause I’m not good at Linux, Can you tell more detail about that mistake and how to fix it?

I really appreciate it.

Try different pixel formats for your window.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.