Renderer from config
BlitzMax Forums/BlitzMax Beginners Area/Renderer from config| 
 | ||
| Is it possible to set the renderer from a config file? I can't figure out how to access to file i/o commands without defining a framework first. Example of what I want to do: 
Global cfgRenderer
LoadCFG
If cfgRenderer = 1 then
     Framework BRL.D3D7Max2D
     SetGraphicsDriver D3D7Max2DDriver()
Else
     Framework BRL.GLMax2D
     SetGraphicsDriver GLMax2DDriver()
Endif
If I don't define a framework and just set the graphic's driver, it works OK, but the EXE is much larger. | 
| 
 | ||
| I do it without problems. [Pseudo code] Framework Brl.Max2D Import brl.glmax2d Import brl.d3d7max2d Import brl.blitz Import brl.appstub Import brl.audio Import brl.basic Import brl.blitzgl Import brl.bmploader Import brl.font Import brl.freeaudioaudio Import brl.freetypefont Import brl.jpgloader Import brl.map Import other stuff... If Get_INI_Value("GFX","Driver") = "D3D" Then SetGraphicsDriver D3D7Max2DDriver() else SetGraphicsDriver GLMax2DDriver() endif Graphics( ...) | 
| 
 | ||
| That works great, thanks a lot :) |