leonnn
(leonnn)
March 15, 2011, 5:00pm
1
Someone can help me to migrate this code that worked on 2.49b to the 2.56?
import GameLogic as G
import BGL
scene = G.getCurrentScene()
cont = G.getCurrentController()`
objList = scene.objects
own = cont.owner
viewport = BGL.Buffer(BGL.GL_INT, 4)
BGL.glGetIntegerv(BGL.GL_VIEWPORT, viewport);
own.width = viewport[2]
own.height = viewport[3]
thanks a lot!
GameLogic has been replaced with bge.logic. for starters.
There’s also bge.render. though I’m not sure if that replaced BGL.
leonnn
(leonnn)
March 15, 2011, 5:28pm
3
Thanks ace dragon, So I ll only need to replace the GameLogic with the bge.logic. and everywhere where It reads BGL i need to use bge.render? I ll try here right now! Thanks
leonnn
(leonnn)
March 15, 2011, 5:45pm
4
Thanks Ace dragon but it didnt worked, I had tried to replace those and I got syntax error.
SolarLune
(SolarLune)
March 15, 2011, 9:43pm
5
bge.render replaced the Rasterizer module. I think BGL has been replaced by ‘bgl’, case-sensitive.
leonnn
(leonnn)
March 16, 2011, 2:49pm
6
thanks joeman16, I really appreciatte your help