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

OpenGL or DirectX

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: 103
Thread images: 10

File: directx-vs-opengl.jpg (25KB, 430x307px) Image search: [Google]
directx-vs-opengl.jpg
25KB, 430x307px
which one is better for an indie game developer? why?
>>
muh dick
>>
>>60950421
vulkan
>>
use opengl + GLM unless you hate yourself
>>
>>60950485
ok, but why?
>>
>>60950531
because GLM is the best math library for graphics that exists and shitloads of tuts and stack overflow questions use it
>>
>>60950579
ok, i'll take a look to it! thanks
>>
>>60950421
>indie game developer

Unity.
>OpenGL
how does it make you feel to be retarded?
>>
>indie game developer
>OpenGL
>DirectX

Please just get a mcjob - if you think one of those is best then kys
>>
>>60950421
Neither, Vulkan is the best API we have atm.
>>
auschwitz
>>
use vulkan

openGL needed to die 10 years ago
>>
>itt memesters
Use OpenGL.
>>
>>60950421
>"""indie game developer"""
>does not even know what's better
>>
>>60950480
>>60951689

>I want to make a game
>okay here learn this API that will take 1 year for you to learn
>>
File: images.duckduckgo.com.jpg (69KB, 507x577px) Image search: [Google]
images.duckduckgo.com.jpg
69KB, 507x577px
>>60950421

You should trust the future of your little bullshit game to microsoft, the people that brought you the masterpiece of trash that is windows 10.
>>
>>60950421

>Indie devs
These graphics APIs are for people with a strong understanding of the fundamentals. Indie """devs""" are often just glorified artists that lack this understanding. If any Indie dev is interested in graphics I would strongly suggest you read a real graphics programming book(not based on an API). The most you will need is a memory buffer and a SetPixel(x,y,color) function, from there its just data structures and math.

Once you know the fundamentals of graphics programming, these graphics APIs become interchangeable.
>>
Code your own API
>>
one is locked to windows while the other works on even phones
>>
>>60952174

not really

there is an opengl for phones and one for computers
>>
>>60951855
Good post
>>
>>60950421
GL is better for indie developers
OpenGL + GLM + GLFW is the way to go
>>
SDL or Allegro... don't punish yourself.
>>
>>60950421
>indie game developer
If you're serious about actually making a game, you should be looking into engines and licensing costs. If you're just looking to dick around with amateur engine dev, do whatever you want.
>>
>>60951356
>Unity
How does it feel to be retarded?
>>
>>60954320

you don't need an engine unless you're a numale who only knows Javascript
>>
ncurses
>>
>>60951802
Or you could, you know, use an API or engine that uses it and abstracts it instead.
>>
>>60950421
OpenGL because you can easily pick up WebGL from that and make games for the web
>>
>>60950421
2D? SDL2, don't waste your time and energy.
3D? OpenGL.
>>
>>60950421
Vulkan
>>
>>60950421
Indie games most of the time are muiltiplatform to get as much money as they can. So opengl or vulkan
>>
>>60950421
OpenGL for compatibility (easier to port the game after if you can't into native)

DirectX for "windows only" ((((xbox 1080))) purposes (has become a meme since 9.0c days)
>>
>>60954346
>because an indie dev totally wants to write their own engine

No, you want to make games, retard. Unity's the best tool if you want just that.
>>
>>60950421
Neither, nobody directly uses opengl/directx. It's not the 90s anymore.
>>
>>60951802
>I want to do something but I don't want to put in any of the effort required to do it.
That's you
>>
>>60954348
That's not entirely true. Creating every effect from scratch is a lot of work. Engines can take a lot of that work out of making a game.

But, I think it's important for a game developer to at least try to make their own engine from scratch before thinking they'll have any success using someone else's engine.
>>
opengl. directx isnt much superior and restricts to one platform; vulkan/metal are mindfucks
>>
>>60950421
10-15 years ago, OpenGL was behind in terms of development due to noone taking responsibility for it. These days, that's not true anymore and there's really no reason to prefer DirectX.
With OpenGL, at least you get some measure of cross-platform compatibility, but DirectX just literally has no advantage.

>>60950480
>vulkan
If you're fine with only supporting ~10% of hardware out there, then yes, that's the way to go.
>>
>>60957407
OpenGL might be is capable of's DirectX 11, but it's an absolute cluster fuck, where you need hacks to even get the thing to run correctly which is what Nvidia did AMD implemented it OpenGL per the spec. See where that got both of them.
>>
>>60958121
>you need hacks to even get the thing to run correctly
Please clarify. I haven't noticed any hacks in my OpenGL usage.
>>
>>60956091
>But, I think it's important for a game developer to at least try to make their own engine from scratch before thinking they'll have any success using someone else's engine.
just like it's important to build your own car before you get your driving license
>>
>>60958121
What the fuck are you babbling about, retard?
>>
>>60955020
/thread

No other api is worth it anymore. We've already seen the doom gains and compatible across every platform even phones where it rapes es
>>
>>60958191
Unity fags always discourage engine builders
>>
>>60950421
Vulkan if you hate yourself, OpenGL if you hate yourself in a slightly different way. There's no real reason to use DirectX unless you're actively trying to destroy your code's portability.
>>
>>60950421
OpenGL or Vulkan. Why? openGL supports all hardware and operating systems and Vulkan is basically a better implementation of openGL.
But if you're indie dev just pick between engines instead:
>Atomic Game Engine
>GDevelop
>GameMaker studio
>Godot Engine
>Unity
>Unreal Engine 4
Any of these will do, depending on what you already know or want to learn and what budget and resources you have. It's not really worth going deep into either openGL or dX if you're just an indie dev.

>>60953169
He was talking about dX which is shit because it's only on windows, and Xbox (which nobody uses anyway).
>>60958121
Well meme'd. You have no idea what you're talking about.
>>
>>60954348
Fuck off. I've built an entire game engine from scratch and yes you absolutely should avoid doing it yourself. There is no sane reason in the current year for people to have to write their own asset file loading infrastructure, it just wastes time that could be spent on actually developing new software.

>>60956091
>But, I think it's important for a game developer to at least try to make their own engine from scratch before thinking they'll have any success using someone else's engine.
This is true though, don't go all the way, but building a little shitty one will help a ton.

>>60958191
Driving a car is a hell of a lot simpler, you aren't building new pieces of machinery that plug into the existing machinery and expecting it to work. If you found somebody who was doing that, you might well suggest they build a mock-up of the system they're trying to interface with first. (This is if you're doing non-trivial stuff like adding complex mechanics or rendering features, if you're just building pixel platformers you can skip it obviously).
>>
>>60950421
If you're an indie dev and you want money and you don't already know computer graphics, forget API and learn to use an engine.
But if you want to learn low level computer graphics (which is probably one of the more fun areas of programming) OpenGL is still the best choice. You can go straight to learning about projections and matrix transformations and whatnot with minimal setup. The new DOOM is amazing on vulkan because the devs knew their shit. Vulkan isn't magic that makes everything faster, it just gives you far more control. DirectX is fine and all but it's Windows only.
>>
>>60956091
>>60958475

Not that anon, but I disagree completely. You don't need to know how the underlying engine works in order to make high quality games. The quality of the product can improve, for sure, but in the end, you can still deliver high quality without this knowledge.

The car metaphor is really apt. Can you drive a car without knowing how a car engine works? Sure. Can you fix it if something goes wrong? Well, depends, do you have a mechanic? And that's what Unity is, a car with a mechanic.

Is learning a graphics API worth it? Sure is, if you're interested in how game engines work. At best it'll help you optimize your game better. But if you have a dream to make games and not game engines, then there are way more important things to learn. Instead you should be focusing on learning other way more useful things, like source control, AI techniques, procedural generation, linear algebra, design patterns, software craftsmanship, tooling, and how to use your engine effectively.
>>
>>60958191
>just like it's important to build your own car before you get your driving license
Knowing how the car works certainly makes you a better driver than if you willfully try to ignore it. You might not *need* to build an engine, but dabbling in it certainly makes you a better game developer, just like how repairing your own car helps you understand how it works.
>>
>>60958376
True, but if you're not highly experienced with graphics APIs Vulkan will be a fucking bitch to learn.
>>
>>60950485
This.
Add in GLFW. If collisions are simple in your game do it yourself otherwise use bullet physics for realism.
>>
>>60950485
>GLM
I don't really get the point. The necessary math functions are arguably the one simplest thing to implement. You arguably need to understand the maths anyway in order to use them efficiently, and if you do, the actual code is trivial to implement. But even if you don't, the vast majority or just a few multiplications and additions you can just scrape from any OpenGL tutorial.

I mean, sure, there probably won't be much difference from the code you implement yourself vs. what GLM does anyway, but at least you can integrate it more natively with your project structure.
>>
>>60958475

> I've built an entire game engine from scratch

this shows me you are retarded

you think that a game engine is something that every game must have, and it is necessarily a complex thing.

really you could make a shell of a game from OpenGL up in like 500 lines of code, plus the shaders.
>>
>>60950480
this right here
>>
>>60959812
Not so sure. I still haven't used Vulkan personally, but OpenGL isn't exactly trivial to get up and running either, especially not post-3.0 OpenGL where you have to put vertex data in buffer objects and compile shaders and all that stuff anyway. And even when you're done with that, you still have to juggle the GL states around, whereas in Vulkan you have complete and whole PSOs instead. Sure, there's a bit more allocation work and synchronization going on, but I'm not sure that's really such a huge deal.
>>
>>60959895

GLM is done extremely well. Better than whatever shit you could throw together.

It is very fast, preserves compiler SIMD optimizations, and is all done in templates so it is easy to use.
>>
File: 1496802351721s.jpg (9KB, 250x250px) Image search: [Google]
1496802351721s.jpg
9KB, 250x250px
pygame
>>
>>60958424
>Unity
please no
>>
>>60958821

> "muh software craftsmanship"

if you understood "software craftsmanship" you would understand why engines are a bunch of shit. There is no craftsmanship in using an engine. Your design patterns and faggy comments don't matter because your code is totally trivial.

Really, you can't push any boundaries in an engine game. Go back to Bangladesh and jeet in street.
>>
>>60958121
What did you mean by this?
>>
OpenGL. How is this even a quesiton?
>>
>>60951855
I'm not him, but you're a fucking retard - here's why:

He's obvious more interested in the actual game/application development moreso than the leaning the API.

If he were asking on which API to learn he would have asked "which API is best for learning 3D programming."

But no retard, he didn't say that, he said "indie game developer". Meaning he wants to actually make games

Because what he's really asking is which API he should support for his game. I.e. he's asking whether or not to use a game engine programmed in directx or opengl.

And the answer is of course opengl.
>>
>>60960201
How many games and engines have you written so far?
>>
>>60958121
>I've never used opengl
>>
>>60960576

1 engine that works with heightmaps and loads a couple types of models plus various ray tracers, one of which runs on a GPU in OpenGL.
>>
>>60960681
If you are so successful game developer why are you shitting in Bangladesh instead of commenting on Forbes.
>>
>>60960755

I'm not but I know my 3d graphics, unlike you, Ashish
>>
>>60960410
To make OpenGL work correctly Nvidia had to heavily modify OpenGL itself for it to even work. You saw this in doing before the Vulcan implementation.
>>
File: legend_quest_laughing_whores.png (163KB, 499x499px) Image search: [Google]
legend_quest_laughing_whores.png
163KB, 499x499px
>>60960525
>Because what he's really asking is which API he should support for his game

My point still stands. Real graphics programmers wouldn't even have a second thought about OPs question. Any competent programmer who, actually understands graphics programming, would just re-implement their draw calls with whatever graphics API preforms best. Using openGL on windows is fucking retarded when Direct3D has often has better driver support.

Also
>he said "indie game developer". Meaning he wants to actually make games

pic related.
>>
Vulkan
open standard that works for android/windows/linux/mac (if they accept it)

maximum bandwidth capability and very targeted at the hardware

dx is closed just like nvidias binary drivers
>>
>>60950421
You need to be careful of broken driver support for some functions with OpenGL for AMD cards.
https://community.amd.com/thread/205702
https://community.amd.com/thread/194895
>>
openGL because it's crossplatform.
You're an indie dev, you want to reach as many people as possible. openGL makes it possible. directX limits you to windows users
>>
>>60960201

Confirmed as a basement dwelling neckbeard faggot. Maybe if you'd work on a game slightly more complicated than flappy bird, you'd understand what I mean. My latest MOBA project has spanned 2 years, with things like matchmaking, client side prediction, and a cloud data backend. If you'd work on a project of the size I have, you'd understand what I mean about software craftsmanship.

> muh low level api

Hows your CS degree coming along?
>>
>>60960009
>GLM is done extremely well. Better than whatever shit you could throw together.
What would be the difference, really?

>preserves compiler SIMD optimizations
It is complete bullshit that whatever anyone could throw together wouldn't be transformed the same way by a vectorizing compiler.
>>
>>60960009
>all done in templates so it is easy to use
Sepples programmers really believe this is a good thing, huh? This is why you have 10-second compile times for every source file.
>>
>>60961656
>Direct3D has often has better driver support
Citation needed. This may have been true in 2004, but there's been some time since then.
>>
>>60962014

> he made a MOBA

So you made another DOTA clone with probably some really cringey graphics that nobody plays.

You're another mediocre game developer. Congrats.

>>60962275

The compile time is negligible.

Templates are good because they allow you to really gild your library if it is gonna be used by many people.

Obviously it was a good choice because probably hundreds of man-years were saved by motherfuckers not writing new vector libraries and being able to use GLM's overloaded operators.
>>
>>60950421
OPENGL
Directx is winfag pajeet shit
>>
>>60950421
Directx if you like money, OpenGL if you don't want AAA status.
>>
File: int.jpg (129KB, 303x311px) Image search: [Google]
int.jpg
129KB, 303x311px
>>60950421
I realized I suck at OpenGL the moment I couldn't render 10k objects that all use the same texture and shader without my performance going to shit.

I just couldn't figure out batching, which in turn made me realize I wasn't really understanding OpenGL.
>>
>>60954908
Best
>>
>>60951855
What book would you reccomend?
>>
>>60961736
>2017
AMD = Always Mediocre Drivers
Nvidia = Not Very Impressive Drivers In Action
>>
Neither, you shouldn't be programming at a level that you have to worry about OpenGL or DirectX. You should be using a game engine which handles everything for you.
>>
>>60950421
>game developer
neither.
game development != graphics library
should be the LEAST of your worries
>>
>>60967062
openGL and DX are APIs
>>
>>60967084
game development isn't API calls to draw shit
>>
>>60967117
why not?
>>
File: C7Hv8ExWwAA5ktB.png (86KB, 310x226px) Image search: [Google]
C7Hv8ExWwAA5ktB.png
86KB, 310x226px
>>60967151
because gd is about making a fun game, which is a full discipline all its own. drawing it should be seen as an extra final burden which of course is best handled by a pre-written game engine with higher-level api calls.

in fact, it would be best to have an agnostic api that can draw to the screen using any api, including cli.

see tetris as an all round example of what I mean.
>>
>>60967256
define "fun"?
>>
File: fun.jpg (82KB, 754x672px) Image search: [Google]
fun.jpg
82KB, 754x672px
>>60967628
>>
>Open GL or DirectX
Let me fix that for ya
Vulkan or Metal
>>
>>60967643
so nothing objective then?
>>
>>60967670
See now you're worrying about the right stuff for game development. Design a "fun" game first, depending on what that means for your genre. Do the research first. Draw the game last.
>>
ok guys can we get to the bottom of this?? whats better to learn?:
1) an API to not "waste" time learning to make an engine
2) Learn computer graphics and make your own engine

VOTE NOW
>>
File: 1497661508531.jpg (35KB, 480x480px) Image search: [Google]
1497661508531.jpg
35KB, 480x480px
>>60967895
3) 1 & 2 time permitting

But you gotta go to bed now, Kyle. It's past your bedtime, and I told you to stop hanging around this 4chan guy.
>>
opengl is depreciated
>>
>>60967117

No, it's about being a worthless faggot neckbeard gaymer and buying a 1200$ GPU

P.s. an engine or any library has an API
>>
>>60967895
The engine doesn't matter. You can make a successful game in a fucking rpgmaker.
>>
No indie game developer programs the API directly, it frankly will take far too long to ever build something semi acceptable.

Its an interesting academic exercise but that's where it ends, desu.
>>
File: book0.jpg (46KB, 385x499px) Image search: [Google]
book0.jpg
46KB, 385x499px
>>60966206

"Fundamentals of Computer Graphics" is a decent book. I wrote my first ray tracer using this book as a guide. Some of the equations and conventions the book uses for ray generation is strange but besides that its an excellent read.

Buckle up anon. First time doing ray tracing is pretty euphoric desu.
Thread posts: 103
Thread images: 10


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