gentlegiantJGC
cc3fc9f11c
Reformatted using black 23.1
2023-02-14 09:53:06 +00:00
gentlegiantJGC
bb44aff08c
Fixed glGenTextures error
...
The texture was sometimes being generated in a different thread (the one that generated the chunk) leading to an error.
Moved the texture acquisition step into the draw function so it will always be called from the main thread.
Moved the resource pack class into TriMesh
2022-05-19 14:42:47 +01:00
gentlegiantJGC
39d946a6ed
Cleaned up imports
2021-05-23 17:56:10 +01:00
gentlegiantJGC
83bf03b6d2
removed glPushAttrib and glPopAttrib calls
...
These attributes are apparently depreciated.
Removed them and replaced them with direct manipulation of the state.
2021-05-09 13:41:39 +01:00
gentlegiantJGC
5354772456
Made inputs more lenient and cast to correct type
...
Made the checks of the input less strict
Cast to the required type before setting the internal value
2021-04-18 14:11:19 +01:00
Podshot
551214df23
Use isinstance() for type checking instead of type()
2021-04-15 13:38:25 -04:00
gentlegiantJGC
dbae0ff96b
Fixed method and variable name clash
...
Renamed _rebuild variable to _needs_rebuild
2021-04-15 14:35:50 +01:00
gentlegiantJGC
0759a65fa0
Fixed culling issue when mirrored
2021-04-14 13:47:25 +01:00
gentlegiantJGC
6e3b8c0532
Added GL_ENABLE_BIT to stored state
...
This may fix #244
2021-04-09 15:01:59 +01:00
gentlegiantJGC
a2b34ce1ff
Reset renderer state after drawing box
...
This will reset the opengl state to how it was before drawing the boxes
2021-03-28 16:26:58 +01:00
gentlegiantJGC
9e6339ef0d
Made the box colours easily configurable
2021-02-18 15:37:16 +00:00
gentlegiantJGC
924625e958
Reformatted
2021-02-18 15:19:33 +00:00
gentlegiantJGC
6ab131c356
Added an improved box renderer
2021-02-18 15:02:07 +00:00
gentlegiantJGC
21c7def1bf
Added a bool method to the render selection group
2021-02-07 11:07:50 +00:00
gentlegiantJGC
5eb59b6914
Simplified RenderSelectionEditable point code
2021-02-07 11:07:31 +00:00
gentlegiantJGC
85c670d59f
Added a property to get and set all points on a render selection
2021-02-06 18:04:30 +00:00
gentlegiantJGC
61dfc57fae
Modified render selection editable to show the handle points on small boxes
...
This needs more work to add other boxes around the other edges
2021-02-06 11:59:42 +00:00
gentlegiantJGC
eb25f8c3e4
Added methods to the highlightable group to set the highlighting
2021-02-05 17:37:35 +00:00
gentlegiantJGC
de5ad8ff58
Added a len method to the render selection group
...
Should save some time so a SelectionGroup does not creating
2021-02-05 17:36:58 +00:00
gentlegiantJGC
7830c88908
Fixed broken imports
2021-02-05 17:36:28 +00:00
gentlegiantJGC
62c5d8487d
Added optimisation for highlight reset
...
Setting this even if it hasn't changed will trigger a rebuild so checking will save a bit of time
2021-02-05 17:35:10 +00:00
gentlegiantJGC
7b0135bd5f
Added a type error to selection_group setter
2021-02-05 15:29:30 +00:00
gentlegiantJGC
ac3b7b306f
Cleaned up "is not" logic
2021-02-05 15:29:04 +00:00
gentlegiantJGC
674a18edf2
Added some more properties to the render selection
...
Added selection_box property and setter that gets/sets a SelectionBox class
Added a selection_group property that gets the box in SelectionGroup form
2021-02-05 15:28:16 +00:00
gentlegiantJGC
0b6c908a0e
Readded the __contains__ method to render selection
...
This is used to tell if a point is in the box during rendering. I forgot that it was still used
2021-02-05 15:26:47 +00:00
gentlegiantJGC
a8368749e2
Fixed import
2021-02-04 20:02:19 +00:00
gentlegiantJGC
a7377ea337
Reformatted
2021-02-04 19:54:32 +00:00
gentlegiantJGC
0f2236c3d9
Compacted and cleaned up the render selection classes
...
These classes previously did to much of the actual controlling logic.
They have now been stripped back to just an API that controls the renderer state.
Other classes will implement the behaviour by updating the renderer state
2021-02-04 19:53:43 +00:00
gentlegiantJGC
2208b58337
Restructured opengl.mesh.selection
2021-02-04 11:47:10 +00:00
gentlegiantJGC
dcdc30b1b8
Removed unrequired import
2021-02-02 10:26:03 +00:00
gentlegiantJGC
33b854e8e7
Removed the cursor from the editable render selection group
...
This class previously did too much
2021-01-29 11:13:09 +00:00
gentlegiantJGC
5fcdc7eec8
Implemented the static selection box and fixed some issues
...
Implemented the static selection box and connected it to the select tool to test
Fixed some issues related to the selection logic
2021-01-27 11:53:29 +00:00
gentlegiantJGC
b5a46be2ca
Added a method to set the render selection group
2021-01-27 10:36:51 +00:00
gentlegiantJGC
d4a2179e70
Added an unload method to the selection group
2021-01-27 10:35:47 +00:00
gentlegiantJGC
09bc7b7bf8
Fixed an off by one error in the selection
2021-01-26 13:28:05 +00:00
gentlegiantJGC
5301c09c87
Removed old method
2020-12-12 14:57:50 +00:00
gentlegiantJGC
c4caa810db
Redesigned the cursor box position
...
The value is now handled purely in the selection group class
Added setter methods so it can be set separate to the box index
Setter methods handle the updating logic
Renamed SelectionPointChangeEvent to CursorBoxMoveEvent
Renamed EVT_SELECTION_POINT_CHANGE to EVT_CURSOR_BOX_MOVE
2020-12-12 14:55:23 +00:00
gentlegiantJGC
0da46a2fea
Ensured position is a numpy array
2020-12-12 14:20:14 +00:00
gentlegiantJGC
d1e3630e67
Fixed a selection issue
...
There was an issue where the editable form of the selection would display after running an operation even though the selection was not editable.
Not sure why it took me so long to notice the simple solution
2020-12-10 16:01:38 +00:00
gentlegiantJGC
219e9d827e
Modified the selection class to work natively from the bounding values
...
The UI still uses the fill command style but this is more programatic for the back end
2020-12-09 15:20:48 +00:00
gentlegiantJGC
e3a03a0f2a
Fixed ray cast logic
2020-12-08 16:40:09 +00:00
gentlegiantJGC
dddb848840
Fixed a divide by zero error
2020-12-06 10:43:59 +00:00
gentlegiantJGC
a691e04508
Made the selection hover colour more obvious
2020-12-06 10:16:19 +00:00
gentlegiantJGC
4fbd085c0d
Fixed an off by one error of the selection in the negative quadrants
2020-11-29 10:44:52 +00:00
gentlegiantJGC
487cc71208
Cleaned up the opengl.mesh package
...
chunk_builder used to be shared but now it isn't
2020-11-19 12:27:50 +00:00
gentlegiantJGC
83fd6e5d98
Moved drawable and context manager into their own module
2020-11-19 10:31:49 +00:00
gentlegiantJGC
3cf06423f7
Reformatted
2020-11-15 15:58:28 +00:00
gentlegiantJGC
df535d2c06
Merge branch 'master' into structure-rewrite
2020-11-15 15:48:11 +00:00
gentlegiantJGC
cbfda4cc5b
Reformatted
2020-11-14 14:35:19 +00:00
gentlegiantJGC
22bfcf2264
Reimplemented structure group to share RenderLevel
2020-11-05 16:02:57 +00:00