Missing graphics on certain computers

Previous topic - Next topic


This has had me stumped for 2 days now so time to ask the gurus for help  :nw:

I am working on a project and have a routine for displaying text by loading in the individual letters as sprites and breaking the string down into individual characters and drawing the sprite for the letter, setting the xpos to the width of the char plus current print pos so its ready to print the next char. The widths are in a look up table as I figured it would be quicker than getting sprite size on the fly each time.

Code (glbasic) Select

FUNCTION stringprint: string$,stringxpos,stringypos,center = TRUE

LOCAL numchars, ctr, charypos, nextchar$,strlen=0

numchars = LEN(string$)

IF center
stringypos=stringypos + 11 // I moved the graphics on the screen by 11 pixels and this was easier than reentering all the ypos values on each draw command
FOR ctr = 0 TO numchars-1
strlen = strlen + char_width[ASC(string$,ctr)]
stringxpos = stringxpos - (strlen/2)

FOR ctr = 0 TO numchars-1
DRAWSPRITE 500+ASC(string$,ctr),stringxpos,stringypos


On my dev computer it displays fine as per the first screen shot. On the computer it needs to be deployed on it is missing the text totally. I did also try Peejays/morus text drawing routine (but as its a commercial project I dont want to use it for production as its their code) and this does exactly the same.

I have tried removing some of the graphics to keep the overheads down but that doesn't change anything so I am stumped.

The graphics card in the deployment PC is an Intel 82845G/GL/GE/PE/GV which I know does not do everything in the 3d department but I'm not doing anything fancy. All other sprites display correctly and everything else works apart from this one aspect.

Anyone else have any ideas as to what I could try? I'm on the verge of going back to a standard font and using the PRINT routine :) Its not a difference between full screen and windowed as the issues stay regardless of the settings


[attachment deleted by admin]


just as a follow up to this PRINT does not seem to be working either. I put some code in to display the size of one of the sprites (to make sure they are being loaded ok) and again it works on my dev computer but on production it doesn't display anything.


Very strange.

Some ideas:

  • Before loading, make sure the sprite files exist in the expected location by using the 'DOESFILEEXIST()' command
  • Try using the GENSPRITE() to allocate a sprite, if you are hard coding the sprite id (not likely to help, just a thought)
  • Try displaying just one character sprite at the 0,0 location to see if you can get a simple sprite example to display
  • Try displaying one character by using the POLYVECTOR technique

How do you display your other graphics?  DRAWSPRITE? 
If so, weird how just the characters don't display, even using PeeJay's routine.

If you have GLBasic installed on the problem PC, add a bunch of 'DEBUG' commands inside of the 'stringprint' function to see what screen locations are being used, plus what ascii characters are being determined from the string. 

It more looks like something is missing on that PC, a DLL or something.  Or an outdated OpenGL?
My current project (WIP) :: TwistedMaze <<  [Updated: 2015-11-25]


Also check the graphics card anti-aliasing settings too.

Kitty Hello

can you test if ASC always returns positive numbers?