fix ..\src\slic3r\GUI\Jobs\CreateFontNameImageJob.cpp(100): warning C4101: 'tex_id': unreferenced local variable
This commit is contained in:
parent
37961c36e8
commit
8e40501e0e
@ -97,16 +97,15 @@ void CreateFontImageJob::finalize(bool canceled, std::exception_ptr &)
|
||||
if (canceled) return;
|
||||
|
||||
// upload texture on GPU
|
||||
GLuint tex_id;
|
||||
GLenum target = GL_TEXTURE_2D, format = GL_ALPHA, type = GL_UNSIGNED_BYTE;
|
||||
GLint level = 0, border = 0;
|
||||
const GLenum target = GL_TEXTURE_2D;
|
||||
glsafe(::glBindTexture(target, m_input.texture_id));
|
||||
|
||||
GLint
|
||||
w = m_tex_size.x(), h = m_tex_size.y(),
|
||||
xoffset = m_input.size.x() - m_tex_size.x(), // arrange right
|
||||
yoffset = m_input.size.y() * m_input.index;
|
||||
glsafe(::glTexSubImage2D(target, level, xoffset, yoffset, w, h, format, type, m_result.data()));
|
||||
glsafe(::glTexSubImage2D(target, m_input.level, xoffset, yoffset, w, h,
|
||||
m_input.format, m_input.type, m_result.data()));
|
||||
|
||||
// bind default texture
|
||||
GLuint no_texture_id = 0;
|
||||
|
@ -21,6 +21,7 @@ struct FontImageData
|
||||
wxString font_name;
|
||||
wxFontEncoding encoding;
|
||||
// texture for copy result to
|
||||
// texture MUST BE initialized
|
||||
GLuint texture_id;
|
||||
// Index of face name, define place in texture
|
||||
size_t index;
|
||||
@ -31,6 +32,10 @@ struct FontImageData
|
||||
// bigger value create darker image
|
||||
// divide value 255
|
||||
unsigned char gray_level = 5;
|
||||
|
||||
// texture meta data
|
||||
GLenum format = GL_ALPHA, type = GL_UNSIGNED_BYTE;
|
||||
GLint level = 0, border = 0;
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
|
Loading…
Reference in New Issue
Block a user