Problems width Framework
BlitzMax Forums/BlitzMax Beginners Area/Problems width Framework
| ||
hi!! i was trying to get started width frameworks.. i was trying the examples but it gives me always this error message -- Unhandled Exception: Attemp to access field or method of Null object. the sorce code is: Rem :Import specifies the external BlitzMax modules and source files used by the program. End Rem Framework BRL.GlMax2D Import BRL.System Graphics 640,480,32 While Not KeyHit(KEY_ESCAPE) Cls DrawText "Minimal 2D App!",0,0 Flip Wend |
| ||
Are you running Windows? If so, it will default to DirectX and you're importing the OpenGL module. So, all you need to do is SetGraphicsDriver GLMax2DDriver() after your last Import and before Graphics. The sample in the docs was written before there was a DirectX module. |
| ||
Framework BRL.GlMax2D Import BRL.System Rem Very important as you only include the Gl Drivers but BMax uses DX as a standard in windows End Rem SetGraphicsDriver(GLMax2DDriver()) Graphics 640,480,32 While Not KeyHit(KEY_ESCAPE) Cls DrawText "Minimal 2D App!",0,0 Flip Wend Thats because you have only included the BMax OpenGl Drivers . But BMax runs with DX drivers on standard in Windows, so you have to switch to OpenGl before the Graphics command. |
| ||
If you get stuck with which modules you are supposed to include and which you don't need have a look at my Framework Assistant. |
| ||
yeh :p i was seing some posts and found your FA program that resolved my problem :D but thank you all anyway :D |