[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
Graphics Programming
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 80
Thread images: 7
File: screenshot.jpg (23 KB, 600x391) Image search: [Google]
screenshot.jpg
23 KB, 600x391
http://en.wikipedia.org/wiki/List_of_3D_graphics_libraries
>Tutorials
ClanLib
http://www.clanlib.org/examples.html
SDL
http://lazyfoo.net/SDL_tutorials/
http://www.programmersranch.com/p/sdl2-tutorials.html
Allegro (4?)
http://www.loomsoft.net/resources/alltut/alltut_index.htm
SFML
http://www.sfml-dev.org/tutorials/2.1/
GL
http://www.opengl.org/wiki/Main_Page
http://www.opengl-tutorial.org/
http://www.glfw.org/docs/latest/quick.html
http://open.gl
http://ogldev.atspace.co.uk/index.html
http://www.arcsynthesis.org/gltut/
http://antongerdelan.net/opengl/
http://proland.inrialpes.fr/download.html
DX
http://www.directxtutorial.com/LessonList.aspx?listid=9
LOVE
https://love2d.org/wiki/Category:Tutorials
Drivers
http://www.phoronix.com/scan.php?page=news_item&px=MTYwNjA
Related website(warning lag)
https://www.shadertoy.com/
Ogre3d
http://www.ogre3d.org/tikiwiki/tiki-index.php?page=Tutorials
>Books
OpenGL Programming Guide
OpenGL SuperBible
Real Time Rendering, 3e
Physically Based Rendering: From Theory to Implementation
The GLSL orange book
>Other related books
SFML Game Development
SDL Game Development
The Practice of Programming
Structure and Interpretation of Computer Programs
Programming Pearls
The Art of Computer Programming
Calculus, by Gilbert Strang
Visualizing Quaternions
>Semi related tutorials
http://docs.oracle.com/javase/tutorial/java/concepts/
http://www.tutorialspoint.com/cplusplus/cpp_object_oriented.htm
http://www.codeproject.com/Articles/22769/Introduction-to-Object-Oriented-Programming-Concep
>>
When I was using Allegro, I was able to create a frame-independant system, all while still going at 60fps by modifying this: https://wiki.allegro.cc/index.php?title=Using_Timers_in_Allegro_4

Now I have gone back to SDL (1.2, I want to see it run on wii and psp, SDL 2 isn't on those), the main reason why I left SDL is because I couldn't get a similar framerate system working.

Can someone show me a simple framerate system for SDL that will actively tell me the frames per second, and allow me to make a deltatime?

I converted lazyfoo's system to ANSI C: http://pastebin.com/Lfixw615 it does not work correctly as I expected. I did not paste everything in the pastebin, you should have enough to compile a game (give or take a few more lines of code).

Any help would be great.

>>42781350
do you have to post that in every thread?
>>
What do you guys use to edit shaders? Is there some kind of special editor/IDE with syntax highlighting or do you just use your IDE and some error checking to see what's going wrong?

Also, is there a better GLFW3 tutorial or is the one on the site the only one? I've figured out most of the basics but I pretty much always need to go back to the documentation to figure things out.
>>
For 2D graphics SFML rips apart all other libraries.

If you're using anything other then SFML, you're doing it wrong.
>>
>>42782499
Care you show a hello world example?
>>
File: paper towel.png (17 KB, 986x703) Image search: [Google]
paper towel.png
17 KB, 986x703
>>42782957
Directly from their website.
>>
>>42781366
Literally just

#define FPS_UPDATE_TIME 1000

unsigned int timeLastFrame= SDL_GetTicks();
unsigned int fpsFrameCount= 0;
unsigned int fpsLastUpdate = lastFrameTicks;
unsigned float fps = 0;

while (true) {
unsigned int timeNow = SDL_GetTicks();
unsigned int timeDelta = timeNow - timeLastFrame;
timeLastFrame = timeNow;
timeFrameCount++;
if (timeNow - fpsLastUpdate > FPS_UPDATE_TIME) {
fps = 1000 * fpsFrameCount / FPS_UPDATE_TIME;
fpsLastUpdate = timeNow;
fpsFrameCount = 0;
}
//use fps and TimeDelta variables here
//actually no, just stop using "muh ANSI C" and create a separate timer class
//and install gentoo
}

>>
Not really sure if my question is relevant to this thread but I'll ask anyway.
Does anyone know about any good tutorials/references for Cocos2d-x 3.0? The project is apparently maintained by Chinese, and they they wrote basically all the documentation in Chinese.
With a bit of experimentation I managed to build something, but I don't know enough to be able to use it to its full potential.
>>
>>42782476
Anyone? Please?
>>
>>42782499
>>42783044

No it doesn't, SFML is objectively far, far worse than raw OpenGL in every way

Typical of a c++ fag to cripple your program with some inefficient poorly designed trash just because you're a retard who can't understand the proper solution
>>
>>42783640

Vim
>>
>>42783645
Okay. I understand your opinion.
Now let me counter your arguments in a rea... oh.
You don't have any.
>>
>>42783640
Just use C syntax highlighting. GLSL is basically C.
>>
>>42783691

Simply epic ;^)

Find a fact that you dislike like "SFML is far less efficient and slower than raw OpenGL"?

Just pretend the person never said it! Then you can just pretend they have no arguments!

Average c++ user right there

*tips constructor*
>>
>>42783775
SFML is far more time efficient though
>>
>>42783775
SFML is not about efficiency, its about compatibility and modularity. And its not even that "inefficient" anyway.
Do some tests before you open your mouth.
>>
>>42783817
>>42783861

Oh wow, you are just such a stereotypical c++ user it's ridiculous

Do you actually think it's more important to be "time efficient" and quickly push out a piece of shit instead of designing something that actually works well?

Jesus christ, I hope you never get a job in programming, what a nightmare it would be to work with you, doing every thing the shittest way possible because it's easier and quicker
>>
How do I create my waifu?
>>
>>42783889
you are literally retarded
>>
>>42783973

Okay. I understand your opinion.
Now let me counter your arguments in a rea... oh.
You don't have any.
>>
>>42783889
>quoting two people but answering just one of them

That said, let's do some thinking here. How do you solve a big problem?
WRITE SUM C CODE A... no, stop.
You divide your big problem into small problems, and those into even smaller problems, and build on top of that.

Also, i want to see you create a OpenGL context and capture input just using your "raw OpenGL".
>>
>>42784050

>Also, i want to see you create a OpenGL context and capture input just using your "raw OpenGL".

OpenGL isn't supposed to do that, I'd like to see you write an OS with SFML
>>
>>42784068
Exactly my point. Now we're getting somewhere.

You were comparing SFML and "raw OpenGL".
>>
>>42784093

>You were comparing SFML and "raw OpenGL".

I was obviously comparing the equivalent graphics part of SFML with OpenGL, which you know perfectly well, since this is of course a graphics programming thread it is intuitive I am talking about graphics programming, not any other portions SFML has, you're just dishonestly pretending you didn't know something now just to win a shitty argument
>>
>>42784153
Even with graphics, SFML isn't as inefficient as you make it out to be.
>>
>>42783889
Ladies and gents, a typical zealot...
>>
>25 posts in and nothing but arguing, no images posted except the OP

Come on, /g/.
>>
File: Haskell SDL.png (7 KB, 640x506) Image search: [Google]
Haskell SDL.png
7 KB, 640x506
>>42784300
I made this in Haskell.
>>
are there any guides that teach you how to create a simple entity in something like blender, then plug that into an engine or opengl and have it do some basic shit?
>>
>>42785058
From my reading, you have to parse the file that 3D programs like Blender output and translate the data into data OpenGL can understand, like vertices and triangles.

I'm sure libraries that do this already exist but I haven't checked.

Note: I know very little about graphics programming
>>
>>42785189

well, it's a start.
>>
>>42785058
http://www.opengl-tutorial.org/beginners-tutorials/tutorial-7-model-loading/

It does not say anything about the first part, but should get you going on loading/rendering things
>>
>>42784986
Nice. Was it fucking difficult doing that in master race Haskell? I want into it.
>>
>>42785356

oh, nice
>>
>>42785417
I'm bad at both Haskell and OpenGL, so I used both at the same time.

I did this by looking at the documentation online for Haskell's SDL bindings (SDL isn't well documented for Haskell, at least as far as I can tell, you're better off with GLUT)

import Graphics.UI.SDL as SDL

main = withInit[InitEverything] $ do
screen <- setVideoMode 640 480 32 [SWSurface]
SDL.setCaption "Top Kek" []
loop screen

draw :: Surface -> IO ()
draw screen = do
let kek = Rect 200 200 200 200
fillRect screen (Just kek) (Pixel 12394587)
updateRect screen kek

loop :: Surface -> IO ()
loop screen = do
draw screen
glSwapBuffers
loop screen


Because OpenGL is pretty much a giant state machine, using it with Haskell is a bit strange.
>>
>>42785496
>using it with Haskell is a bit strange.
And that's what I mean with you simply don't write games in Haskell.
>>
>>42785611
Well, I like math.
Haskell is good at doing math. Math problems are like games to me.
Therefore, Haskell is good at games.
>>
>>42783645
You see kids, if you listen to these people you will spend the rest of your life writing code in assembly, i mean its the only way to write the fastest programs

If you honestly want to write something fast use unity, the modern consumers dont give a shit about quality
>>
>>42784191
Exactly. Most of the bad things where wiped out with 2.0.

And now, that development is driven by more than one person, that one-man argument is wrong as well.
>>
>>42783561
That is the variable timestep, where you pass TimeDelta to update()?
>>
/vg/'s AGDG loves unity.
/g/ is full of zealotry.

C + OpenGL = Not developing a game.
>>
>>42787492
>C + OpenGL = Not developing a game.
why da feck not?
>>
>>42787519
If anything it'd be very simplistic because you'd have to do just about everything from scratch.
>>
>>42782499
So, what is SFML, exactly?
>>
>>42783645
>>42783775
>>42783889
All that mad
>>
>>42787492
Unity is pretty good, I don't recall anyone on /g/ giving any good reasons as to why it's bad
>>
>>42788722
I don't think you can use it on Linux. I believe you can output games to Linux with it, but not develop on Linux. That's a pretty big negative.
>>
>>42788722
closed source, editor doesn't work on linux.
>>
>>42788722
>>42788767
>>42789281
You guys looking forward to Polycode? At least we have Godot till then.

Anyone know if using the Blender Game Engine is worth a shit?
>>
>>42787884
That doesn't make any goddamned sense and it shows everyone how much you actually know about developing games.
>>
>>42788722
It's proprietary
>>
>>42788722
Buggy shite, terrible techniques (e.g. packet reconciliation), slow, ridiculous choice of languages, 'integrated' rather than clean and modular. I could go on. Did I say buggy shite? Buggy shite.

There are absolutely no good games that use Unity, and part of the reason is that Unity itself gives shoddy results.

>>42785645
>modern consumers dont give a shit about quality
That was AGDG Quality! Video game quality is divebombing, and this mentality is one reason why. Rather than release a good game, indies would rather pat themselves on the back for having made a game at all. You get pay2win shovelware that crashes frequently, has buggy gameplay, is pointlessly bloated to hell and back, and requires frequent huge updates when a 2MB update would do (due to the hare-brained asset storage scheme of the engine).

>>42785611
There have been some interesting demonstrations of purely functional game development (particularly rendering abstractions) using Haskell. As much as I hate Haskell's drive towards esoteric mathematical abstraction (fucking category theory), the community is right on the cutting edge of Interesting And Promising Things.
>>
>>42783640
>edit shaders
I use my IDE, it's got syntax highlighting for GLSL.
>>
>>42785189
You could use assimp to import the 3D model.

>inb4 stupid name
>>
Do any of these GL tutorials cover OpenGL ES or nah?
>>
File: 1403963314399.png (149 KB, 251x382) Image search: [Google]
1403963314399.png
149 KB, 251x382
Any else developing a hard-on for Rust (the language)?
>>
>>42790252
No, but I have a hard-on for Rust (the chemical compound).
>>
>>42790309
What about Rust(the mushroom)?
>>
>>42790309
I hear you; tfw rubbing it all over your dick...
>>
>>42790318
I mean fungus. I know some autist is going to have a meltdown over that.
>>
>>42790252
is they replaced lots of single trait (the ones that aren't equivalent to typeclasses) with pure functions it would be great!
>>
>>42790318
I want to reach through the internet and strangle you to death right now.
>>
>>42789557
True, Garry Newman is redesigning Rust ( the game) because Unity is total shit.
>>
>>42790373
>>
>>42790131
Just ignore the existence of geometry shaders and the more esoteric texture formats and you'll be learning OpenGL ES.

Tutorials are shit by the way, especially with such a fast-moving field. Stuff written a couple years ago is long obsolete.

>>42790252
No, only Go.
>>
Daily reminder to optimize your shaders:
http://humus.name/index.php?page=Articles&ID=6
http://humus.name/index.php?page=Articles&ID=9
>>
>>42783889
>Do you actually think it's more important to be "time efficient" and quickly push out a piece of shit instead of designing something that actually works well?

The only real answer to this is "it depends". That's actually the answer to almost every "which is better" sort of question. For constrained time/money budgets how quickly you can make something that works good enough is probably more important than computational or memory efficiency (and sometimes even more important than it working 100% of the time!). I have no clue how good SFML is in either regard to be honest, but to dismiss it or any similar tool out of hand is silly.

The only reason you'd answer otherwise is because you've never been paid to program or had to make real decisions about how to spend your free time.
>>
>>42784986
top kek indeed.

So does all of that live inside of some sort of graphics IO monad?
>>
Jam--jamming on the one.


That means bump, in the huxtable household.
>>
Should I use point sprites instead of quads to save 75% memory when drawing grid stuff like tile maps?
>>
>>42792628
yes
>>
>>42792661
How do people work around the problem of point sprites clipping at the center?
>>
>>42788722
Its rendering pipeline is bad.
http://forum.unity3d.com/threads/the-wish-for-an-alternative-rendering-path.198539/
>>
File: 2014-07-02 06-02-13.jpg (159 KB, 960x640) Image search: [Google]
2014-07-02 06-02-13.jpg
159 KB, 960x640
>>
File: 2014-07-03 01-59-16.jpg (159 KB, 960x640) Image search: [Google]
2014-07-03 01-59-16.jpg
159 KB, 960x640
>>
>>42790065
Which IDE is it?
>>
When I gluTranslate and gluRotate GL_MODELVIEWMATRIX my perspective warps like mad. Rustling the shit ouf of my jimmies.
>>
>>42793428
Stop using deprecated libraries.
>>
>>42793438
>Making me write my own screenspace/perspective transformation.
Okay
>>
>>42793454
it's not that hard m8
Thread replies: 80
Thread images: 7

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

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.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.