[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]

Modern OpenGL, 2D

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: 32
Thread images: 4

File: opengl-tutorial21.png (31KB, 640x480px) Image search: [Google]
opengl-tutorial21.png
31KB, 640x480px
Post your 2D OpenGL projects here!

I'm looking for some information about using OpenGL 3 for 2D games, preferably C only. I'd really love to write something like Terraria using modern OpenGL, however everything I could find was very basic stuff without batching or with fixed pipeline.

So if anyone has good sources or wants to show of some of their projects, go ahead.
>>
>>61662783
It seems OpenGL is used for 3D graphics almost exclusively. While you can do 2D with it too obviously, no one really seems to bother with it.
>>
>>61662898
>While you can do 2D with it too obviously, no one really seems to bother with it.
Because you just need to implement your 2d vector drawing library and then use that.
Usually the window library / GUI already provide functions for 2D drawing so there's no need to reimplement them again in opengl.
>>
>>61662898
Just use pixi.js on top of WebGL on top of OpenGL or Godot, if you hunger for the 2D GL experience.
>>
>>61663343
vomit
>>
>>61663380
True, but not only will he develop faster, the end result will also be faster due to all the shittons of fallback stuff for faulty drivers OP won't have to make.
>>
>>61663380
>>61663442
Also, OP uses C, so he is in for that anyway.
>>
>>61662783
Why not Vulkan fampo
>>
Use renderdoc to see what's habbening
https://github.com/baldurk/renderdoc
>>
>>61662783
OpenGL is obsolete
>>
>>61664094
So is C, but still it's what OP wants, apparently.
>>
>>61664094
That being said, there is no good 2D higher level library that is still lowlevel enough for shader effects.
>>
>>61662898
Elysian Shadows
>>
File: yfw.png (209KB, 510x346px) Image search: [Google]
yfw.png
209KB, 510x346px
>mfw I went here to see some nice projects but instead had to riddle myself with these intellectual replies
>>
>>61662783
Chip8 emulator if you're also interested in emulation
>>
>>61662783
>C only
It looks like you'd been influenced by /dpt/-pajeets.
>>
File: confusedAndFunny.jpg (14KB, 218x300px) Image search: [Google]
confusedAndFunny.jpg
14KB, 218x300px
>>61664739
>C
>pajeet
>>
>>61664149
What else then isn't obsolete? It's not like there is a direct replacement for C.
If I didn't want to keep things low level, I would have aked for an engine and a language with a nice big stdlib like Golang.

>>61664094
I have absolutely no problem using Vulkan, but finding 2D stuff for that is even harder.
>>
>>61664057
>https://github.com/baldurk/renderdoc
Thank you that's exactly what I needed.

>>61664612
SDL drawing is also nice I guess

>>61664501
>>
>>61664739
He was influenced by powerusers
>>
>>61662783
I'm working on a openGL/glfw/c++ doom clone that loads wads and put them into place and plays then just like the original. The only problem I've run on so far is trying to figure out how to integrate collision ( even though the original didn't have that I believe) so that when I shoot it traces a Ray and checks for any object that had collided. I based most of my information in bisqwit's doom engine in BASIC but the main difference being that instead of doing a perspective looking 2 1/2D openGL draws fully the geometry with triangles, allowing for the total view of whatever object there is. As for the enemies and objects in the game I load a 2D transparent BMP spirte and change the sprite everytime something changes, I.E a barrel explodes. But for now I'm still learning how to do things in GL.

Eventually I hope to move to something easy like a danmanku touhou-ish openGL game just being a 2d sprite shooting balls in patterns and adquiring upgrades.
>>
>>61662783
i'm using webgl for university. don't have any clue what's happening there
>>
>>61664739
t. pajeet
>>
>>61666017
WebGL is an abomination
>>
>>61666090
literally the same as opengl with some variations in functions
>>
>>61665265
>It's not like there is a direct replacement for C.
True, there is no competitor for incomplete brainlet languages for systems programming.
>>
>>61666074
The only reason C isn't used by pajeets is that there aren't that many C jobs.
>>
>>61666111
It's OpenGL from javascript
an abomination
>>
If anyone could post some useful PDFs or books that build a game step by step i would really appreciate it, thanks!
>>
I have another question.
Is 2D on GPU even worth it or are CPUs on Mobile and Desktop fast enough for aestehtically pleasing games?
>>
>>61666421
Absolutely. I think you are misunderstanding something. Even if you use some framework that is made for 2D use, it's using the same graphics hardware and apis in the background as 3D games do. Not using gpu would mean using software rasterizer, that would be dumb.

Writing your own software rasterizer or raytracer is a good exercise btw. Doesn't take much time but help you understand things much more clearly.
>>
>>61666421
both
you dont NEED to use OpenGL for 2D but it makes alot of things much easier like rotation and scaling
Thread posts: 32
Thread images: 4


[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.