Skip to content

u/logimech

In this archive from May 2011 to Nov 2017

0
posts
61
comments
0
media
185
score

Top comments

This is pretty awesome. Simple foundational examples with nods to a more-or-less consistent rationale based on a small set of axioms.

Definitely a step forward from the skeuomorphic style we had just a few years ago, which was pretty ad hoc to begin with.

12 points

my goal is making a game and not an engine

People here (and elsewhere) tend to take interpret "make games, not engines" to mean avoiding lower-level libraries. The original article never advises against using lower level components like OpenGL, it simply advises against making robust and reusable subsystems out of those low-level components. Simply meaning, don't worry about wrapping up all the intricacies of such libraries in ultra-reusable and ultra-configurable class architecture.

But to address your question - As far as I'm aware, you've listed the two best options for your needs:

  1. Use a robust 3d rendering engine like Panda3D or Ogre3d as you looked at before.
  2. Use a "low" level library like OpenGL or Direct3D.

The robust engines are big and complex because a lot of 3d rendering is fairly complex in nature. These libraries are designed to address the needs of a wide audience, and as such they will offer a huge amount of configuration options. They tend to "force" you into their framework because a lot of what they offer would be very hard or impossible to provide otherwise.

If you just want some basic 3d on the screen without all the fancy frills of the aforementioned graphics engines, there's really no reason to avoid "low" level libraries like OpenGL or Direct3D for your graphics infrastructure. They are quite simple and designed to be easy to use for game makers. Once you learn the relevant terminology, it's straightforward to understand and use. You can even use something like SDL (or perhaps SFML) to get the basic drawing context set up for you. After that, it's a matter of injecting a few vertices and some basic linear algebra to get 3D objects on the screen. (There are dozens of tutorials on how to do this.)

I'm not sure there are any alternatives in between these two for 3D, simply because such a middleground would be of questionable value.

10 points

I think you're a bit confused about what batching means. The one gldrawelementsinstanced call would be "more batched", while the multiple calls would be less so. And as someone else said, it's just OpenGL overhead. General rule of thumb, the less gl calls the better.

It's been a while, but I believe front-to-back sorting of transparent polygons simply doesn't work. You can't alpha blend correctly unless you go back to front.

There are some really good books out there for opengl, people seem to like writing about it and playing around with it, so some literature is quite good. It will easily save you months of learning the hard way at the beginning if you pick up a book on it. You're free to do what you wish, but you'd probably save a lot of time by learning and using general best practices prior to fudging around trying to optimize it yourself.

8 points

Subreddits

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.