Original Post
Screenshot:
I've spent a lot of time working on this demo since converting the DirectShow video playback code from directx to OpenGL wasn't too obvious, and now I believe I have something pretty neat to show to the GL community. The one aspect that I'm the most proud of about this demo is the GUI; coming from a Java background, I decided to create a SWING-like widget collection and import it into my applications through XML. If you're looking into using my widgets in your existing or future work, take a look at the files in GUIUtils, and WindowsManager (the windowProcessor function) in ManagersUtils. If you have any questions, you can get in touch with me at abezrati at hotmail dot com. The GUI layout xml descriptor. PS: Saturation and Hue sliders don't work simply because I have no clue how to implement these filters... Demo binaries. Demo source and build files. Demo util files.
I've spent a lot of time working on this demo since converting the DirectShow video playback code from directx to OpenGL wasn't too obvious, and now I believe I have something pretty neat to show to the GL community. The one aspect that I'm the most proud of about this demo is the GUI; coming from a Java background, I decided to create a SWING-like widget collection and import it into my applications through XML. If you're looking into using my widgets in your existing or future work, take a look at the files in GUIUtils, and WindowsManager (the windowProcessor function) in ManagersUtils. If you have any questions, you can get in touch with me at abezrati at hotmail dot com. The GUI layout xml descriptor.
<Panel texturePath = "GUIElements.png"
visible = "false"
font = "Arial">
<MaterialSurface callbackString = "1stVideo">
<Dimensions x = "0.5" y = "0.5"/>
<Position x = "0.25" y = "0.25"/>
</MaterialSurface>
<MaterialSurface callbackString = "2ndVideo">
<Dimensions x = "0.5" y = "0.5"/>
<Position x = "0.25" y = "0.75"/>
</MaterialSurface>
<MaterialSurface callbackString = "finalMix"
drawBounds = "true">
<BordersColor x = "000" y = "000" z = "255"/>
<Dimensions x = "0.5" y = "0.5"/>
<Position x = "0.75" y = "0.25"/>
</MaterialSurface>
<Panel name = "1s Quarter"
drawBounds = "true"
anchorPoint = "CORNERLU">
<BordersColor x = "000" y = "000" z = "255"/>
<Dimensions x = "0.5" y = "0.5"/>
<Position x = "0.0" y = "0.0"/>
<Panel name = "Shaders Collection1"
drawBounds = "true"
anchorPoint = "CORNERRU"
drawBackground = "true">
<Dimensions x = "75" y = "100"/>
<Position x = "-12" y = "10"/>
<RadioButton callbackString = "ConeFilter"
anchorPoint = "CORNERLU"
checked = "true">
<Text string = "3x3 Cone"/>
<Position x = "5" y = "2" />
</RadioButton>
<RadioButton callbackString = "EdgeFilter"
anchorPoint = "CORNERLU">
<Text string = "Edge"/>
<Position x = "5" y = "22" />
</RadioButton>
<RadioButton callbackString = "SepiaFilter"
anchorPoint = "CORNERLU">
<Text string = "Sepia"/>
<Position x = "5" y = "42" />
</RadioButton>
<RadioButton callbackString = "InvertFilter"
anchorPoint = "CORNERLU">
<Text string = "Invert"/>
<Position x = "5" y = "62" />
</RadioButton>
<RadioButton callbackString = "HSVFilter"
anchorPoint = "CORNERLU">
<Text string = "HSV"/>
<Position x = "5" y = "82" />
</RadioButton>
</Panel>
<Panel name = "FPS"
drawBounds = "true"
anchorPoint = "CORNERLU"
drawBackground = "true">
<Dimensions x = "130" y = "30"/>
<Position x = "10" y = "10"/>
<Label>
<Text string = "Current FPS: 0.0" />
</Label>
</Panel>
<Panel name = "1st Movie CP"
drawBounds = "true"
anchorPoint = "CORNERLD"
drawBackground = "true">
<Dimensions x = "170" y = "80"/>
<Position x = "10" y = "-10"/>
<Slider callbackString = "MovieProgress1"
alphaFadeTime = "0.75"
progress = "0.0">
<Position x = "0.65" y = "0.3" />
<Text string = "Progress" />
</Slider>
<CheckBox callbackString = "Loop"
checked = "true">
<Position x = "0.6" y = "0.75" />
<Text string = "Enable Looping" />
</CheckBox>
<Button callbackString = "PlayMovie">
<ButtonColor x = "0.8" y = "0.8" z="0.8"/>
<Position x = "0.15" y = "0.35" />
<Text string = "Play" />
</Button>
<Button callbackString = "StopMovie">
<Text string = "Stop"/>
<Position x = "0.15" y = "0.75" />
</Button>
</Panel>
<Button callbackString = "LoadMovie"
anchorPoint = "CORNERRD">
<Text string = "Load"/>
<Position x = "-10" y = "-10" />
</Button>
</Panel>
<Panel name = "2nd Quarter"
drawBounds = "true"
anchorPoint = "CORNERLU">
<BordersColor x = "000" y = "000" z = "255"/>
<Dimensions x = "0.5" y = "0.5"/>
<Position x = "0.0" y = "0.5"/>
<Panel name = "Shaders Collection2"
drawBounds = "true"
anchorPoint = "CORNERRU"
drawBackground = "true">
<Dimensions x = "75" y = "100"/>
<Position x = "-12" y = "10"/>
<RadioButton callbackString = "ConeFilter"
anchorPoint = "CORNERLU"
checked = "true">
<Text string = "3x3 Cone"/>
<Position x = "5" y = "2" />
</RadioButton>
<RadioButton callbackString = "EdgeFilter"
anchorPoint = "CORNERLU">
<Text string = "Edge"/>
<Position x = "5" y = "22" />
</RadioButton>
<RadioButton callbackString = "SepiaFilter"
anchorPoint = "CORNERLU">
<Text string = "Sepia"/>
<Position x = "5" y = "42" />
</RadioButton>
<RadioButton callbackString = "InvertFilter"
anchorPoint = "CORNERLU">
<Text string = "Invert"/>
<Position x = "5" y = "62" />
</RadioButton>
<RadioButton callbackString = "HSVFilter"
anchorPoint = "CORNERLU">
<Text string = "HSV"/>
<Position x = "5" y = "82" />
</RadioButton>
</Panel>
<Panel name = "2nd Movie CP"
drawBounds = "true"
anchorPoint = "CORNERLD"
drawBackground = "true">
<Dimensions x = "170" y = "80"/>
<Position x = "10" y = "-10"/>
<Slider callbackString = "MovieProgress2">
<Text string = "Progress"/>
<Position x = "0.65" y = "0.35"/>
</Slider>
<Button callbackString = "PlayMovie">
<Text string = "Play"/>
<Position x = "0.15" y = "0.35" />
</Button>
<Button callbackString = "StopMovie">
<Text string = "Stop"/>
<Position x = "0.15" y = "0.75" />
</Button>
<CheckBox callbackString = "Loop"
checked = "true">
<Text string = "Enable Looping"/>
<Position x = "0.6" y = "0.75" />
</CheckBox>
</Panel>
<Button callbackString = "LoadMovie"
anchorPoint = "CORNERRD">
<Text string = "Load"/>
<Position x = "-10" y = "-10" />
</Button>
</Panel>
<Panel name = "4th Quarter">
<Dimensions x = "0.5" y = "0.5"/>
<Position x = "0.75" y = "0.75"/>
<Slider callbackString = "Fade"
progress = "0.5">
<Text string = "Fade"/>
<Position x = "0.5" y = "0.15"/>
</Slider>
<Slider callbackString = "brightness"
progress = "0.2">
<Text string = "Brightness:1.00"/>
<Position x = "0.25" y = "0.6"/>
</Slider>
<Slider callbackString = "contrast"
progress = "0.6">
<Text string = "Contrast:1.00"/>
<Position x = "0.75" y = "0.6"/>
</Slider>
<Slider callbackString = "saturation"
progress = "0.5">
<Text string = "Saturation"/>
<Position x = "0.25" y = "0.8"/>
</Slider>
<Slider callbackString = "hue"
progress = "0.5">
<Text string = "Hue"/>
<Position x = "0.75" y = "0.8"/>
</Slider>
</Panel>
<TexCoordsDesc xStart = "0"
yStart = "0"
xEnd = "65"
yEnd = "66"
type = "1"/>
<TexCoordsDesc xStart = "66"
yStart = "1"
xEnd = "129"
yEnd = "66"
type = "2"/>
<TexCoordsDesc xStart = "131"
yStart = "0"
xEnd = "165"
yEnd = "34"
type = "4"/>
<TexCoordsDesc xStart = "0"
yStart = "67"
xEnd = "64"
yEnd = "131"
type = "5"/>
<TexCoordsDesc xStart = "65"
yStart = "67"
xEnd = "129"
yEnd = "131"
type = "6"/>
</Panel>