Commit Graph

  • 1e4279f671 Move basic window functionality to a superclass. Makes it easier to share implementation with other concrete windows using GLFW rexy-graphics rexy712 2022-02-24 19:04:27 -08:00
  • 283ce10697 Move math library to separate project rexy712 2022-02-23 19:26:58 -08:00
  • 96b409adc2 Move multipurpose files over to rexylib so I can reuse them in other codebases rexy712 2022-02-23 17:01:31 -08:00
  • 8a0947e750 Rearrange the wip stuff again. I think combining shaders with vaos is a good idea since they seem to work together a lot. Plus I'm pretty sure that's sorta how vulkan works. rexy712 2022-02-23 16:34:26 -08:00
  • 6e54ae74a7 Allow build on system without standard library concepts rexy712 2022-02-21 19:13:41 -08:00
  • 46e8d73d22 Work on api agnostic shader interface rexy712 2022-02-21 18:52:39 -08:00
  • a15efd2ae7 Remove use of older renderer setup from play_state. Some functionality is lost, namely the color changing of the squares. This would require manually operating on the ogl::shader_program which I can't allow to happen in that context. An intermediary class must be created so that data in the shader can be manipulated render api agnostically. rexy712 2022-02-21 13:10:41 -08:00
  • f7c0b4a177 Remove need to know the shader type from pause_state. Moves rendering api dependance elsewhere rexy712 2022-02-20 18:47:15 -08:00
  • 621bf0349a Rename egn::object_base to egn::object rexy712 2022-02-18 18:14:09 -08:00
  • f40559f543 Add explicit template instantiation for most common matrix, vector, and quaternion types rexy712 2022-02-18 18:11:17 -08:00
  • 106c7009b5 Clean up some of the concept jank rexy712 2022-02-18 17:46:17 -08:00
  • 3a2e1c27a4 Fix forgotten typenames in header. GCC didn't notice but clang did rexy712 2022-02-18 17:03:32 -08:00
  • ae068a8688 Playing with c++20 concepts rexy712 2022-02-18 16:57:27 -08:00
  • f2fa02336b Integrate some wip changes into pause_state rexy712 2022-02-18 16:57:14 -08:00
  • 0cc6c7fff6 Add wip cleasses. Change coding standard to have 'void' in empty parameter lists. change instances of math::vecN<GLfloat> to math::vecNf rexy712 2022-02-17 05:13:33 -08:00
  • 85d6acad11 Restructure directories rexy712 2022-02-10 16:56:01 -08:00
  • daa5f13a60 Remove files that were not being used anymore rexy712 2022-02-10 10:43:55 -08:00
  • d862fa5fc0 Removed all this random testing bs rexy712 2022-02-10 10:42:02 -08:00
  • 06d3c3d9c7 Fix incorrect type in uniform rexy712 2022-02-06 13:37:42 -08:00
  • e0924c5895 I forgot to commit for a while so there's a lot in here. Added ubo class template for handling Uniform Buffer Objects. This class automatically finds the offset and alignment for given data in a GLSL std140 uniform block. This makes it easy to just assign data through the gfx::ubo interface and bind that to the relevant shader_program's uniform block Changed shader_program's method of handling uniforms to match more closely to how vao handles its attributes. That is to call with the location as argument to get a proxy object on which to operate. I find this nicer to work with than having everything to do with uniforms in the shader_program class itself Add a flat_camera class which just assigns the near and far plane to 0 and 1 respectively Start work on a gui system which i'm really not confident about. Attempting to rethink how renderers work, but also no really confident about where i'm going with it Break out vbo_scoped_map into a more general scoped_buffer_map class so that vbo and ubo can utilize it Remove old gl_buffers units that were not really being used since my change over to opengl DSA functions Change the gfx::resource_manager to keep shared_ptr's in the container so the data can be more nicely shared Add missing aliases in math::fwd_declare.hpp for boolean types Change orthographic projection generator function to have the z values behave more in line with how opengl handles z depth. May have to undo this at some point but it seems to behave correctly now Fix some rvalue related aspects of util::deferred ' rexy712 2022-02-04 13:49:22 -08:00
  • 1b884a9a48 Update makefile rexy712 2022-01-26 19:03:03 -08:00
  • 7622aa74a6 Fix memory leak and undefined behavior in stb_alloc.cpp rexy712 2022-01-26 17:46:14 -08:00
  • 6f670b6cd9 Rendering some amount of text bby rexy712 2022-01-26 16:43:31 -08:00
  • fa15721c94 Work on text rendering. All just tinkering really rexy712 2022-01-20 17:03:00 -08:00
  • a8082b6885 Add some font test comments rexy712 2022-01-18 15:28:26 -08:00
  • da9b871626 Add ability to buffer data to the middle of a vbo rexy712 2022-01-18 15:28:10 -08:00
  • 80cb7f9528 Add deferred_function for when you want to call something other than a constructor lazily rexy712 2022-01-18 15:27:47 -08:00
  • 54014cf460 Update font atlas generator to make smaller textures rexy712 2022-01-18 15:27:04 -08:00
  • 01a20905f4 Add convenience aliases to math classes rexy712 2022-01-18 15:26:14 -08:00
  • 52808c3826 Change resource manager to be more closely tied to the opengl context instance rather than the game instance rexy712 2022-01-18 12:03:46 -08:00
  • 6580fdd4d5 Add debug output on reset in play_state rexy712 2022-01-17 14:57:13 -08:00
  • 512cd70145 Update makefile to actually work. Add reset button in play_state (r) rexy712 2022-01-17 13:58:39 -08:00
  • 21137971ca Start work on figuring out interface between graphics and engine subsystems. I did this by creating a 'board_gfx' class that became a member of the 'board' class. This gfx member does all the graphics legwork for the type. I also put all the tic-tac-toe specific files into 'ttt' subdirectories to make it easier to see what's specifically for this game and what's just a wip idea rexy712 2022-01-17 13:35:29 -08:00
  • 5857c442aa Add geometry shader to the square_shader for tests. Add texture_base class to allow easier addition of the texture_array class. Finally got some level of instance rendering to work, even if it's not technically instanced. rexy712 2022-01-16 15:17:43 -08:00
  • a49d24d61e Add basic font atlas loading rexy712 2022-01-15 15:26:21 -08:00
  • 1c4d5cd304 Add subimage to texture rexy712 2022-01-15 11:36:42 -08:00
  • 913285e57a Make board tiles change color if they are hovered and clicked rexy712 2022-01-10 12:44:14 -08:00
  • 46c22c6193 Add pause screen image rexy712 2022-01-10 10:35:33 -08:00
  • 56e4599ea1 Add resource manager. Add tic tac toe board abstraction rexy712 2022-01-09 15:46:53 -08:00
  • 9a16c6ca69 Merge branch 'rexy-graphics' of ssh://rexy712.chickenkiller.com:1995/var/git/repos/rexy712/our_dick into rexy-graphics rexy712 2021-08-01 13:27:37 -07:00
  • 59b6cd65fd Fix wayland build and merge fixes from other project using audio rexy712 2021-08-01 13:27:13 -07:00
  • 2857345b87 Add line-line collision check rexy712 2021-01-17 16:26:33 -08:00
  • 835f190aa9 Add sphere-rectangle collision check rexy712 2021-01-13 10:21:15 -08:00
  • 73cf1e3f42 Add sphere-linesegment collision check rexy712 2021-01-13 10:17:57 -08:00
  • e7bbfb4591 Add sphere-sphere collision check rexy712 2021-01-13 10:15:10 -08:00
  • 93cc1b4d02 Add sphere-point collision check rexy712 2021-01-13 10:13:19 -08:00
  • 5a22d09e47 Fix retard rectangle-point collision check rexy712 2021-01-12 14:32:51 -08:00
  • de510b1f14 Fix rectangle-point collision checks in the cases where the point is only outside the coplanar rectangle on 1 primary axis. rexy712 2021-01-11 18:02:33 -08:00
  • 3946f9157c Add point-rectangle collision check rexy712 2021-01-11 16:38:10 -08:00
  • bc7846b697 Clarify for myself how the line-point intersection check works rexy712 2021-01-05 13:38:55 -08:00
  • 34f4b22ad8 Change around collision related classes to allow for collision detection between classes without vtables given we know the dynamic type rexy712 2020-12-03 12:57:42 -08:00
  • aea6fb5320 Change line-point intersection check to no longer be constrained to 3D space only rexy712 2020-12-02 15:34:05 -08:00
  • fd282607ae Add epsilon tunable to collision checks. Add line-point collision check logic rexy712 2020-12-01 12:19:16 -08:00
  • 478b82582b Add collidable point rexy712 2020-11-30 14:07:35 -08:00
  • 32aabb472a Change some stuff about collision setup. Trying out double dispatch to make it easy to just call check_collision(a, b) with unknown dynamic type rexy712 2020-10-26 17:34:43 -07:00
  • ffc584e56d Remove exceptions rexy712 2020-10-25 16:41:25 -07:00
  • 6a47a796b9 Change function naming in object class to better match the naming convention rexy712 2020-10-24 08:33:57 -07:00
  • 0959517d08 Work on bounding volumes rexy712 2020-10-18 10:00:55 -07:00
  • 05efb3c006 Remove aliased warning option rexy712 2020-10-18 10:00:21 -07:00
  • b488d80dc9 Add converting constructors and assignment operators to math objects rexy712 2020-10-18 09:59:35 -07:00
  • fc11e5dd0e Fix typo rexy712 2020-10-17 19:37:57 -07:00
  • 20b3a47aba Add a bunch more debug_print calls rexy712 2020-10-17 19:16:34 -07:00
  • f66e20aa3d Working very unpolished tic-tac-toe game. rexy712 2020-10-11 12:36:05 -07:00
  • 60ab28d37a Change how window handles initial viewport setup. Add option to make context current upon window creation rexy712 2020-10-06 17:13:27 -07:00
  • befab0f495 Remove unused render.cpp and render.hpp rexy712 2020-10-06 17:12:43 -07:00
  • 223dbc7006 Change how fbo's manage viewports since I misunderstood how glViewportIndexedf works rexy712 2020-10-06 17:11:49 -07:00
  • b514cd2e87 Add some projection functions to math namespace. Break projection into their own header rexy712 2020-10-06 17:10:59 -07:00
  • 6fe392258b Make x and o images squares rexy712 2020-10-05 11:29:25 -07:00
  • 07a5f0a36f Add ortho camera function to set view bounding box. Add some debug printouts rexy712 2020-10-05 11:29:00 -07:00
  • e44a577ff0 Make graphics interface more cohesive. Remove texture functionality that was broken, add more debug printouts and debug levels rexy712 2020-10-05 11:27:03 -07:00
  • 026b3c129a Fix matrix multiply working backwards rexy712 2020-10-05 11:25:10 -07:00
  • a4e684beb5 Add fbo constructor that will bind existing textures/rbos in a single call rexy712 2020-10-02 06:56:39 -07:00
  • 9fea54d971 Remove annoying debug_print rexy712 2020-10-01 11:33:39 -07:00
  • 7874a6d4fd Layout rendering idea rexy712 2020-10-01 11:32:52 -07:00
  • c914489eca Fix a lot of math inconsistencies and add missing functionality rexy712 2020-10-01 11:32:28 -07:00
  • 9c87c4399f Figure out how to resize a framebuffer (just fucking delete all attachments and rebuild them lol). Remove render_manager from main.cpp. Move game logic out of main to make it less cluttered. Remove unused audio functions from main.cpp. rexy712 2020-10-01 07:51:32 -07:00
  • b2c8b0b3b5 Switch to true modern opengl (DSA) rexy712 2020-10-01 05:01:30 -07:00
  • c45875c108 Change default opengl version to 4.5 to support dsa functions. Will start work on changing to using those new functions rexy712 2020-09-30 09:59:02 -07:00
  • 2d081fc7e1 Fix linking on non-linux posix systems rexy712 2020-09-29 13:55:44 -07:00
  • 5449357396 Add license disclaimers to all shared development source files rexy712 2020-09-29 13:55:17 -07:00
  • cf33a851e4 Add better glfw debug error reporting rexy712 2020-09-29 10:35:02 -07:00
  • 8758be4379 push correct change to glfwinit rexy712 2020-09-29 07:23:02 -07:00
  • f628a2845a Revert "Add debug printout to glfwInit" rexy712 2020-09-29 07:19:42 -07:00
  • 94718e4608 Add debug printout to glfwInit rexy712 2020-09-29 07:13:08 -07:00
  • 317bf89ea0 fix inclusion of alsa header in non GNU/Linux systems rexy712 2020-09-29 03:44:43 -07:00
  • b6aab8e832 Fix makefile libraries being in the wrong variable rexy712 2020-09-28 15:30:01 -07:00
  • f44051baae Put default debug level back to 1 in makefile. rexy712 2020-09-28 15:27:47 -07:00
  • dd993e6b60 Add scoped_buffer_bind class for RAII style binding of gl_buffer_managers. Also some renaming of 'gl_buffer' and 'buffer_iface' to more descriptive 'gl_buffer_manager' and 'buffer_accessor' rexy712 2020-09-28 15:26:43 -07:00
  • b3c909a93a got framebuffer objects functional with texture and renderbuffer attachments rexy712 2020-09-27 16:50:17 -07:00
  • fe31a9568f Add kinda hacky fbo and rbo rexy712 2020-09-27 13:53:45 -07:00
  • ffa2b06ff2 Improve the debug output system so that it's controlled by the makefile. Also easier to check for debug enable in preprocessor. Add a debug_print_succ macro for outputting success messages rexy712 2020-09-27 09:32:58 -07:00
  • 78f664c2a5 fix build when using libc++ rexy712 2020-09-27 08:41:04 -07:00
  • 96de779f55 Change gl extension loader from gl3w to glad since gl3w was loading incorrect addresses and causing segfaults. Also add opengl context debugging output rexy712 2020-09-27 08:19:59 -07:00
  • c13bf59949 Add camera class because I felt like it rexy712 2020-09-26 16:47:00 -07:00
  • 65e08c5464 Fix matrix multiply not returning anything lol rexy712 2020-09-26 16:46:39 -07:00
  • 41780c24f0 Fix quaternion access to matrix elements rexy712 2020-09-26 15:46:53 -07:00
  • 180922c6fc Rudimentary grid rexy712 2020-09-26 10:51:14 -07:00
  • 5787a362ca add long double matrix debug overload rexy712 2020-09-26 10:17:29 -07:00
  • 1f6de5ba70 Fix mat warnings and add debug printout functions rexy712 2020-09-26 09:50:58 -07:00
  • 2245e8cea1 Fix _rad and _deg literal operators not working rexy712 2020-09-26 09:27:34 -07:00