cinnaboot
8f77e33f33
use rg_arena for storing GLMesh buffers
4 years ago
cinnaboot
39cc17db68
remove fixed properties of ShaderProgram in favor of dynamic properties
...
this makes use of our dynamic shader parsing code, so we don't need to
track these properties explicitly any more.
4 years ago
cinnaboot
a4c22aee1b
remove duplicate code that deletes shaders after loading
4 years ago
cinnaboot
70458f248a
allow entities to have empty diffuse texture
...
this is needed when we want to programatticaly create meshes for use
with, eg) the colored_vertices shader.
4 years ago
cinnaboot
613ded9b4e
switch to SDL_LoadFile for reading shader sources
4 years ago
cinnaboot
ed9b42854e
remove FIXME about buf_type
4 years ago
cinnaboot
48556e6c2b
use new utilCStrMatch function instead of hashing
4 years ago
cinnaboot
a44971ae40
add updateGLBuffer as generic helper
4 years ago
cinnaboot
63dceb6cdf
initialize GLBuffer members to sane defaults at creation
4 years ago
cinnaboot
2919e2bcb6
add data size parameter to GLBuffer
4 years ago
cinnaboot
4bec420d4f
remove defaults for initTransforms()
4 years ago
cinnaboot
92411decf2
add getUBOByName helper
4 years ago
cinnaboot
6ca1e919f8
add TODO about sorting uniform buffers
5 years ago
cinnaboot
a490303c23
change assertion to boolean return in parseUniformBlocks
5 years ago
cinnaboot
54c65d1745
implement buffer backed lighting uniform structure
5 years ago
cinnaboot
a3b86b77c1
add FIXME for cleaning up shader after linking
5 years ago
cinnaboot
cd74503d5f
check for valid block binding in parseUniformBlocks
5 years ago
cinnaboot
783f4427bc
clean up initTransforms() a bit
5 years ago
cinnaboot
3993fe4129
add updateCamerTransforms helper function
5 years ago
cinnaboot
72607666a8
add getFreeUBO helper function
5 years ago
cinnaboot
79b20bb6b0
load a dummy shader to init GLContext limits
...
This solves a chicken and egg problem when loading shaders that need to
know about GLContext limits.
Also moved initGLContext() from tangerine.cpp to shader.cpp
5 years ago
cinnaboot
351f179bba
rename instances of GLmesh to GLMesh
5 years ago
cinnaboot
52dc91dad4
set GLVertexAttrib.buf_type when loading a GLMesh
5 years ago
cinnaboot
7e4eadd16a
add cstdio header to shader.cpp
5 years ago
cinnaboot
87f0523434
add extra logging for shader linking errors
5 years ago
cinnaboot
6bd954923d
change hash_str creation to use snprintf
5 years ago
cinnaboot
8d0f3be381
rename instances of model_matrix to node_matrix
...
model matrix is the transform that should be applied at the entity
level. Anything with and entity as parent should be transformed with a
node matrix
5 years ago
cinnaboot
9f94c153f8
rename structures in asset.h to consistent style
5 years ago
cinnaboot
99db662ac5
rename data structure in shader.h to consistent style
5 years ago
cinnaboot
2461e499ee
replace instances of printf with new logging macro
5 years ago
cinnaboot
41b4ed4d6d
set up the attrib mappings for the default shaders automatically
5 years ago
cinnaboot
2e0dd1ab5a
move getMeshData function to internal
5 years ago
cinnaboot
dd64cae398
add a function to get the correct mesh buffer automatically
...
Previously we had to add the correct buffer to the
GLBufferToAttribMapping struct. This doesn't work if we want to deal
with entities at a high level. Now we can specify the buffer type as an
enum, and have a helper function get a reference to the corrent mesh
buffer when loading into GL.
5 years ago
cinnaboot
9fa7d4be4c
remove position argument from loadGLMesh/initGLMesh
...
We can always update the position afterwards if needed
5 years ago
cinnaboot
a1ff310a46
get textured rendering working again
5 years ago
cinnaboot
16e90d6790
(re-)implement texture loading
5 years ago
cinnaboot
b1e55782b0
add max_vertex_attribs property to GLContext
5 years ago
cinnaboot
8370a69ed4
update asset cache and loading interface
5 years ago
cinnaboot
8dac55ea1e
rename memory_arena struct to MemoryArena
5 years ago
cinnaboot
62539c777f
use RenderGroups and Entities to store groups of meshes
5 years ago
cinnaboot
a636a3182e
remove debug code from parseAttributes function
5 years ago
cinnaboot
40de8a1ed4
add TODOs for loadGLMesh error handling
5 years ago
cinnaboot
364e4de995
remove old code path for static shader attributes
5 years ago
cinnaboot
678fd92e91
remove TODO that we todid
5 years ago
cinnaboot
62e76e982b
get dynamic vertex attribute parsing working
5 years ago
cinnaboot
b98cc29e1b
add helper functions for GL type sizes
5 years ago
cinnaboot
95baf4cfe9
add helper function to get attrib->num_components from GLenum
5 years ago
cinnaboot
346fedcf9b
add FIXME to create helper for GLVertexAttrib num_components
5 years ago
cinnaboot
66600f1366
test a loadGLMesh() with GLBufferToAttribMapping struct
5 years ago
cinnaboot
5fac395618
add GLVertexAttrib struct to distinguish from gl_buffer
5 years ago