Hello, I’m a new OpenFL user.
I’m very excited to start using this instead of just Java & OpenGL.
I have one problem at the moment, the window size problem that I saw multiple people having problems with.
I googled if there was an answer, but most seem outdated and not working.
I currently have a working example project which shows the OpenFL logo, and I tried to resize the window.
Lib.application.window.resize(250,250);
This works, however the stage itself doesn’t get resized. I want the stage to scale down according to the new window size.
I tried using stage.scaleMode, but none of the options seem to have effect.
What am I doing wrong?
This is my whole code
package;
import openfl.display.Bitmap;
import openfl.display.Sprite;
import openfl.Assets;
import openfl.Lib;
import openfl.display.Stage;
class Main extends Sprite {
public function new () {
Lib.application.window.resize(250,250);
super ();
var bitmapData = Assets.getBitmapData ("assets/openfl.png");
var bitmap = new Bitmap (bitmapData);
addChild (bitmap);
bitmap.x = (stage.stageWidth - bitmap.width) / 2;
bitmap.y = (stage.stageHeight - bitmap.height) / 2;
}
}
Also, another question if I’m allowed(They just hate you for it if you add a question in another question on StackExchange):
I noticed there are 3D functions, are they ‘developed’ yet? For example, do OpenGL shaders work?
I saw a post from over a year ago they were planning custom OpenGL shaders.