Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
b9c25fcc
Kaydet (Commit)
b9c25fcc
authored
Ara 05, 2014
tarafından
Louis-Francis Ratté-Boulianne
Kaydeden (comit)
Markus Mohrhard
Ara 11, 2014
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
vcl: Don't keep a reference to the texture in the FBO object
Change-Id: I240d2b44e77d28af3cd5952b6d666a1709c4c54a
üst
01bed808
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
9 deletions
+17
-9
framebuffer.hxx
vcl/inc/opengl/framebuffer.hxx
+2
-2
framebuffer.cxx
vcl/opengl/framebuffer.cxx
+15
-7
No files found.
vcl/inc/opengl/framebuffer.hxx
Dosyayı görüntüle @
b9c25fcc
...
@@ -18,10 +18,10 @@
...
@@ -18,10 +18,10 @@
class
VCL_PLUGIN_PUBLIC
OpenGLFramebuffer
class
VCL_PLUGIN_PUBLIC
OpenGLFramebuffer
{
{
private
:
private
:
GLuint
mnId
;
GLuint
mnId
;
OpenGLTexture
maAttachedTexture
;
int
mnWidth
;
int
mnWidth
;
int
mnHeight
;
int
mnHeight
;
GLuint
mnAttachedTexture
;
public
:
public
:
OpenGLFramebuffer
();
OpenGLFramebuffer
();
...
...
vcl/opengl/framebuffer.cxx
Dosyayı görüntüle @
b9c25fcc
...
@@ -17,6 +17,7 @@ OpenGLFramebuffer::OpenGLFramebuffer() :
...
@@ -17,6 +17,7 @@ OpenGLFramebuffer::OpenGLFramebuffer() :
mnId
(
0
),
mnId
(
0
),
mnWidth
(
0
),
mnWidth
(
0
),
mnHeight
(
0
),
mnHeight
(
0
),
mnAttachedTexture
(
0
),
mpPrevFramebuffer
(
NULL
),
mpPrevFramebuffer
(
NULL
),
mpNextFramebuffer
(
NULL
)
mpNextFramebuffer
(
NULL
)
{
{
...
@@ -45,30 +46,37 @@ void OpenGLFramebuffer::Unbind()
...
@@ -45,30 +46,37 @@ void OpenGLFramebuffer::Unbind()
bool
OpenGLFramebuffer
::
IsFree
()
const
bool
OpenGLFramebuffer
::
IsFree
()
const
{
{
return
(
!
m
a
AttachedTexture
);
return
(
!
m
n
AttachedTexture
);
}
}
bool
OpenGLFramebuffer
::
IsAttached
(
const
OpenGLTexture
&
rTexture
)
const
bool
OpenGLFramebuffer
::
IsAttached
(
const
OpenGLTexture
&
rTexture
)
const
{
{
return
(
m
aAttachedTexture
==
rTexture
);
return
(
m
nAttachedTexture
==
rTexture
.
Id
()
);
}
}
void
OpenGLFramebuffer
::
AttachTexture
(
const
OpenGLTexture
&
rTexture
)
void
OpenGLFramebuffer
::
AttachTexture
(
const
OpenGLTexture
&
rTexture
)
{
{
if
(
rTexture
.
Id
()
==
mnAttachedTexture
)
return
;
SAL_INFO
(
"vcl.opengl"
,
"Attaching texture "
<<
rTexture
.
Id
()
<<
" to framebuffer "
<<
(
int
)
mnId
);
SAL_INFO
(
"vcl.opengl"
,
"Attaching texture "
<<
rTexture
.
Id
()
<<
" to framebuffer "
<<
(
int
)
mnId
);
m
aAttachedTexture
=
rTexture
;
m
nAttachedTexture
=
rTexture
.
Id
()
;
mnWidth
=
rTexture
.
GetWidth
();
mnWidth
=
rTexture
.
GetWidth
();
mnHeight
=
rTexture
.
GetHeight
();
mnHeight
=
rTexture
.
GetHeight
();
glFramebufferTexture2D
(
GL_FRAMEBUFFER
,
GL_COLOR_ATTACHMENT0
,
GL_TEXTURE_2D
,
glFramebufferTexture2D
(
GL_FRAMEBUFFER
,
GL_COLOR_ATTACHMENT0
,
GL_TEXTURE_2D
,
m
aAttachedTexture
.
Id
()
,
0
);
m
nAttachedTexture
,
0
);
CHECK_GL_ERROR
();
CHECK_GL_ERROR
();
}
}
void
OpenGLFramebuffer
::
DetachTexture
()
void
OpenGLFramebuffer
::
DetachTexture
()
{
{
maAttachedTexture
=
OpenGLTexture
();
if
(
mnAttachedTexture
!=
0
)
glFramebufferTexture2D
(
GL_FRAMEBUFFER
,
GL_COLOR_ATTACHMENT0
,
GL_TEXTURE_2D
,
0
,
0
);
{
CHECK_GL_ERROR
();
CHECK_GL_ERROR
();
mnAttachedTexture
=
0
;
glFramebufferTexture2D
(
GL_FRAMEBUFFER
,
GL_COLOR_ATTACHMENT0
,
GL_TEXTURE_2D
,
0
,
0
);
CHECK_GL_ERROR
();
}
}
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment