00001 /************************************************************************************ 00002 00003 Filename : Render_GL_Win32 Device.h 00004 Content : Win32 OpenGL Device implementation header 00005 Created : September 10, 2012 00006 Authors : Andrew Reisse, Michael Antonov 00007 00008 Copyright : Copyright 2012 Oculus VR, Inc. All Rights reserved. 00009 00010 Licensed under the Apache License, Version 2.0 (the "License"); 00011 you may not use this file except in compliance with the License. 00012 You may obtain a copy of the License at 00013 00014 http://www.apache.org/licenses/LICENSE-2.0 00015 00016 Unless required by applicable law or agreed to in writing, software 00017 distributed under the License is distributed on an "AS IS" BASIS, 00018 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00019 See the License for the specific language governing permissions and 00020 limitations under the License. 00021 00022 ************************************************************************************/ 00023 00024 #ifndef OVR_Render_GL_Win32_Device_h 00025 #define OVR_Render_GL_Win32_Device_h 00026 00027 #include "Render_GL_Device.h" 00028 00029 #ifdef WIN32 00030 #include <Windows.h> 00031 #endif 00032 00033 00034 namespace OVR { namespace Render { namespace GL { namespace Win32 { 00035 00036 // ***** GL::Win32::RenderDevice 00037 00038 // Win32-Specific GL Render Device, used to create OpenGL under Windows. 00039 class RenderDevice : public GL::RenderDevice 00040 { 00041 HWND Window; 00042 HGLRC WglContext; 00043 HDC GdiDc; 00044 00045 public: 00046 RenderDevice(const Render::RendererParams& p, HWND win, HDC dc, HGLRC gl) 00047 : GL::RenderDevice(p), Window(win), WglContext(gl), GdiDc(dc) { OVR_UNUSED(p); } 00048 00049 // Implement static initializer function to create this class. 00050 static Render::RenderDevice* CreateDevice(const RendererParams& rp, void* oswnd); 00051 00052 virtual void Shutdown(); 00053 virtual void Present(); 00054 }; 00055 00056 00057 }}}} // OVR::Render::GL::Win32 00058 00059 #endif