X-Git-Url: http://git.osdn.jp/view?a=blobdiff_plain;f=psychlops%2Fplatform%2Fwin32gl%2Fpsychlops_g_canvas_win32gl.cpp;fp=psychlops%2Fplatform%2Fwin32gl%2Fpsychlops_g_canvas_win32gl.cpp;h=616531d004c843fb5fc0b1b26e92d700fe5b0d04;hb=027a6c9c0b8bc066ae5494a0ca1689ab2a767a61;hp=35fa158e192ef94a65103cf707c0356713c0af44;hpb=06c3c01470b14e12023c2583f9df049069a3b432;p=psychlops%2Fcpp.git diff --git a/psychlops/platform/win32gl/psychlops_g_canvas_win32gl.cpp b/psychlops/platform/win32gl/psychlops_g_canvas_win32gl.cpp index 35fa158..616531d 100644 --- a/psychlops/platform/win32gl/psychlops_g_canvas_win32gl.cpp +++ b/psychlops/platform/win32gl/psychlops_g_canvas_win32gl.cpp @@ -69,8 +69,24 @@ namespace Psychlops { 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); + GLenum vramFormat = Image::PixCompSize_[img.pixcomp_]; + /* + if(img.pixprec_==Image::FLOAT) { + switch(img.pixcomp_) { + case Image::GRAY: + vramFormat = GL_R16UI; + break; + case Image::RGB: + vramFormat = GL_RGB16UI; + break; + case Image::RGBA: + vramFormat = GL_RGBA16UI; + break; + } + } + */ + 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_);