Commit Graph

70 Commits

Author SHA1 Message Date
elipzer
30933b53ce Pong Works! 2018-10-18 00:48:05 -04:00
elipzer
56af508ef4 Bouncing works... Kindof...
Need to fix for bottom and left cases
2018-10-17 19:53:36 -04:00
elipzer
d2afef5090 Scene renders. Need to do collision and whatnot 2018-10-17 19:21:58 -04:00
elipzer
fd4cd2a407 Lit pipelines work!
Problem was that I didn't set the material (or the normals)
2018-10-17 15:09:32 -04:00
elipzer
8ee0ab2edb Lighting works... Just not properly
Commiting now so that there is something displaying for the lit
scene.
2018-10-15 22:38:59 -04:00
elipzer
98c6d3868c Added the base to the lit pipeline.
Still need to allow for adding lights!
2018-10-15 19:53:22 -04:00
elipzer
04c31686ec Fixed reverse-texture rendering by flipping the camera "handedness" 2018-10-15 11:42:12 -04:00
elipzer
402ef29734 Fixed broken UV coords.
Was caused by sending the incorrect number of coords per each
vertex. Now there's a problem in that the UVS are flipped
horizontally
2018-10-15 11:28:35 -04:00
elipzer
94de35536a Got it working but its not working...
The UVs are off for some reason but I'm not 100% sure why. Possibly
caused by some sort of offset not being accounted for.
2018-10-14 21:19:38 -04:00
elipzer
e3c85324c6 Changed Filters to be more representitive
Also moved all the code for each pipeline into the header files
rather than the .cpp files to keep it all in one place.
Considering just moving all the code into one file just to make it
easier to create new pipelines but that may be overkill and may
make the project harder to maintain in the future.
2018-10-14 15:44:04 -04:00
elipzer
0c767e9441 Added Pipelines!
Greatly streamline the concept of rendering and abstract rendering
so that scenes can render from many different pipelines if they
want to!.
2018-10-14 15:06:51 -04:00
elipzer
bb4592ed63 Got the batch rendering to be similar to where I want it.
Changing the mechanic of the renderer to support pipelines.
One scene could have multiple pipelines. The pipelines allow for
one shader, one camera, and multiple batches.
2018-10-14 00:52:32 -04:00
elipzer
2f6c5ee319 Starting off with specified rendering.
Almost there. Just an odd linker error so far.
2018-10-13 15:26:22 -04:00
elipzer
6020231c23 Removed duplicate constructor problems using the 'using' directive 2018-10-13 14:07:08 -04:00
elipzer
cbcf9dad21 Got rid of unused file and updated filters for builtin/example 2018-10-11 15:50:08 -04:00
elipzer
ce4a2a24ce Re-formatted Engine Filters 2018-10-11 15:37:16 -04:00
elipzer
e84ad4f9a1 Renamed project names (but not file names) to proper names.
Still need to find a way to rename the project file names.
2018-10-11 01:32:32 -04:00
elipzer
7cbe8acf30 Libraries Work!
Now the code is being compiled through .lib files!
2018-10-11 01:26:24 -04:00
elipzer
5db5ce971c Probably BREAKING - Moved everything into proper directories
Also added a copy pre-build even for .h files into the include
directory for charcoal and charcoal-builtin
2018-10-10 23:56:39 -04:00
Elipzer
8da055a018 Filters update for removing stdafx.cpp 2018-10-10 17:44:49 -04:00
Elipzer
8867e8086e Changed stdafx.h to be deps.h 2018-10-10 17:44:15 -04:00
elipzer
0ad7f7d96d Added the new project folders
Still need to setup DLL stuff with dll export/imports.

Using DLLs should make the project faster to build AND should make
it easier to distribute.
2018-10-10 11:25:37 -04:00
elipzer
43ddc00224 Remove CHECK_GL_ERR from TexturedBatch.cpp 2018-10-10 10:56:35 -04:00
elipzer
49f7a3e2d7 Fixed the textured cube from being broken.
The problem was caused by vector re-allocation. This is a similar
problem to what happened with the mesh factory. It was solved by
converting the texture factory to use lists instead of vectors.

The reason for using lists is to prevent the need for explicit
deallocation of resources and instead allow the use of a list to
automatically allocate/deallocate the textures/samplers/meshes.
2018-10-10 10:54:13 -04:00
Elipzer
5a9765b111 Image Rendering almost works!
There is an OpenGL error (1282) invalid operation that is getting
caught when switching to the imagescene. This needs to get fixed
and then hopefully the whole thing will work.
2018-10-09 19:58:26 -04:00
elipzer
b7456401e0 Almost able to render the image
Added image scene to render an image in a scene. There is also now
a testing image that is an uber meme. Currently the problem is
that the spritebatch cannot use the offsetof macro because it is a
templated class. Possible solutions to this are changing it to be
specifyable or implemented per vertex type as the other batches
have been.
2018-10-09 11:42:17 -04:00
elipzer
a8abb4afc9 Added a Sprite class to render 2D things
The sprite inherits from Poseable. It is intended to allow for
pure 2D rendering or integration of sprites/particles into 3D
scenes. Eventually an ImageScene should be created to test out the
image loading, sprite movement and rotation, and 2D camera
functionality for the builtin engine.
2018-10-08 15:19:48 -04:00
elipzer
07a781c075 Started image loading with lodepng 2018-10-07 21:51:05 -04:00
elipzer
d196e42522 Added a plane to the shadowed scene.
Also fixed multiple batches failing from vector resizing. Now
using a list as the back end for batched scenes.
2018-09-20 13:53:06 -04:00
Elipzer
ab86354833 Added a plane generator to the mesh generator class 2018-09-20 13:06:07 -04:00
Elipzer
821111416f Added namespaces to builtin types 2018-09-19 03:52:42 -04:00
Elipzer
cc9db05987 Added Baseline for LitShadowedScene 2018-09-18 16:55:32 -04:00
Elipzer
ba18f97d22 Fixed LitVS from illegally using a struct as an input param 2018-09-18 16:26:51 -04:00
elipzer
0e3982591e Textures Work!
MyBuiltinTexturedScene (number 7) displays a cube that loads its
faces from a hard-coded texture. Mipmaping is supported. Just use
the XXX_MIPMAP_XXX Min/Mag filters to use it. TODO next is
combining lighting and textures and then up after that is shadows.
I may just do lighting and shadows before lighting, shadows, and
textures.
2018-09-16 20:50:51 -04:00
elipzer
c0d49da992 Getting Closer to Textures 2018-09-15 20:43:29 -04:00
elipzer
ae7fcc9011 Starting Textured Scene
Want to use seperate textures and samplers for the scene to allow
for more modularization. Currently have created a texture class
and started creating a scene class.
2018-09-15 17:40:49 -04:00
elipzer
1eea92a3af LitScene Phong Lighting Complete
Now, LitScene allows for simple lighting. (Shadows still to come).
Ambient, specular, and diffuse lighting available and each mesh's
vertex can define a material that defines its reflectivity. An
example scene was added to the MyApplication as the scene for the
6 button.
2018-09-15 03:46:42 -04:00
elipzer
5200ba4dbe Specular Lighting
Next up is attenuation
2018-09-14 23:30:14 -04:00
elipzer
9920dfc25b Added Diffuse Light to LitScene
YES! FINALLY LIGHTING! Next up is specular light!
2018-09-14 21:29:05 -04:00
elipzer
af20d28442 Added Ambient Lighting for LitScene 2018-09-14 18:09:43 -04:00
elipzer
ada349c0a2 Added builtin Namespace
The builtin namespace is intended to be a slighly higher level
interface with OpenGL through the charcoal engine. It is inteneded
to allow the developer to create applications without needing to
create shader code or worry about rendering techniques. Eventually,
applications with lighting, textures, vertex coloring, shadows, and
a text-based UI should be available through the builtin namespace
2018-09-14 14:20:09 -04:00
elipzer
0ec63880a3 Minor changes example builtin scene 2018-09-14 11:55:01 -04:00
elipzer
b533e2a408 Fixed Model Matrix Not Working
Was caused by copying the batch instead of using the correct format
of using a reference
2018-09-13 22:46:36 -04:00
elipzer
d63f341d89 More builtin abstraction
Got the builtin basicscene to render. For some reason, it seems
like the model matrices are not working correctly. The two shapes
that are supposed to be rendering on screen are not moving around
as they should be.
2018-09-13 19:21:34 -04:00
elipzer
a933c19fa9 Got the scene to render.
Need to re-make the builtin version. The problem, again, was caused
by vtables. Need to find a way to make interfaces without virtual
methods to remove the need for vtables. Found a good stackoverflow
article on this.

https://stackoverflow.com/questions/44317289/c-interface-without-virtual-functions

The Positioned, Normaled, Textured, etc. Interfaces should be
re-made using this format.
2018-09-13 13:35:30 -04:00
elipzer
991b52b233 Almost Finished Builtin
Builtin general structure created. Added a builtin::BasicScene
class for quick general testing of the engine on different systems.
The builtin::BasicScene class greatly reduces the amount of code
needed to be handled by the developer by offering a pre-made way
to handle it. It even includes pre-made shaders!
2018-09-13 00:51:47 -04:00
elipzer
31e3d15ab1 Builtins
Starting the setup for builtin types for rendering. This will allow
the engine to be easier to use for beginners while still offering
great modularity and functionality. The builtin namespace is
intended to simplify mesh loading and rendering. It should
eventually offer pre-made shaders to simplify the rendering of the
builtin types. Possibly in the future, it could have partially
setup scenes/application to simplify scene/application building
2018-09-12 18:46:36 -04:00
elipzer
77e8b0de5e Added Namespace: charcoal 2018-09-12 17:03:46 -04:00
Elipzer
3205680062 Fixed Camera
Also added a required prerender function to scene and application.
This function is intended to be used as a way to prepare the scene
to be rendered in its current state. For that reason, the delta
time and the current clock tick are not passed to it.
2018-09-12 11:22:56 -04:00
elipzer
ee7f2e4006 2D Camera Works. Working on 3D Camera. 2018-09-12 09:46:55 -04:00