mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-09-24 23:31:36 +08:00
fix up the rest of the GL code, add glew to project, add makefiles for opengl, fix makefiles so that it can be built with gcc, update project files to automatically output to the build directory
This commit is contained in:
@@ -15,13 +15,15 @@ struct random_tex *random_create(const char *settings, obs_source_t source)
|
||||
pixel |= (rand()%256);
|
||||
pixel |= (rand()%256) << 8;
|
||||
pixel |= (rand()%256) << 16;
|
||||
//pixel |= 0xFFFFFFFF;
|
||||
pixels[y*20 + x] = pixel;
|
||||
}
|
||||
}
|
||||
|
||||
gs_entercontext(obs_graphics());
|
||||
|
||||
rt->texture = gs_create_texture(20, 20, GS_RGBA, 1, &pixels, 0);
|
||||
rt->texture = gs_create_texture(20, 20, GS_RGBA, 1,
|
||||
(const void**)&pixels, 0);
|
||||
bfree(pixels);
|
||||
|
||||
if (!rt->texture) {
|
||||
@@ -61,7 +63,8 @@ uint32_t random_get_output_flags(struct random_tex *rt)
|
||||
void random_video_render(struct random_tex *rt, obs_source_t filter_target)
|
||||
{
|
||||
technique_t tech = effect_gettechnique(rt->whatever, "Default");
|
||||
effect_settexture(rt->whatever, effect_getparambyidx(rt->whatever, 1), rt->texture);
|
||||
effect_settexture(rt->whatever, effect_getparambyidx(rt->whatever, 1),
|
||||
rt->texture);
|
||||
technique_begin(tech);
|
||||
technique_beginpass(tech, 0);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user