Sorry about the c++ script
i cannot get the rest of the files to upload...keep getting server time out error....
The original c++ script is from the resources of Addison Wesley OpenGL SuperBible 4th Edition...
The whole c++ resource file can be downloaded from http://www.starstonesoftware.com/OpenGL/
Also thanks for save tga script..
your right..............it does take a while
it also renders a bit weird with tree generator but i think i know how to fix that....
below is one approach i was trying but couldnt get to work...
the script is an experiment and i dont know if it currently works.....
Also the script has been edited and edited again and almost worked several times but i changed things too often and cant remember what i did to get it even partially working....
The main reason i post this is to see if you think this approach may have worked...
FUNCTION SaveFile( ) AS STRING
dim i as long
dim data as string
dim pBits as GLbyte
sFilter = "tga Export (*.tga)|*.tga|"
sFilter += "All Files (*.*)|*.*"
sFile = DIALOG_SAVEFILE( hDlg, _
"Open an file", _
DIR_GETCURRENT, _
sFilter, _
"tga", _
%OFN_FILEMUSTEXIST OR %OFN_HIDEREADONLY OR %OFN_ENABLESIZING )
IF sFile = "" THEN
MSGBOX 0, "No file selected.", %MB_ICONEXCLAMATION, "File confirmation"
ELSE
MSGBOX 0, sfile + "...." + "All done"
END IF
glFinish()
glPixelStorei(%GL_PACK_ALIGNMENT, 1)
glPixelStorei(%GL_PACK_ROW_LENGTH, 0)
glPixelStorei(%GL_PACK_SKIP_ROWS, 0)
glPixelStorei(%GL_PACK_SKIP_PIXELS, 0)
glReadPixels(0, 0, hdlg, hdlg, %GL_RGBA,%GL_UNSIGNED_BYTE,pbits)
data = pbits
return data
FileContents = data
FileContents += $CRLF
status = FILE_SAVE( sfile,FileContents )
FUNCTION = sfile
END FUNCTION
Bookmarks