X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fcore%2Fpipelinestate.h;h=a836c4070b368e4103b80c5ed656cf790d2f15ba;hb=cdefdb4b0f94613c2b41757fb33ae155efa9a205;hp=e7fdfdc83ff6e17be21b35e0c01b0e8b4c02fcb2;hpb=63458ee3bedacf4d498074fcec15600a4932ae7b;p=libs%2Fgl.git diff --git a/source/core/pipelinestate.h b/source/core/pipelinestate.h index e7fdfdc8..a836c407 100644 --- a/source/core/pipelinestate.h +++ b/source/core/pipelinestate.h @@ -36,7 +36,8 @@ private: { NO_RESOURCE, UNIFORM_BLOCK, - TEXTURE + SAMPLED_TEXTURE, + STORAGE_TEXTURE }; struct BoundResource @@ -72,7 +73,8 @@ private: DEPTH_TEST = 256, STENCIL_TEST = 512, BLEND = 1024, - PRIMITIVE_TYPE = 2048 + PRIMITIVE_TYPE = 2048, + PATCH_SIZE = 4096 }; const Framebuffer *framebuffer = 0; @@ -82,6 +84,7 @@ private: std::vector resources; const VertexSetup *vertex_setup = 0; PrimitiveType primitive_type = TRIANGLES; + unsigned patch_size = 0; FaceWinding front_face = COUNTERCLOCKWISE; CullMode face_cull = NO_CULL; DepthTest depth_test; @@ -98,8 +101,13 @@ public: void set_uniform_block(int, const UniformBlock *); void set_texture(unsigned, const Texture *, const Sampler *); void set_texture(unsigned, const Texture *, int, const Sampler *); + void set_storage_texture(unsigned, const Texture *); +private: + void set_texture_resource(unsigned, const Texture *, int, const Sampler *); +public: void set_vertex_setup(const VertexSetup *); void set_primitive_type(PrimitiveType); + void set_patch_size(unsigned); void set_front_face(FaceWinding); void set_face_cull(CullMode); void set_depth_test(const DepthTest &); @@ -112,6 +120,9 @@ public: const VertexSetup *get_vertex_setup() const { return vertex_setup; } FaceWinding get_front_face() const { return front_face; } CullMode get_face_cull() const { return face_cull; } + +private: + void check_bound_resources() const; }; } // namespace GL