Subversion Repository Public Repository

Divide-Framework

This repository has no backups
This repository's network speed is throttled to 100KB/sec

Diff Revisions 167 vs 168 for /trunk/Source Code/Hardware/Video/OpenGL/Buffers/FrameBufferObject/glMSTextureBufferObject.cpp

Diff revisions: vs.
  @@ -14,18 +14,17 @@
14 14 }
15 15
16 16 bool glMSTextureBufferObject::Create(GLushort width, GLushort height, GLubyte imageLayers){
17 - if(!_attachementDirty[TextureDescriptor::Color0]){
17 + if(!_attachementDirty[TextureDescriptor::Color0])
18 18 return true;
19 - }
20 19
21 20 D_PRINT_FN(Locale::get("GL_FBO_GEN_COLOR_MS"),width,height);
22 21 Destroy();
23 22 TextureDescriptor texDescriptor = _attachement[TextureDescriptor::Color0];
23 + const SamplerDescriptor& sampler = texDescriptor.getSampler();
24 24 ///And get the image formats and data type
25 25 if(_textureType != glTextureTypeTable[texDescriptor._type]){
26 26 ERROR_FN(Locale::get("ERROR_FBO_ATTACHEMENT_DIFFERENT"), (I32)TextureDescriptor::Color0);
27 27 }
28 - if(!_attachementDirty[TextureDescriptor::Color0]) return true;
29 28
30 29 if(_msaaBufferResolver <= 0){
31 30 // create a new fbo with multisampled color and depth attachements
  @@ -45,15 +44,15 @@
45 44 GLCheck(glBindTexture(_textureType, _textureId[0]));
46 45
47 46 ///General texture parameters for either color or depth
48 - if(texDescriptor._generateMipMaps){
47 + if(sampler.generateMipMaps()){
49 48 ///(depth doesn't need mipmaps, but no need for another "if" to complicate things)
50 49 GLCheck(glTexParameteri(_textureType, GL_TEXTURE_BASE_LEVEL, texDescriptor._mipMinLevel));
51 50 GLCheck(glTexParameteri(_textureType, GL_TEXTURE_MAX_LEVEL, texDescriptor._mipMaxLevel));
52 51 }
53 - GLCheck(glTexParameterf(_textureType, GL_TEXTURE_MAG_FILTER, glTextureFilterTable[texDescriptor._magFilter]));
54 - GLCheck(glTexParameterf(_textureType, GL_TEXTURE_MIN_FILTER, glTextureFilterTable[texDescriptor._minFilter]));
55 - GLCheck(glTexParameterf(_textureType, GL_TEXTURE_WRAP_S, glWrapTable[texDescriptor._wrapU]));
56 - GLCheck(glTexParameterf(_textureType, GL_TEXTURE_WRAP_T, glWrapTable[texDescriptor._wrapV]));
52 + GLCheck(glTexParameterf(_textureType, GL_TEXTURE_MAG_FILTER, glTextureFilterTable[sampler.magFilter()]));
53 + GLCheck(glTexParameterf(_textureType, GL_TEXTURE_MIN_FILTER, glTextureFilterTable[sampler.minFilter()]));
54 + GLCheck(glTexParameterf(_textureType, GL_TEXTURE_WRAP_S, glWrapTable[sampler.wrapU()]));
55 + GLCheck(glTexParameterf(_textureType, GL_TEXTURE_WRAP_T, glWrapTable[sampler.wrapV()]));
57 56
58 57 GLCheck(glTexImage2D(_textureType,
59 58 0,