Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 290626 | Differences between
and this patch

Collapse All | Expand All

(-)VisionWorkbench-2.0_beta4.ori/src/vw/GPU/TexAlloc.cc (-6 / +6 lines)
Lines 14-24 Link Here
14
  //############################################################
14
  //############################################################
15
15
16
  bool TexAlloc::isInit = false;
16
  bool TexAlloc::isInit = false;
17
  list<TexObj*> TexAlloc::texRecycleList;
17
  std::list<TexObj*> TexAlloc::texRecycleList;
18
  int TexAlloc::allocatedCount = 0;
18
  int TexAlloc::allocatedCount = 0;
19
  int TexAlloc::allocatedSize = 0;
19
  int TexAlloc::allocatedSize = 0;
20
  bool TexAlloc::recylingEnabled = false;
20
  bool TexAlloc::recylingEnabled = false;
21
  std::map<pair<Tex_Format, Tex_Type>, pair<Tex_Format, Tex_Type> > TexAlloc::textureSubstitutesMap;
21
  std::map<std::pair<Tex_Format, Tex_Type>, std::pair<Tex_Format, Tex_Type> > TexAlloc::textureSubstitutesMap;
22
22
23
  //#############################################################
23
  //#############################################################
24
  //                  TexAlloc: Class Functions
24
  //                  TexAlloc: Class Functions
Lines 138-144 Link Here
138
	else if(type == GPU_FLOAT32) sprintf(buffer2, "GPU_FLOAT32");
138
	else if(type == GPU_FLOAT32) sprintf(buffer2, "GPU_FLOAT32");
139
	if(verbose)
139
	if(verbose)
140
	  printf("Checking Texture Support for:  format = %s, type = %s\n", buffer1, buffer2);
140
	  printf("Checking Texture Support for:  format = %s, type = %s\n", buffer1, buffer2);
141
	auto_ptr<TexObj> texRef(new TexObj(100, 100, format, type));
141
	std::auto_ptr<TexObj> texRef(new TexObj(100, 100, format, type));
142
	if(!texRef->width()) {
142
	if(!texRef->width()) {
143
	  failed = true;
143
	  failed = true;
144
	  if(verbose)
144
	  if(verbose)
Lines 172-178 Link Here
172
	      found = true;
172
	      found = true;
173
	      outFormat = textureFormats[j_format];
173
	      outFormat = textureFormats[j_format];
174
	      outType =  textureTypes[j_type];
174
	      outType =  textureTypes[j_type];
175
	      textureSubstitutesMap[pair<Tex_Format, Tex_Type>(inFormat, inType)] = pair<Tex_Format, Tex_Type>(outFormat, outType);
175
	      textureSubstitutesMap[std::pair<Tex_Format, Tex_Type>(inFormat, inType)] = std::pair<Tex_Format, Tex_Type>(outFormat, outType);
176
	      if(verbose) {
176
	      if(verbose) {
177
		printf("[%s, %s] implemented as: ", TexFormatToString(inFormat), TexTypeToString(inType));
177
		printf("[%s, %s] implemented as: ", TexFormatToString(inFormat), TexTypeToString(inType));
178
		printf("[%s, %s]\n", TexFormatToString(outFormat), TexTypeToString(outType));
178
		printf("[%s, %s]\n", TexFormatToString(outFormat), TexTypeToString(outType));
Lines 197-204 Link Here
197
  }
197
  }
198
198
199
  bool TexAlloc::get_texture_substitution(Tex_Format inFormat, Tex_Type inType, Tex_Format& outFormat, Tex_Type& outType) {
199
  bool TexAlloc::get_texture_substitution(Tex_Format inFormat, Tex_Type inType, Tex_Format& outFormat, Tex_Type& outType) {
200
    map<pair<Tex_Format, Tex_Type>, pair<Tex_Format, Tex_Type> >::iterator iter;
200
    std::map<std::pair<Tex_Format, Tex_Type>, std::pair<Tex_Format, Tex_Type> >::iterator iter;
201
    iter = textureSubstitutesMap.find(pair<Tex_Format, Tex_Type>(inFormat, inType));
201
    iter = textureSubstitutesMap.find(std::pair<Tex_Format, Tex_Type>(inFormat, inType));
202
    if(iter != textureSubstitutesMap.end()) {
202
    if(iter != textureSubstitutesMap.end()) {
203
      outFormat = (*iter).second.first;
203
      outFormat = (*iter).second.first;
204
      outType = (*iter).second.second;
204
      outType = (*iter).second.second;

Return to bug 290626