Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 10/06/19 in Posts

  1. Directly accessing the JVM is not a good idea. This will break the game when there are other mods using ASM. Moreover, looking up fields and methods during runtime via reflection (yes, even through JVM) is much, much slower than writing your code in Java, as the latter is compiled to bytecode and have direct access. Therefore, you should not be writing mods in languages other than Java, as it is unnecessarily expensive. As for your question, the easiest way would be via GLM. Simply apply the camera's transform onto the 3D point you want to transform. You can look up the specific calling on GLM's documentation. The transformation is relative to the transform of the camera. If I understood your intention correctly, you need to offset the position of your 3D points by the position of the player. Also: 1. Please don't use raw pointers. 2. There is no need to cast the ptrs to a float array and copy it into a double array. gluProject takes in a void pointer; you can simply throw ptr into it without any explicit conversions. 3. Using GLdouble to store rendering data like model and projection is slow and unnecessary. Float should suffice, as the precision difference is not enough to be displayed on a pixelated viewport.
    1 point
  2. I meant to convey confusion with that. I apologize that it came off as annoyance or me loosing my patience. Though I do loose my patience on here with some people and do get annoyed by some as well. I can't say I've ever had that experience with you. But back to your problem what was it you were trying to learn from that section of code? If you are still trying to accomplish rendering a moveable image. Then you bind the texture to OpenGL with TextureManager#bindTexture and then if you are in a Gui/Screen use blit. Specify the values it asks for like you would render your background of the gui. So the parameters for this blit method is where on the screen x,y then where in the image x,y then the width and height to render it to the screen. There are more versions of blit which allow you to customize various things. One limitation of the above method is that it only works with 256x256 images. Another one is you can't scale up or down the size of the image.
    1 point
  3. Ok, we've found the culprit! The current version of Atum 2 has some leftover debug code, it's been fixed on their end. Hopefully a release with the fix will be out soon. Thank you for the modlist, that really helped narrow it down.
    1 point
  4. Just fyi I do not think this is a mod. The update to my pack where this change was ONLY a change to the server config file. Turning pvp to false, and spawn protection to 0 Also I'm not sure how we are supposed to provide a log of the console, but I will include a screenshot. here is a list of the mods (a bit messy atm we are in beta) but again this issue did not start happening from the addition of any mod. https://docs.google.com/spreadsheets/d/1aIslQzlAm3mwbPwryQV3yohA5Pn3douMbixGhc_DvL4/edit#gid=0
    1 point
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.