0
0
mirror of https://github.com/obsproject/obs-studio.git synced 2024-09-20 04:42:18 +02:00
Commit Graph

188 Commits

Author SHA1 Message Date
jp9000
a27f2fbb3a Fix potentially uninitialized variable warnings 2014-07-12 11:59:46 -07:00
jp9000
f675c8029f Fix 'unused parameter' warnings on windows 2014-07-12 11:59:07 -07:00
Zachary Lund
543acf8477 Modified debug proc to possibly be more appropriate 2014-07-11 01:36:42 -05:00
BtbN
a79ff06420 Fix gl_debug_proc function for unexpected parameters 2014-07-10 14:36:16 +02:00
jp9000
7b12133af3 Use uint8_t* instead of void* for texture data
NOTE: In texture_setimage, I had to move variables to the top of the
scope because microsoft's C compiler will give the legacy C90 error of:
'illegal use of this type as an expression'.

To sum it up, microsoft's C compiler is still utter garbage.
2014-06-28 10:12:57 -07:00
jp9000
f025cd6f87 GL: Mark unused 'device' parameter for flush 2014-06-25 22:24:26 -07:00
jp9000
caf8ca9ba8 Remove 'shader' param from shader param functions 2014-06-25 19:50:08 -07:00
jp9000
27010a2f56 Add a 'flush' command to graphics subsystem
...I'm actually concerned that I went a bit overkill trying to prevent
backwards compatibility issues with this abstraction design, because
this is a large number of files that have to be modified just to add a
single graphics subsystem export.  Someone's going to strangle me, and
when you know that someone might strangle you, that means that you did
something wrong.  We'll have to look in to simplifying this in the
future without killing backward compatibility safety.
2014-06-25 19:32:34 -07:00
jp9000
8aa49cc9ad Remove unused graphics subsystem functions
These functions were mostly related to being able to set true fullscreen
mode -- however, this has no place for our purposes, and these functions
were just sitting empty and unused, so they should be removed.

Besides, fullscreen mode only applies to the windows operating system.
2014-06-25 01:54:32 -07:00
jp9000
f4e7a893c5 Remove 'rebuild' variable from vertexbuffer_flush
This variable is currently somewhat pointless, I was originally going to
use it to tell the graphics subsystem to completely rebuild the internal
vertex buffers, but it would be bad/inefficient to allow that
functionality.
2014-06-25 01:54:32 -07:00
jp9000
1c2a0524b7 Change graphics subsystem to 4x4 matrices
4x4 matrices aren't as optimal, but are much more sensible to handle
when you want to do more advanced stuff like scaling, skewing, or
inversion.
2014-06-14 23:17:04 -07:00
jp9000
cec11d624a OpenGL: Don't call glGetAttribLocation on outputs
Previously we were using glGetAttribLocation on all inputs/outputs and
then just discarding if it was returned -1.  However, we have a boolean
value of 'input' in gl_parser_attrib, so there's no need to be doing
this and discarding potentially useful error handling information.
2014-06-07 19:33:41 -07:00
jp9000
3ce70778f9 OpenGL: Don't name VS inputs as 'geom' inputs.
Geometry shaders come after vertex shaders, not before.
2014-06-07 19:31:57 -07:00
jp9000
efaafd7cb4 OpenGL: Fix erroneous handling of BGRX
BGRX was being treated as "BGR input" with "RGBA storage", where it
should have been "BGRA input" with "RGB storage".  So the input for the
texture was expecting 24 bits of packed BGR rather than 32bit BGRX
pixels, and was internally storing it with alpha available.
2014-06-07 15:30:05 -07:00
jp9000
b64900e630 Graphics: Comment out parsed shader logging 2014-05-18 17:37:30 -07:00
fryshorts
944c2dc9f7 Destroy swapchain before removing the window info
This fixes an issue reported by valgrind where cleaning up the
swapchain fails because the window info is destroyed before.
2014-05-16 20:32:30 +02:00
Thomas McGrew
59328d86ce Added a version to the X11 GL context request
This enables the application to start on Intel graphics under Mesa 10.2
2014-05-12 02:31:15 -04:00
Palana
cfc3f2590e Update OSX dependencies for cmake generators other than ninja/make 2014-05-08 14:31:43 +02:00
Palana
824ff961d0 Enable GL vertex attribute normalization
Fixes GL vertex color attributes
2014-05-02 00:37:32 +02:00
jp9000
5e2d283b9c GL/D3D11: Add scissor support 2014-05-01 11:26:17 -07:00
jp9000
d9d0d87431 libobs-opengl: Fix some code formatting issues 2014-04-24 21:10:07 -07:00
Lioncash
96031f2392 Fix a possible null pointer dereference 2014-04-21 21:28:40 -04:00
Palana
12f0877ebc Remove destroyed sampler states from the current samplers list 2014-04-19 05:25:21 +02:00
Palana
b0237fd581 Use high resolution GL surface when available 2014-04-16 22:39:20 +02:00
Jim
2fc810fd09 Merge pull request #65 from BtbN/glad
Move from glLoadGen to GLAD
2014-04-16 12:51:32 -07:00
BtbN
e50201cad1 Move from glLoadGen to GLAD 2014-04-15 22:19:40 +02:00
jp9000
0bec267e40 OpenGL: Fix swizzle code again for alpha textures
My prior code was incorrect;  I mixed up the two parameters, the
GL_TEXTURE_SWIZZLE_* parameter specifies the target channel, and the
value itself specifies the source channel.,  If that makes sense.
2014-04-15 12:19:20 -07:00
jp9000
51d338430f Only do the alpha swizzle on alpha textures
Avoids problems if swizzles are used elsewhere (like in the newer X11
plugins)
2014-04-15 04:23:55 -07:00
jp9000
bc33b09ba9 Revert OpenGL swizzle change
Was wrong to use the swizzle -- it was an incorrect assumption on my
part that this could work in the first place (despite working on
windows)
2014-04-12 23:57:40 -07:00
jp9000
0e9b13fcf9 Fix style errors (please don't make me do this) 2014-04-12 11:21:47 -07:00
BtbN
0f9c6e5503 Create sub window for rendering, to avoid visual mismatch issues 2014-04-12 16:24:38 +02:00
BtbN
97c94b183a Add copy_texture_region function 2014-04-12 12:45:18 +02:00
Timo R
b9f0da026e Move opengl loader into a seperate static library, so plugins can use it 2014-04-12 12:45:18 +02:00
jp9000
362e008b87 OpenGL: Use texture swizzle for BGRA/BGR/A8
On some operating systems, with specific drivers it seems that BGR/BGRA
isn't properly treated as such in certain cases.  This fix will
hopefully force the formats to be treated as BGR/BGRA when actually
rendering, which should get around the implementation-specific issue.
2014-04-11 13:14:20 -07:00
Zachary Lund
92f253d65f More extensions, less bugs 2014-04-06 16:21:19 -05:00
Zachary Lund
1dd3917745 Added GLX_NV_copy_image extension, updated tools 2014-04-05 13:49:19 -05:00
Zachary Lund
baa57d4c39 Merge branch 'master' of https://github.com/jp9000/obs-studio 2014-04-03 20:12:26 -05:00
Zachary Lund
e5b90accb9 Removed no longer valid comment 2014-04-03 19:24:03 -05:00
Zachary Lund
b4d2146861 This commit contains more than I intended. Read below for more info.
1) Fixed the preview window. It now correctly displays the source.
2) The GLX backend now correctly uses the devices current swap.
3) We now set device->cur_swap to a default so we don't have to check it in every function.
4) Minor syntactical cleanups and perhaps some messiness added.
2014-04-03 19:21:24 -05:00
Palana
c2abb80c9a Use bzalloc instead of bmalloc+memset 2014-04-04 02:00:10 +02:00
Palana
61cf2faad3 Delete per window GL context for Cocoa and just swap the view instead
This unfortunately re-introduces undesirable rendering behaviour for
slow renderers (e.g. first gen Intel HD graphics/Apple software
renderer) when the property window is open, but fixes property window
preview rendering for sufficiently fast renderers
2014-04-04 02:00:08 +02:00
Zachary Lund
ee9ff9cfb9 Use Qt provided display with GLX functions for consistency.
Remove unneeded assignment from previous code.
2014-04-03 17:36:01 -05:00
BtbN
a31e938c2b Fix getting the X11 display with the Qt ui 2014-04-03 23:41:22 +02:00
BtbN
acab80cbef Fixup libobs-opengl CMakeLists 2014-04-01 21:30:52 +02:00
jp9000
263f940806 Fix CMakeLists.txt for each project (my fault) 2014-03-29 17:29:02 -07:00
jp9000
b2885480fa Minor fix to GL texture cleanup
Don't clear any data if it's a dummy texture.
2014-03-29 17:23:31 -07:00
jp9000
0a86e8fb3f Add dummy GL texture flag & direct object access
- Add dummy GL texture support to allow libobs texture references to be
   created for GL without

 - Add a texture_getobj function to allow the retrieval of the
   context-specific object, such as the D3D texture pointer, or the
   OpenGL texture object handle.

 - Also cleaned up the export stuff.  I realized it was all totally
   superfluous.  Kind of a dumb moment, but nice to clean it up
   regardless.
2014-03-29 17:19:31 -07:00
Palana
f8b90a5c8f Add per window GL context for Cocoa libobs-opengl implementation
This fixes some problems with multiple swap chains (e.g. flickering
between the render views)
2014-03-24 17:42:45 +01:00
jp9000
2b4e381c3b Change a reference variable to be volatile long
Removed some warnings associated with it, was the wrong variable type.
2014-03-16 20:08:12 -07:00
jp9000
154e0c59e1 Use atomic functions where appropriate
Also, rename atomic functions to be consistent with the rest of the
platform/threading functions, and move atomic functions to threading*
files rather than platform* files
2014-03-16 18:26:46 -07:00