Changeset View
Changeset View
Standalone View
Standalone View
source/lib/res/graphics/ogl_tex.cpp
/* Copyright (C) 2019 Wildfire Games. | /* Copyright (C) 2021 Wildfire Games. | ||||
* | * | ||||
* Permission is hereby granted, free of charge, to any person obtaining | * Permission is hereby granted, free of charge, to any person obtaining | ||||
* a copy of this software and associated documentation files (the | * a copy of this software and associated documentation files (the | ||||
Context not available. | |||||
#include "precompiled.h" | #include "precompiled.h" | ||||
#include "ogl_tex.h" | #include "ogl_tex.h" | ||||
#include <cstdio> | |||||
#include "lib/app_hooks.h" | #include "lib/app_hooks.h" | ||||
#include "lib/ogl.h" | #include "lib/ogl.h" | ||||
#include "lib/bits.h" | #include "lib/bits.h" | ||||
Context not available. | |||||
#include "lib/res/h_mgr.h" | #include "lib/res/h_mgr.h" | ||||
#include "lib/fnv_hash.h" | #include "lib/fnv_hash.h" | ||||
#include <cstdio> | |||||
vladislavbelov: Is it needed? | |||||
#include <string> | |||||
//---------------------------------------------------------------------------- | //---------------------------------------------------------------------------- | ||||
// OpenGL helper routines | // OpenGL helper routines | ||||
Context not available. | |||||
if(ot->flags & OT_NEED_AUTO_UPLOAD) | if(ot->flags & OT_NEED_AUTO_UPLOAD) | ||||
(void)ogl_tex_upload(h); | (void)ogl_tex_upload(h); | ||||
#ifndef NDEBUG | |||||
std::string name = pathname.string8(); | |||||
Not Done Inline Actionsconst. vladislavbelov: `const`. | |||||
glBindTexture(GL_TEXTURE_2D, ot->id); | |||||
pglObjectLabelKHR(GL_TEXTURE, ot->id, name.size(), name.c_str()); | |||||
#endif | |||||
return INFO::OK; | return INFO::OK; | ||||
} | } | ||||
Context not available. |
Wildfire Games · Phabricator
Is it needed?