Hi all,
TL;DR - I am having trouble adding a simple colored box sprite (graphics drawrect) to an openglview version of bunnymark. I can see either just the sprite, or the bunnies.
I have been messing about with other things for awhile in Haxe (pulling data from web apis, analyzing it etc) and must remark real quick, that the ease of use (httprequest, json parsing etc) is quite good. Anyways, I am wanting to make a game real ‘quick’ and find myself dabbling in the rendering side of things, and I am having trouble making something simple work. It is probably a foolish oversight on my part but after spending a couple days on it, I am reaching out.
This time around, I am going for cross platform - for both Windows desktop and HTML5 deployment.
I can get the Lime version of bunnymark visible on both. Switching to openfl (ie adding the library in project.xml) and converting glrenderer to sprite, with openglview (addchild) I have gotten to work for both targets.
The problem is when I try to create a new sprite, simple colored box, and add that to the stage, I can only see the colored box and no longer can see the openglview bunnies. This is occurring whether I add the sprite before or after adding the openglview to stage.
Also, I am using setviewport to only render the bunnies to the bottom left quarter of the screen, and then setting it back after render to whole screen. The sprite-colored-box is being added to the top of the screen. I am also making sure I clean up the gl code after, disabling the vertex attribs, use program null, and bindbuffer null
Unfortunately I cannot post code right now or build version numbers used (away from my home comp, but versions are updated from last week) but I will update later on today after a bit more fooling around. Does anyone have any ideas though?
Sidenote, maybe related - is the SimpleOpenGLView sample no longer working? I remember before being able to add a sprite to that without issue.
Thanks all, talk to you soon, hope the coding is going well!