Skip to content
Snippets Groups Projects
Select Git revision
  • 633d238cccd938e332f005e99c7411178f48e6c1
  • master default
2 results

alloc.c

Blame
  • Forked from 신선 / 1801_OS_assignment4
    Source project has a limited visibility.
    ResourceLoader.h 781 B
    #pragma once
    
    #include <string>
    #include <iostream>
    #include <fstream>
    #include <vector>
    
    #include <GL/glew.h>
    
    #include <glm/glm.hpp>
    #include <glm/gtc/matrix_transform.hpp>
    #include <glm/gtc/type_ptr.hpp>
    
    #include "Logger.h"
    
    class Image
    {
    private:
    	int width;
    	int height;
    	int channel;
    
    	unsigned char *data;
    
    public:
    	Image(int _width, int _height, int _cahnnel, unsigned char *_data);
    
    	int getWidth();
    	int getHeight();
    	unsigned char *getData();
    };
    
    std::string get_extension(const std::string &filePath);
    bool openObj(const std::string fileName, std::vector<glm::vec3> &vertices, std::vector<glm::vec2> &vertexTexCoord, std::vector<glm::vec3> &vertexNormals);
    Image *load_Image(std::string fileName, int *width, int *height, int *nrChannels);
    void free_image(Image *img);