Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
978372f4
Commit
978372f4
authored
Jan 03, 2008
by
Pierre d'Herbemont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
video_output/opengllayer.m: Revert previous commit, and attempt to get the resolution fix working.
parent
480898d1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
29 deletions
+33
-29
modules/video_output/opengllayer.m
modules/video_output/opengllayer.m
+33
-29
No files found.
modules/video_output/opengllayer.m
View file @
978372f4
...
...
@@ -313,7 +313,6 @@ static void DisplayVideo( vout_thread_t *p_vout, picture_t *p_pic )
}
p_sys
->
b_frame_available
=
1
;
[
p_sys
->
o_layer
setNeedsDisplay
];
}
/*****************************************************************************
...
...
@@ -409,7 +408,7 @@ static int InitTextures( vout_thread_t *p_vout )
VLCVoutLayer
*
me
=
[
super
layer
];
if
(
me
)
{
me
.
asynchronous
=
NO
;
me
.
asynchronous
=
YES
;
[
me
setVout
:
_p_vout
];
me
.
bounds
=
CGRectMake
(
0
.
0
,
0
.
0
,
(
float
)
_p_vout
->
fmt_in
.
i_visible_width
*
_p_vout
->
fmt_in
.
i_sar_num
,
...
...
@@ -450,7 +449,6 @@ static int InitTextures( vout_thread_t *p_vout )
p_vout
->
fmt_out
.
i_height
,
VLCGL_FORMAT
,
VLCGL_TYPE
,
p_vout
->
p_sys
->
pp_buffer
[
p_vout
->
p_sys
->
i_index
]
);
}
glClear
(
GL_COLOR_BUFFER_BIT
);
...
...
@@ -465,7 +463,10 @@ static int InitTextures( vout_thread_t *p_vout )
glDisable
(
VLCGL_TARGET
);
glFlush
();
}
CGLUnlockContext
(
glContext
);
p_vout
->
p_sys
->
b_frame_available
=
VLC_FALSE
;
}
-
(
CGLPixelFormatObj
)
copyCGLPixelFormatForDisplayMask
:(
uint32_t
)
mask
...
...
@@ -486,15 +487,28 @@ static int InitTextures( vout_thread_t *p_vout )
NSOpenGLPixelFormat
*
fmt
=
[[
NSOpenGLPixelFormat
alloc
]
initWithAttributes
:
(
NSOpenGLPixelFormatAttribute
*
)
attribs
];
return
[
fmt
CGLPixelFormatObj
];
return
[
super
copyCGLPixelFormatForDisplayMask
:
mask
];
//[fmt CGLPixelFormatObj];
}
-
(
CGLContextObj
)
copyCGLContextForPixelFormat
:(
CGLPixelFormatObj
)
pixelFormat
{
CGLContextObj
context
=
[
super
copyCGLContextForPixelFormat
:
pixelFormat
];
CGLLockContext
(
context
);
/* Swap buffers only during the vertical retrace of the monitor.
http://developer.apple.com/documentation/GraphicsImaging/
Conceptual/OpenGL/chap5/chapter_5_section_44.html */
GLint
params
=
1
;
CGLSetParameter
(
CGLGetCurrentContext
(),
kCGLCPSwapInterval
,
&
params
);
/* Make sure our texture will gets drawn at the right resolution */
GLint
dim
[
2
]
=
{
p_vout
->
p_sys
->
i_tex_width
,
p_vout
->
p_sys
->
i_tex_height
};
NSLog
(
@"asking for %dx%d"
,
p_vout
->
p_sys
->
i_tex_width
,
p_vout
->
p_sys
->
i_tex_height
);
CGLSetParameter
(
context
,
kCGLCPSurfaceBackingSize
,
dim
);
CGLEnable
(
context
,
kCGLCESurfaceBackingSize
);
CGLSetCurrentContext
(
context
);
InitTextures
(
p_vout
);
...
...
@@ -505,16 +519,6 @@ static int InitTextures( vout_thread_t *p_vout )
glClearColor
(
0
.
0
f
,
0
.
0
f
,
0
.
0
f
,
1
.
0
f
);
glClear
(
GL_COLOR_BUFFER_BIT
);
/* Swap buffers only during the vertical retrace of the monitor.
http://developer.apple.com/documentation/GraphicsImaging/
Conceptual/OpenGL/chap5/chapter_5_section_44.html */
GLint
params
=
1
;
CGLSetParameter
(
CGLGetCurrentContext
(),
kCGLCPSwapInterval
,
&
params
);
CGLUnlockContext
(
context
);
return
context
;
}
...
...
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