glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
// glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
-// glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
- glTexImage2D(GL_TEXTURE_2D, 0, Image::PixCompSize_[img.pixcomp_], api_->tex_width, api_->tex_height, 0, APIImageProperties::PixCompGL_[img.pixcomp_], APIImageProperties::PixPrecGL_[img.pixprec_], tmp->getBitmapPtr());
+// glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);\r
+ GLenum vramFormat = Image::PixCompSize_[img.pixcomp_];\r
+ /*\r
+ if(img.pixprec_==Image::FLOAT) {\r
+ switch(img.pixcomp_) {\r
+ case Image::GRAY:\r
+ vramFormat = GL_R16UI;\r
+ break;\r
+ case Image::RGB:\r
+ vramFormat = GL_RGB16UI;\r
+ break;\r
+ case Image::RGBA:\r
+ vramFormat = GL_RGBA16UI;\r
+ break;\r
+ }\r
+ }\r
+ */
+ glTexImage2D(GL_TEXTURE_2D, 0, vramFormat, api_->tex_width, api_->tex_height, 0, APIImageProperties::PixCompGL_[img.pixcomp_], APIImageProperties::PixPrecGL_[img.pixprec_], tmp->getBitmapPtr());
glDisable(GL_TEXTURE_2D);
// APIImageProperties::regist((int)Display::getWidth(), (int)Display::getHeight(), width_, height_, VRAMleft_, VRAMtop_);