Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transparent Background #23

Open
sweaver360 opened this issue Aug 7, 2013 · 9 comments
Open

Transparent Background #23

sweaver360 opened this issue Aug 7, 2013 · 9 comments

Comments

@sweaver360
Copy link

Is it possible to have a transparent background in Turbulenz? I tried setting the alpha value in graphicsDevice.clear(), but the background always seems to be black rather than whatever color is behind the window.

@davidgaleano
Copy link
Contributor

The TurbulenzEngine creates a WebGL context without an alpha channel, so changing the alpha value when calling clear is not going to help.
Are you trying to blend the whole rendering with the background web page or just the pixels with an alpha value lower than one? The former may be possible with CSS styling, the later would require a small change on the engine code.

@sweaver360
Copy link
Author

Thanks for the quick response. I'm trying to blend only the pixels with an alpha value lower than one, so that I can have a 3D object with no background that blends in with whatever page it's on. Could an override be added to the engine code that would allow that, or is that something the developers are against?

@davidgaleano
Copy link
Contributor

It maybe easier just to change the engine code. The variable setting alpha to false is hidden inside an internal function not available to the outside world, you would need to to overload the browser function canvas.getContext to ignore the alpha value. I will change our code to support passing an alpha property on the creation parameters to TurbulenzEngine.createGraphicsDevice.

In general we prefer if you contact us with your needs on our Google Group for engine users so we can fix the problem or explain a safe workaround (which could be an override), but if you are in hurry and you need to ship your application then do whatever you need to, just be ready for things breaking :-)

@sweaver360
Copy link
Author

Thanks for the help! Sorry, I'm still really new to Turbulenz so I wasn't aware there was a Google Group.

I'm not in a huge hurry so I can probably wait for the official change in the engine code. Would you happen to know when the next SDK release is scheduled for?

@davidgaleano
Copy link
Contributor

The next SDK will be released soon but I cannot guarantee that this change will be on it, we do have a QA process that may delay some changes until they are properly tested.

@sweaver360
Copy link
Author

OK, thanks for the info. I'll keep an eye on the release notes for the next few releases. Will the SDK notify me when a new version is available for download?

@davidgaleano
Copy link
Contributor

If you use our local development server you will be notified when a new SDK is available.

@beniwtv
Copy link

beniwtv commented Mar 21, 2014

+1 that feature would be very handy :)

@davidgaleano
Copy link
Contributor

This feature is already supported in the latest version:

http://docs.turbulenz.com/jslibrary_api/engine_api.html?highlight=creategraphicsdevice#creategraphicsdevice

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants