Coder Social home page Coder Social logo

Comments (3)

hemebond avatar hemebond commented on August 11, 2024

I think this is the same as issue #58 that I reported previously

from darkplaces.

Baker7 avatar Baker7 commented on August 11, 2024

Ah, I didn't see that issue -- my bad.

from darkplaces.

Baker7 avatar Baker7 commented on August 11, 2024

Solution:

loadmodel->brush.solidskyskinframe = R_SkinFrame_LoadInternalBGRA("sky_solidtexture", 0         , (unsigned char *) solidpixels, w, h, 0, 0, 0, vid.sRGB3D, true);
loadmodel->brush.alphaskyskinframe = R_SkinFrame_LoadInternalBGRA("sky_alphatexture", TEXF_ALPHA, (unsigned char *) alphapixels, w, h, 0, 0, 0, vid.sRGB3D, true);

Extra field for R_SkinFrame_LoadInternal qbool is_q1skyload, only above is it set to true.

skinframe_t *R_SkinFrame_LoadInternalBGRA(const char *name, int textureflags, 
const unsigned char *skindata, int width, int height, int comparewidth, 
int compareheight, int comparecrc, qbool sRGB, qbool is_q1skyload)
{
	int i;
	skinframe_t *skinframe;
	char vabuf[1024];

	if (cls.state == ca_dedicated)
		return NULL;

	// if already loaded just return it, otherwise make a new skinframe
	skinframe = R_SkinFrame_Find(name, textureflags, comparewidth, compareheight, comparecrc, true);

	if (skinframe->base) {
		if (is_q1skyload) {
			R_SkinFrame_PurgeSkinFrame(skinframe);
		} else {
			return skinframe;
		}
	}

It's not quite "right" as this solution always forces fresh load of q1sky even if the new texture was the same as the old, but it does solve the issue.

from darkplaces.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.