https://linen.dev logo
Join Discord
Powered by
# openfl
  • h

    hallowed-ocean-84954

    09/27/2022, 4:14 AM
    I'm trying to do some experiments with GL 3D on OpenFL. I started from the HerokuShaders example . I am trying to setup a basic cube. So I increased the glBuffer to 36 vertices and increased the count in the draw. So far it looked ok. But because it's square on I cannot tell if it worked. So I figured a rotation about y-axis by a little bit would help. But that fails completely. I built a 3D rotation matrix and converted it to a Float32Array as required by gl.uniformMatrix4fv. But I just get a blank window now. I tried copying the matrix data to the vertex shader directly but same result. So the question is: is 3D possible here ? Am I missing something basic ? I could not find among the samples a 3D example to start from.
  • b

    bored-psychiatrist-68708

    09/27/2022, 3:32 PM
    I don't know the low level openfl stuff but for 3D with OpenFL I would look into Away3D for OpenFL https://github.com/openfl/away3d
  • h

    hallowed-ocean-84954

    09/27/2022, 3:34 PM
    yeah I've seen a lot of people do that - I am trying to bash my head fairly directly against OpenGL which is why I wanted to use th gl context directly. Can I do that with Away or is it all wrapped up in helpers of one kind or another ?
  • h

    hallowed-ocean-84954

    09/27/2022, 3:37 PM
    Mind you - I could look at how Away does it I guess
  • b

    bored-psychiatrist-68708

    09/27/2022, 3:37 PM
    I have no idea, I mostly stay at "high level" (as3 background) 🙂 openFL is basically "open Flash", maybe you are looking for something else like Heaps ?
  • h

    hallowed-ocean-84954

    09/27/2022, 3:38 PM
    Heaps has a bunch of wrappers over GL also
  • h

    hallowed-ocean-84954

    09/27/2022, 3:38 PM
    I'm trying not to resort to C though obviously that's an option
  • b

    bored-psychiatrist-68708

    09/27/2022, 3:39 PM
    Maybe Lime then, openFL is built on it, I know there are people working with Lime directly but I wouldn't know where to start
  • h

    hallowed-ocean-84954

    09/27/2022, 3:44 PM
    did have a quick look - there are fewer examples but may go back there if this doesn't pan out
  • h

    hallowed-ocean-84954

    09/27/2022, 3:44 PM
    thanx
  • m

    many-addition-78652

    09/27/2022, 6:08 PM
    I have a previous version of my game engine using lime. It has a 2d opengl renderer, but you can change the projection to perspective and use more vertices for I cube I imagine. I can open source that and share it if you want.
  • o

    orange-van-60470

    09/28/2022, 12:21 AM
    trilateral3 is setup for rotating 2D shapes in 3D. I do not think lime is yet setup with 3D projection code within my libs, but it should be viable to look at relevant webgl code and compare with existing lime kitGL ones and fill in the missing as largely it is tweaking name spaces. https://nanjizal.github.io/trilateral3setup/binWebGL/ https://github.com/nanjizal/trilateral3setup
  • o

    orange-van-60470

    09/28/2022, 12:24 AM
    use keyboard to change perspective
  • o

    orange-van-60470

    09/28/2022, 12:24 AM
    maybe if interested can update but limited time
  • h

    hallowed-ocean-84954

    09/28/2022, 12:44 AM
    oh cool - thanx for this. I'll take a look
  • h

    hallowed-ocean-84954

    09/28/2022, 12:47 AM
    thanx for the offer - I won't trouble you to do that for the moment - I'll look at some of the other 3D stuff first
  • a

    adventurous-salesclerk-9917

    09/28/2022, 2:55 PM
    Is it a bad idea to try to learn Haxe and OpenFL by trying to port Red Ball to it? (It's source code is on https://speedrun.com/redball1/resources)
  • e

    elegant-twilight-61392

    09/28/2022, 3:00 PM
    probably?
  • e

    elegant-twilight-61392

    09/28/2022, 3:00 PM
    its usually best to start small, and a codebase youve never touched before is not small
  • a

    ambitious-knife-25690

    09/28/2022, 3:05 PM
    not a bad idea if that's what you wanna do
  • a

    adventurous-salesclerk-9917

    09/28/2022, 3:19 PM
    I mean i have no Haxe experience I should probably follow the docs first
  • a

    adventurous-salesclerk-9917

    09/28/2022, 3:19 PM
    Learn the basics
  • g

    great-oyster-61535

    09/28/2022, 3:19 PM
    Yes definitely learn the basics first
  • e

    elegant-twilight-61392

    09/28/2022, 3:23 PM
    if you have programming experience in other languages, you might be able to just make something small to get familiar with the syntax before working on that
  • e

    elegant-twilight-61392

    09/28/2022, 3:24 PM
    if not, you may want to add something between those two, like maybe trying to make a small baaic game
  • a

    adventurous-salesclerk-9917

    09/28/2022, 4:03 PM
    Probably a good idea
  • a

    adventurous-salesclerk-9917

    09/28/2022, 4:03 PM
    How different is Haxe with OpenFL to AS3?
  • e

    elegant-twilight-61392

    09/28/2022, 4:05 PM
    the syntax is a little different, but the actual api should be roughly the same as the point of openfl is to implement the flash api
  • a

    adventurous-salesclerk-9917

    09/28/2022, 4:07 PM
    Makes sense
  • a

    ambitious-knife-25690

    09/28/2022, 4:07 PM
    openfl is a direct copy of the as3 api so it should be quite familiar
1...151617...57Latest