[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

Can you think of any scenario at all where an OpenGL/WebGL context

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 12
Thread images: 2

File: 1477181235866.jpg (69KB, 420x599px) Image search: [Google]
1477181235866.jpg
69KB, 420x599px
Can you think of any scenario at all where an OpenGL/WebGL context is best left softcoded?

I'm writing a 3D engine that could end up sticking around through a lot of projects, so I need to make sure it works perfectly.
>>
define softcoded
>>
File: Capture.png (5KB, 599x64px) Image search: [Google]
Capture.png
5KB, 599x64px
>>57377712
Hardcoded: I define gl as a global variable, which I set during initialisation, and all functions I write assume that gl exists.

Softcoded: I define and set gl during intialisation, and pass gl into functions like in pic related.
>>
>>57377634
Bump, curious about what /g/ thinks.
I don't think I'll need it softcoded, kind of a pain honestly, but I'm always up for opportunities to be able to do crazy things with my code.
>>
>>57377634
>OpenGL/WebGL
I hope Vulkan and WebAssembly will kill this shit.
>>
>>57379653
What's WebAssembly?
I've heard talk of why Vulkan will never become a web app, but if WebAssembly is close that'd be great.
>>
>>57379660
Firefox:
about:config
javascript.options.wasm > true
Chome/Chromium:
chrome://flags#enable-webassembly
http://webassembly.org/
Have a fun.
P.S. Technically Vulkan support is possible but your browser(wasm) should provide(allow) access to it.
>>
>>57380003
So I can write a Vulkan program then run it as a WASM one with only minimal changes?
>>
The web isn't meant for your 3D shit, go write it in C instead.
>>
>>57380037
Sure if write it in C/C++ and don't use unportable or forbidden API function.
>>
>>57377744
Softcoded is usually more flexible to the changing requirements of different projects, but as a downside takes more time to implement and to get it right.

I'd probably just focus on getting the basic pipeline implemented, and then for each project you use it in "personalize" it to better suit the project requirements.
>>
>>57380175
That was the most perfectly generic answer you could have possibly given.
What I'm looking at is not how hard it would be to softcode, what I'm looking at if there is even a single benefit to softcoding the gl context.
I've already got the gl context softcoded, but it makes the code a little cleaner if I hardcode it.
Although I can just avoid worrying about it for now because I can hardcode it just by adding a global variable and deleting every instance of "gl, " with text replacement.
Thread posts: 12
Thread images: 2


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.