View Full Version : glRasterPos crashing on openGL 1.5?
05-28-2005, 06:35 AM
We're developing an application in openGL using Visual C++ Builder, and it is crashing on glRasterPos2f/glRasterPos3f functions on never nvidia graphics boards drivers. It looks like this happens with drivers having openGL >= 1.5.
We use glRasterPos to specify location of 2D-text.
Is there any known difference in handling of that function between openGL 1.4 & 1.5?
And what's the solution in this situation?
05-28-2005, 07:07 AM
the solution is- post some code and wait what happens :D
on my linux box i have driver 66.29 running with gl version 1.5.2 on a geforce4 mx440. never had a problem with glRasterPos.
maybe the problem is not glRasterPos itself, but something else. give us a peek into your code to see what might cause the problem.
you could post the code for a small app which uses only the glRasterPos call and nothing else.
by the way: instead of glRasterPos you could use the GL_ARB_window_pos extension with the function glWindowPos2i(x, y). with it you can set the raster position for text output using 2D window coordinates.
05-28-2005, 08:34 AM
Well, the source of the application itself (rail vehicle simulator) is a number of files, few of which uses glRasterPos just like in this example:
WriteLog("Models init OK");
SwapBuffers(hDC); // Swap Buffers (Double Buffering)
Step-by-step running showed that it crashes exactly on the lines with glRasterPos2f functions, and if I comment them out, it works just fine.
I guess I'll have to try that second way, because I really haven't a clue what is wrong here.
05-28-2005, 09:40 AM
i'm still not convinced that the error comes from glRasterPos...what about glPrint? is that a standard OpenGL command? i don't think so, i didn't find it in my gl.h, so i think it's a convenience function made by <somebody>, which could be a reason for the crash. usually i use glUseXFont (i think in win it is wglUseFont) and glCallLists(...) to display the text.
you should try to make a very simple app which- in the OpenGL part- only clears the color buffer and writes some text using glRasterPos and glCallLists.
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.