Shark.cpp
branchv_0
changeset 24 98d033d3ef7c
parent 20 0899e966993e
child 25 717653cedc4a
equal deleted inserted replaced
23:42341f66de52 24:98d033d3ef7c
    31 #include "ImageLoader.h"
    31 #include "ImageLoader.h"
    32 #include "Texture.h"
    32 #include "Texture.h"
    33 #include "Shader.h"
    33 #include "Shader.h"
    34 #include "Program.h"
    34 #include "Program.h"
    35 #include "FileMonitor.h"
    35 #include "FileMonitor.h"
       
    36 #include "XAttrs.h"
    36 
    37 
    37 #include "Shark.h"
    38 #include "Shark.h"
    38 
    39 
    39 class Shark::Impl {
    40 class Shark::Impl {
    40 public:
    41 public:
   551 	for (const Configuration::Texture& tex : cfg.textures) {
   552 	for (const Configuration::Texture& tex : cfg.textures) {
   552 		std::shared_ptr<ImageLoader::ImageBuffer>
   553 		std::shared_ptr<ImageLoader::ImageBuffer>
   553 				img(imageLoader.loadImage(MappedFile(tex.fileName)));
   554 				img(imageLoader.loadImage(MappedFile(tex.fileName)));
   554 		textures.push_back(std::make_shared<Texture>(
   555 		textures.push_back(std::make_shared<Texture>(
   555 				img->width, img->height, *img, tex.fileName));
   556 				img->width, img->height, *img, tex.fileName));
       
   557 		// static const uint32_t watchMask = IN_CLOSE_WRITE | IN_ATTRIB;
       
   558 		// watchedFiles.push_back(fileMonitor.watch(tex.fileName, watchMask));
   556 		watchedFiles.push_back(fileMonitor.watch(tex.fileName));
   559 		watchedFiles.push_back(fileMonitor.watch(tex.fileName));
   557 		// TODO: review texture loading and binding
   560 		// TODO: review texture loading and binding
   558 		// works even without this - default texture
   561 		// works even without this - default texture
   559 		// glUniform1i(ProgAttr.jazz, jazz);
   562 		// glUniform1i(ProgAttr.jazz, jazz);
   560 		// checkError(&std::cerr);
   563 		// checkError(&std::cerr);